agent-passport-system 2.7.0 → 2.8.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 (34) hide show
  1. package/README.md +6 -6
  2. package/dist/src/cli/index.js +36 -1
  3. package/dist/src/cli/index.js.map +1 -1
  4. package/dist/src/index.d.ts +1 -0
  5. package/dist/src/index.d.ts.map +1 -1
  6. package/dist/src/index.js +4 -0
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/v2/index.d.ts +1 -0
  9. package/dist/src/v2/index.d.ts.map +1 -1
  10. package/dist/src/v2/index.js +3 -0
  11. package/dist/src/v2/index.js.map +1 -1
  12. package/dist/src/v2/payment-rails/cycles/evidence-resolution.d.ts +5 -0
  13. package/dist/src/v2/payment-rails/cycles/evidence-resolution.d.ts.map +1 -1
  14. package/dist/src/v2/payment-rails/cycles/evidence-resolution.js +2 -0
  15. package/dist/src/v2/payment-rails/cycles/evidence-resolution.js.map +1 -1
  16. package/dist/src/v2/payment-rails/cycles/index.d.ts +77 -1
  17. package/dist/src/v2/payment-rails/cycles/index.d.ts.map +1 -1
  18. package/dist/src/v2/payment-rails/cycles/index.js +164 -5
  19. package/dist/src/v2/payment-rails/cycles/index.js.map +1 -1
  20. package/dist/src/v2/payment-rails/cycles/types.d.ts +40 -0
  21. package/dist/src/v2/payment-rails/cycles/types.d.ts.map +1 -1
  22. package/dist/src/v2/regulated-action/index.d.ts +4 -0
  23. package/dist/src/v2/regulated-action/index.d.ts.map +1 -0
  24. package/dist/src/v2/regulated-action/index.js +5 -0
  25. package/dist/src/v2/regulated-action/index.js.map +1 -0
  26. package/dist/src/v2/regulated-action/types.d.ts +142 -0
  27. package/dist/src/v2/regulated-action/types.d.ts.map +1 -0
  28. package/dist/src/v2/regulated-action/types.js +34 -0
  29. package/dist/src/v2/regulated-action/types.js.map +1 -0
  30. package/dist/src/v2/regulated-action/verify.d.ts +10 -0
  31. package/dist/src/v2/regulated-action/verify.d.ts.map +1 -0
  32. package/dist/src/v2/regulated-action/verify.js +252 -0
  33. package/dist/src/v2/regulated-action/verify.js.map +1 -0
  34. package/package.json +3 -3
@@ -0,0 +1,142 @@
1
+ export declare const REGULATED_ACTION_PROFILE: "aps-regulated-action-v0";
2
+ export declare const ACTION_CLASS_RANK: {
3
+ readonly read: 0;
4
+ readonly internal_write: 1;
5
+ readonly external_message: 2;
6
+ readonly financial_movement: 3;
7
+ readonly regulated_decision: 4;
8
+ readonly irreversible_action: 5;
9
+ };
10
+ export type ActionClass = keyof typeof ACTION_CLASS_RANK;
11
+ export declare const RAPV0_TAG: {
12
+ readonly actor: "APS-RAPV0-ACTOR";
13
+ readonly intent: "APS-RAPV0-INTENT";
14
+ readonly policy: "APS-RAPV0-POLICY";
15
+ readonly resource: "APS-RAPV0-RESOURCE-CONFIRMATION";
16
+ readonly authority: "APS-RAPV0-AUTHORITY";
17
+ readonly lifecycle: "APS-RAPV0-LIFECYCLE";
18
+ };
19
+ export interface SignatureBlock {
20
+ alg: string;
21
+ key_id: string;
22
+ sig: string;
23
+ }
24
+ export interface AuthorityRef {
25
+ type: 'id_jag' | 'ema';
26
+ issuer: string;
27
+ subject: string;
28
+ audience: string;
29
+ scope_hash: string;
30
+ issued_at: string;
31
+ expires_at: string;
32
+ assertion_hash: string;
33
+ jti: string;
34
+ assertion_sig: string;
35
+ }
36
+ export interface IntentCommitment {
37
+ created_before_execution: true;
38
+ intent_hash: string;
39
+ expected_effect_hash: string;
40
+ gateway_nonce: string;
41
+ timestamp_ms: number;
42
+ scope: string;
43
+ signature: string;
44
+ }
45
+ export type DecisionBasisLeaf = 'input_artifact_hashes' | 'policy_version_hash' | 'tool_call_refs' | 'risk_flags' | 'approval_state' | 'model_runtime_context_summary_hash' | 'uncertainty_band' | 'resource_correlation_ref';
46
+ export interface DecisionBasisCommitment {
47
+ root_hash: string;
48
+ leaves_schema: DecisionBasisLeaf[];
49
+ raw_chain_of_thought_included: false;
50
+ }
51
+ export interface GatewayPolicyDecision {
52
+ policy_version_hash: string;
53
+ decision: 'allow' | 'deny' | 'hold';
54
+ action_class_assigned: ActionClass;
55
+ signer: string;
56
+ signature: string;
57
+ }
58
+ export type ResourceConfirmationType = 'native_resource_signed' | 'boundary_attested' | 'boundary_attested_weak' | 'channel_authenticated' | 'manual_reconciliation' | 'missing';
59
+ export type RealizedEffectProvenance = 'ban_derived' | 'echoed';
60
+ export interface ResourceConfirmationRef {
61
+ type: ResourceConfirmationType;
62
+ resource_transaction_id: string;
63
+ correlation_id: string;
64
+ gateway_nonce_echo: string;
65
+ realized_effect_hash: string;
66
+ realized_effect_provenance: RealizedEffectProvenance;
67
+ status: string;
68
+ timestamp_ms: number;
69
+ signer_key_id: string;
70
+ signature: string;
71
+ }
72
+ export interface TransparencyRef {
73
+ type: 'scitt' | 'enterprise_merkle_log';
74
+ log_id: string;
75
+ inclusion_proof: InclusionStep[];
76
+ anchored_at_state: string;
77
+ tree_size: number;
78
+ leaf_hash: string;
79
+ }
80
+ export interface InclusionStep {
81
+ dir: 'L' | 'R';
82
+ hash: string;
83
+ }
84
+ export interface RegulatedActionReceiptV0 {
85
+ profile: typeof REGULATED_ACTION_PROFILE;
86
+ receipt_id: string;
87
+ action_class: ActionClass;
88
+ actor_signature: SignatureBlock;
89
+ aps_delegation_ref?: string;
90
+ authority_ref?: AuthorityRef;
91
+ intent_commitment?: IntentCommitment;
92
+ decision_basis_commitment?: DecisionBasisCommitment;
93
+ gateway_policy_decision?: GatewayPolicyDecision;
94
+ resource_confirmation_ref?: ResourceConfirmationRef;
95
+ transparency_ref?: TransparencyRef;
96
+ }
97
+ export interface RegisteredResourceKey {
98
+ publicKey: string;
99
+ registered_by_operator: boolean;
100
+ }
101
+ export interface VerificationContext {
102
+ idp_keyset: Record<string, string>;
103
+ operator_anchored_idp_copy?: Record<string, string>;
104
+ registered_resource_keys: Record<string, RegisteredResourceKey>;
105
+ operator_domain_registry: Record<string, {
106
+ publicKey: string;
107
+ identity: string;
108
+ }>;
109
+ operator_identity_id: string;
110
+ gateway_key_id?: string;
111
+ registered_log_roots: Record<string, string>;
112
+ allowed_clock_skew_ms?: number;
113
+ reserved_ts: number;
114
+ submitted_ts: number;
115
+ max_authority_execution_window_ms: number;
116
+ per_class_required_fields?: Partial<Record<ActionClass, string[]>>;
117
+ completeness_match?: boolean;
118
+ anchor_orders_intent_before_resource?: boolean;
119
+ non_equivocation_ok?: boolean;
120
+ }
121
+ export type Disposition = 'void' | 'void_policy_violation' | 'void_temporal_violation' | 'void_reconciliation_mismatch' | 'resource_unbound' | 'authority_invalid' | 'self_attested' | 'regulator_grade_for_class' | 'reconciled' | 'intent_precommitted' | 'authority_bound' | 'incomplete_for_class';
122
+ export type IncompleteReason = 'policy_denied_no_execution' | 'missing_authority' | 'missing_transparency_anchor' | 'execution_unconfirmed';
123
+ export type AuthorityBasis = 'external_idp' | 'operator_anchored_copy_weak';
124
+ export interface TrustDomainSeparation {
125
+ computed_domains: number;
126
+ idp_counts: boolean;
127
+ resource_counts: boolean;
128
+ operator_identity: string;
129
+ separation_ok: boolean;
130
+ }
131
+ export interface RegulatedVerifyResult {
132
+ profile: typeof REGULATED_ACTION_PROFILE;
133
+ disposition: Disposition;
134
+ incomplete_reason?: IncompleteReason;
135
+ violations: Disposition[];
136
+ missing_evidence: string[];
137
+ trust_domain_separation: TrustDomainSeparation;
138
+ authority_basis?: AuthorityBasis;
139
+ authority_replay: 'not_evaluated' | 'pass' | 'fail';
140
+ judgment_correctness: 'not_claimed';
141
+ }
142
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/regulated-action/types.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,wBAAwB,EAAG,yBAAkC,CAAA;AAI1E,eAAO,MAAM,iBAAiB;;;;;;;CAOpB,CAAA;AACV,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAIxD,eAAO,MAAM,SAAS;;;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B,mBAAmB,GACnB,6BAA6B,GAC7B,uBAAuB,CAAA;AAE3B,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,6BAA6B,CAAA;AAE3E,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,iBAAiB,EAAE,MAAM,CAAA;IACzB,aAAa,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,wBAAwB,CAAA;IACxC,WAAW,EAAE,WAAW,CAAA;IACxB,iBAAiB,CAAC,EAAE,gBAAgB,CAAA;IAGpC,UAAU,EAAE,WAAW,EAAE,CAAA;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,uBAAuB,EAAE,qBAAqB,CAAA;IAC9C,eAAe,CAAC,EAAE,cAAc,CAAA;IAGhC,gBAAgB,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,CAAA;IAEnD,oBAAoB,EAAE,aAAa,CAAA;CACpC"}
@@ -0,0 +1,34 @@
1
+ // Copyright 2024-2026 Tymofii Pidlisnyi. Apache-2.0 license. See LICENSE.
2
+ // APS Regulated Action Profile v0. Principle: Reconciled Action Attestation.
3
+ //
4
+ // Public primitive. Profile types per RAPV0-FROZEN-CONTRACT.md section A. A regulated
5
+ // action (class rank >= 3) reaches finality only when a pre-committed intent reconciles
6
+ // against two anchors OUTSIDE the operator trust domain: the IdP authority (EMA/ID-JAG)
7
+ // and the resource system of record. The verifier counts trust DOMAINS, not signatures.
8
+ //
9
+ // This module ships the receipt shape, the VerificationContext, and the disposition
10
+ // vocabulary. The deterministic verifier is in ./verify.ts. Product intelligence
11
+ // (reconciliation engine, chokepoint, BAN, transparency service, completeness layer)
12
+ // is NOT here; it is the private gateway. judgment_correctness is always not_claimed.
13
+ export const REGULATED_ACTION_PROFILE = 'aps-regulated-action-v0';
14
+ // Rank map. action_class is SET BY GATEWAY POLICY, never the agent. Compare via this
15
+ // map, never enum order. Rank >= 3 is "regulated" for the finality gate.
16
+ export const ACTION_CLASS_RANK = {
17
+ read: 0,
18
+ internal_write: 1,
19
+ external_message: 2,
20
+ financial_movement: 3,
21
+ regulated_decision: 4,
22
+ irreversible_action: 5,
23
+ };
24
+ // Domain-separation tags. Each signature signs a canonical subobject prefixed by its tag,
25
+ // never the whole mutable receipt.
26
+ export const RAPV0_TAG = {
27
+ actor: 'APS-RAPV0-ACTOR',
28
+ intent: 'APS-RAPV0-INTENT',
29
+ policy: 'APS-RAPV0-POLICY',
30
+ resource: 'APS-RAPV0-RESOURCE-CONFIRMATION',
31
+ authority: 'APS-RAPV0-AUTHORITY',
32
+ lifecycle: 'APS-RAPV0-LIFECYCLE',
33
+ };
34
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/v2/regulated-action/types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,6EAA6E;AAC7E,EAAE;AACF,sFAAsF;AACtF,wFAAwF;AACxF,wFAAwF;AACxF,wFAAwF;AACxF,EAAE;AACF,oFAAoF;AACpF,iFAAiF;AACjF,qFAAqF;AACrF,sFAAsF;AAEtF,MAAM,CAAC,MAAM,wBAAwB,GAAG,yBAAkC,CAAA;AAE1E,qFAAqF;AACrF,yEAAyE;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,IAAI,EAAE,CAAC;IACP,cAAc,EAAE,CAAC;IACjB,gBAAgB,EAAE,CAAC;IACnB,kBAAkB,EAAE,CAAC;IACrB,kBAAkB,EAAE,CAAC;IACrB,mBAAmB,EAAE,CAAC;CACd,CAAA;AAGV,0FAA0F;AAC1F,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,kBAAkB;IAC1B,MAAM,EAAE,kBAAkB;IAC1B,QAAQ,EAAE,iCAAiC;IAC3C,SAAS,EAAE,qBAAqB;IAChC,SAAS,EAAE,qBAAqB;CACxB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { ACTION_CLASS_RANK } from './types.js';
2
+ import type { RegulatedActionReceiptV0, VerificationContext, RegulatedVerifyResult } from './types.js';
3
+ /**
4
+ * Verify a RegulatedActionReceiptV0 against a VerificationContext. Returns the disposition,
5
+ * every terminal condition that held (violations[]), missing evidence, the computed
6
+ * trust-domain separation, the authority basis, and judgment_correctness: not_claimed.
7
+ */
8
+ export declare function verifyRegulatedAction(receipt: RegulatedActionReceiptV0, ctx: VerificationContext): RegulatedVerifyResult;
9
+ export declare function actionClassRank(c: keyof typeof ACTION_CLASS_RANK): number;
10
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/v2/regulated-action/verify.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,iBAAiB,EAClB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,qBAAqB,EAItB,MAAM,YAAY,CAAA;AAsBnB;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,wBAAwB,EACjC,GAAG,EAAE,mBAAmB,GACvB,qBAAqB,CA2NvB;AAGD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,OAAO,iBAAiB,GAAG,MAAM,CAEzE"}
@@ -0,0 +1,252 @@
1
+ // Copyright 2024-2026 Tymofii Pidlisnyi. Apache-2.0 license. See LICENSE.
2
+ // APS Regulated Action Profile v0: the deterministic disposition verifier (A2).
3
+ //
4
+ // This is the canonical truth-table from RAPV0-FROZEN-CONTRACT.md section B (amended order).
5
+ // It is total, deterministic from explicit inputs, most-dangerous-first, first match wins.
6
+ // It is STATELESS and PURE: no network, no wall-clock read, no replay state. Every input
7
+ // comes from the caller via VerificationContext. Replay/jti/nonce uniqueness is reported as
8
+ // authority_replay: not_evaluated and is computed by the PRIVATE gateway, never here.
9
+ // judgment_correctness is always not_claimed: we never certify a discretionary judgment.
10
+ import { canonicalizeJCS, canonicalHashJCS } from '../../core/canonical-jcs.js';
11
+ import { verify as edVerify } from '../../crypto/keys.js';
12
+ import { REGULATED_ACTION_PROFILE, RAPV0_TAG, ACTION_CLASS_RANK, } from './types.js';
13
+ const RESOURCE_VALID_TYPES = new Set(['native_resource_signed', 'boundary_attested']);
14
+ const RESOURCE_VALID_STATUS = new Set(['accepted', 'settled']);
15
+ function sigOk(payload, sig, pubkey) {
16
+ if (!sig || !pubkey)
17
+ return false;
18
+ try {
19
+ return edVerify(payload, sig, pubkey);
20
+ }
21
+ catch {
22
+ return false;
23
+ }
24
+ }
25
+ // Canonical signed payload for a domain-separated subobject: tag, then strict JCS of the
26
+ // subobject with its own signature field removed.
27
+ function signedPayload(tag, subobject, sigField) {
28
+ const copy = { ...subobject };
29
+ delete copy[sigField];
30
+ return `${tag}.${canonicalizeJCS(copy)}`;
31
+ }
32
+ /**
33
+ * Verify a RegulatedActionReceiptV0 against a VerificationContext. Returns the disposition,
34
+ * every terminal condition that held (violations[]), missing evidence, the computed
35
+ * trust-domain separation, the authority basis, and judgment_correctness: not_claimed.
36
+ */
37
+ export function verifyRegulatedAction(receipt, ctx) {
38
+ const missing = [];
39
+ // ── crypto_ok: operator-domain and resource-domain sigs only (NOT the authority sig). ──
40
+ const opReg = ctx.operator_domain_registry || {};
41
+ const actorKey = opReg[receipt.actor_signature?.key_id]?.publicKey;
42
+ let cryptoOk = sigOk(signedPayload(RAPV0_TAG.actor, { profile: receipt.profile, receipt_id: receipt.receipt_id, action_class: receipt.action_class, key_id: receipt.actor_signature?.key_id }, 'sig'), receipt.actor_signature?.sig, actorKey);
43
+ const intentPresent = !!receipt.intent_commitment;
44
+ if (intentPresent) {
45
+ const ic = receipt.intent_commitment;
46
+ const intentSignerId = receipt.gateway_policy_decision?.signer ?? ctx.gateway_key_id;
47
+ const intentKey = intentSignerId ? opReg[intentSignerId]?.publicKey : undefined;
48
+ const intentSigOk = sigOk(signedPayload(RAPV0_TAG.intent, ic, 'signature'), ic.signature, intentKey);
49
+ cryptoOk = cryptoOk && intentSigOk;
50
+ }
51
+ const policyPresent = !!receipt.gateway_policy_decision;
52
+ if (policyPresent) {
53
+ const pd = receipt.gateway_policy_decision;
54
+ const policyKey = opReg[pd.signer]?.publicKey;
55
+ const policySigOk = sigOk(signedPayload(RAPV0_TAG.policy, pd, 'signature'), pd.signature, policyKey);
56
+ cryptoOk = cryptoOk && policySigOk;
57
+ }
58
+ // crypto_ok covers ONLY the operator envelope (actor/intent/policy). It deliberately EXCLUDES
59
+ // the resource sig and the authority sig: a forged/unverifiable EXTERNAL resource confirmation
60
+ // must not void the operator's receipt, it must fail to establish the resource domain
61
+ // (resource_present_valid=false), dropping below reconciled. Only a tampered OPERATOR sig voids.
62
+ if (!cryptoOk)
63
+ missing.push('crypto');
64
+ // resource signature: evaluated for resource_present_valid / independence only.
65
+ const rc = receipt.resource_confirmation_ref;
66
+ let resourceSigVerifies = false;
67
+ let resourceKeyIndependent = false;
68
+ if (rc) {
69
+ const rk = ctx.registered_resource_keys?.[rc.signer_key_id];
70
+ resourceSigVerifies = sigOk(signedPayload(RAPV0_TAG.resource, rc, 'signature'), rc.signature, rk?.publicKey);
71
+ resourceKeyIndependent = !!rk && rk.registered_by_operator === false;
72
+ }
73
+ // ── authority trichotomy: ok / weak_basis / invalid ──
74
+ const ar = receipt.authority_ref;
75
+ const authorityPresent = !!ar;
76
+ let authorityOk = false;
77
+ let authorityWeakBasis = false;
78
+ let authorityInvalid = false;
79
+ let authorityBasis;
80
+ if (ar) {
81
+ const claims = { ...ar };
82
+ delete claims.assertion_sig;
83
+ const authPayload = `${RAPV0_TAG.authority}.${canonicalizeJCS(claims)}`;
84
+ const extVerifies = sigOk(authPayload, ar.assertion_sig, ctx.idp_keyset?.[ar.issuer]);
85
+ const opVerifies = sigOk(authPayload, ar.assertion_sig, ctx.operator_anchored_idp_copy?.[ar.issuer]);
86
+ const issuedMs = Date.parse(ar.issued_at);
87
+ const expiresMs = Date.parse(ar.expires_at);
88
+ const validAcross = Number.isFinite(issuedMs) && Number.isFinite(expiresMs) &&
89
+ issuedMs <= ctx.reserved_ts && expiresMs >= ctx.submitted_ts;
90
+ const withinWindow = ctx.submitted_ts - ctx.reserved_ts <= ctx.max_authority_execution_window_ms;
91
+ const freshnessOk = validAcross && withinWindow;
92
+ authorityOk = extVerifies && freshnessOk;
93
+ authorityWeakBasis = !authorityOk && !extVerifies && opVerifies && freshnessOk;
94
+ authorityInvalid = !authorityOk && !authorityWeakBasis;
95
+ authorityBasis = authorityOk ? 'external_idp' : authorityWeakBasis ? 'operator_anchored_copy_weak' : undefined;
96
+ if (authorityInvalid)
97
+ missing.push('authority');
98
+ }
99
+ else {
100
+ missing.push('authority');
101
+ }
102
+ // ── intent ──
103
+ let intentOk = false;
104
+ if (receipt.intent_commitment) {
105
+ const ic = receipt.intent_commitment;
106
+ const recomputed = canonicalHashJCS({
107
+ action_class: receipt.action_class,
108
+ scope: ic.scope,
109
+ authority_assertion_hash: ar?.assertion_hash ?? '',
110
+ decision_basis_root_hash: receipt.decision_basis_commitment?.root_hash ?? '',
111
+ expected_effect_hash: ic.expected_effect_hash,
112
+ });
113
+ intentOk = ic.created_before_execution === true && recomputed === ic.intent_hash;
114
+ }
115
+ // ── policy ──
116
+ const pd = receipt.gateway_policy_decision;
117
+ const policyAllow = !!pd && pd.decision === 'allow' && pd.action_class_assigned === receipt.action_class;
118
+ const policyDeny = !!pd && (pd.decision === 'deny' || pd.decision === 'hold');
119
+ // ── resource ──
120
+ const resourcePresentValid = !!rc &&
121
+ RESOURCE_VALID_TYPES.has(rc.type) &&
122
+ rc.realized_effect_provenance === 'ban_derived' &&
123
+ resourceSigVerifies &&
124
+ resourceKeyIndependent &&
125
+ RESOURCE_VALID_STATUS.has(rc.status);
126
+ const resourceMatches = intentOk && !!rc && !!receipt.intent_commitment &&
127
+ rc.gateway_nonce_echo === receipt.intent_commitment.gateway_nonce &&
128
+ rc.realized_effect_hash === receipt.intent_commitment.expected_effect_hash;
129
+ const resourceOk = resourcePresentValid && resourceMatches;
130
+ const executed = resourcePresentValid || ctx.completeness_match === true;
131
+ // ── transparency anchor ──
132
+ let anchorPresent = false;
133
+ if (receipt.transparency_ref) {
134
+ const tr = receipt.transparency_ref;
135
+ const root = ctx.registered_log_roots?.[tr.log_id];
136
+ let proofOk = false;
137
+ if (root) {
138
+ // Recompute the Merkle root from leaf_hash + inclusion_proof; compare to registered root.
139
+ let acc = tr.leaf_hash;
140
+ try {
141
+ for (const step of tr.inclusion_proof) {
142
+ acc = step.dir === 'L' ? canonicalHashJCS({ l: step.hash, r: acc }) : canonicalHashJCS({ l: acc, r: step.hash });
143
+ }
144
+ proofOk = acc === root;
145
+ }
146
+ catch {
147
+ proofOk = false;
148
+ }
149
+ }
150
+ anchorPresent = proofOk && tr.anchored_at_state === 'reserved';
151
+ }
152
+ if (!anchorPresent)
153
+ missing.push('transparency_anchor');
154
+ const temporalViolation = anchorPresent && ctx.anchor_orders_intent_before_resource === false;
155
+ const temporalConsistent = anchorPresent && ctx.anchor_orders_intent_before_resource === true;
156
+ const noneqOk = anchorPresent && ctx.non_equivocation_ok !== false;
157
+ // ── domains and separation ──
158
+ const idpCounts = authorityOk;
159
+ const resourceCounts = resourceOk && resourceKeyIndependent;
160
+ const domains = (idpCounts ? 1 : 0) + (resourceCounts ? 1 : 0);
161
+ const operatorKeyIds = [];
162
+ if (receipt.actor_signature?.key_id)
163
+ operatorKeyIds.push(receipt.actor_signature.key_id);
164
+ if (pd?.signer)
165
+ operatorKeyIds.push(pd.signer);
166
+ if (receipt.intent_commitment) {
167
+ const intentSignerId = pd?.signer ?? ctx.gateway_key_id;
168
+ if (intentSignerId)
169
+ operatorKeyIds.push(intentSignerId);
170
+ }
171
+ const separationOk = operatorKeyIds.every((kid) => opReg[kid]?.identity === ctx.operator_identity_id);
172
+ // ── per-class required fields (regulator_grade tier) ──
173
+ // regulator_grade_for_class is an opt-in STRICTER tier: reachable only when the caller
174
+ // supplies a per-class bar (non-empty) AND every required field is present. Without a defined
175
+ // bar for the class, the strongest honest claim is reconciled, never regulator_grade.
176
+ const requiredFields = ctx.per_class_required_fields?.[receipt.action_class] ?? [];
177
+ const perClassOk = requiredFields.length > 0 &&
178
+ requiredFields.every((f) => receipt[f] !== undefined);
179
+ // ── terminal-condition flags (guards 1-7), most-dangerous-first ──
180
+ const terminal = [
181
+ [!cryptoOk, 'void'],
182
+ [policyDeny && executed, 'void_policy_violation'],
183
+ [resourcePresentValid && intentPresent && temporalViolation, 'void_temporal_violation'],
184
+ [resourcePresentValid && intentOk && !resourceMatches, 'void_reconciliation_mismatch'],
185
+ [resourcePresentValid && !intentOk, 'resource_unbound'],
186
+ [authorityInvalid, 'authority_invalid'],
187
+ [!authorityPresent && !resourcePresentValid, 'self_attested'],
188
+ ];
189
+ const violations = terminal.filter(([held]) => held).map(([, d]) => d);
190
+ // ── first match wins ──
191
+ let disposition;
192
+ let incompleteReason;
193
+ const firstTerminal = terminal.find(([held]) => held);
194
+ if (firstTerminal) {
195
+ disposition = firstTerminal[1];
196
+ }
197
+ else if (authorityOk && intentOk && policyAllow && resourceOk && domains >= 2 &&
198
+ temporalConsistent && noneqOk && perClassOk && separationOk) {
199
+ disposition = 'regulator_grade_for_class';
200
+ }
201
+ else if (authorityOk && intentOk && policyAllow && resourceOk && domains >= 2 && temporalConsistent) {
202
+ disposition = 'reconciled';
203
+ }
204
+ else if (authorityOk && intentOk && policyAllow && !resourceOk) {
205
+ disposition = 'intent_precommitted';
206
+ }
207
+ else if (authorityOk && !intentOk) {
208
+ disposition = 'authority_bound';
209
+ }
210
+ else {
211
+ disposition = 'incomplete_for_class';
212
+ // deterministic reason precedence (AP-6)
213
+ if (policyDeny)
214
+ incompleteReason = 'policy_denied_no_execution';
215
+ else if (!authorityOk)
216
+ incompleteReason = 'missing_authority';
217
+ else if (!anchorPresent)
218
+ incompleteReason = 'missing_transparency_anchor';
219
+ else
220
+ incompleteReason = 'execution_unconfirmed';
221
+ }
222
+ // INVARIANT assertions (defense in depth; never reached if the table is correct).
223
+ if ((disposition === 'reconciled' || disposition === 'regulator_grade_for_class') &&
224
+ !(domains >= 2 && resourceOk && temporalConsistent)) {
225
+ throw new Error('RAPV0 invariant breach: reconciled/regulator_grade without domains>=2 AND resource_ok AND temporal_consistent');
226
+ }
227
+ const result = {
228
+ profile: REGULATED_ACTION_PROFILE,
229
+ disposition,
230
+ violations,
231
+ missing_evidence: missing,
232
+ trust_domain_separation: {
233
+ computed_domains: domains,
234
+ idp_counts: idpCounts,
235
+ resource_counts: resourceCounts,
236
+ operator_identity: ctx.operator_identity_id,
237
+ separation_ok: separationOk,
238
+ },
239
+ authority_replay: 'not_evaluated',
240
+ judgment_correctness: 'not_claimed',
241
+ };
242
+ if (incompleteReason)
243
+ result.incomplete_reason = incompleteReason;
244
+ if (authorityBasis)
245
+ result.authority_basis = authorityBasis;
246
+ return result;
247
+ }
248
+ // Convenience: rank lookup for callers gating on class >= 3 (regulated).
249
+ export function actionClassRank(c) {
250
+ return ACTION_CLASS_RANK[c];
251
+ }
252
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../../src/v2/regulated-action/verify.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,gFAAgF;AAChF,EAAE;AACF,6FAA6F;AAC7F,2FAA2F;AAC3F,yFAAyF;AACzF,4FAA4F;AAC5F,sFAAsF;AACtF,yFAAyF;AAEzF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EACL,wBAAwB,EACxB,SAAS,EACT,iBAAiB,GAClB,MAAM,YAAY,CAAA;AAUnB,MAAM,oBAAoB,GAAG,IAAI,GA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+1,7 @@
1
1
  {
2
2
  "name": "agent-passport-system",
3
- "version": "2.7.0",
4
- "description": "Enforcement and accountability layer for AI agents. Bring your own identity (did:key, did:web, SPIFFE, OAuth, did:aps). Verifier hot path p50 = 420ns bare-metal Linux EPYC 7313P (§13.1 canonical environment per spec), 347ns AWS c7i.2xlarge, 292ns Mac M3. Gateway enforcement, monotonic narrowing, cascade revocation, Bayesian reputation, wallet binding, unified four-axis attribution primitive, per-period attribution settlement, data lifecycle, mutual authentication, Wave 1 accountability primitives (action, authority-boundary, custody, contestability, bundle), evidentiary type safety (claim/evidence registry, claim verifier with forbidden-substitution detection, contestation cascade). 3,791 tests.",
3
+ "version": "2.8.0",
4
+ "description": "Enforcement and accountability layer for AI agents. Bring your own identity (did:key, did:web, SPIFFE, OAuth, did:aps). Verifier hot path p50 = 420ns bare-metal Linux EPYC 7313P (§13.1 canonical environment per spec), 347ns AWS c7i.2xlarge, 292ns Mac M3. Gateway enforcement, monotonic narrowing, cascade revocation, Bayesian reputation, wallet binding, unified four-axis attribution primitive, per-period attribution settlement, data lifecycle, mutual authentication, Wave 1 accountability primitives (action, authority-boundary, custody, contestability, bundle), evidentiary type safety (claim/evidence registry, claim verifier with forbidden-substitution detection, contestation cascade). 3,881 tests.",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
7
7
  "types": "dist/src/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsc && chmod +x dist/src/cli/index.js",
23
- "test": "npx tsx --test tests/passport.test.ts tests/adversarial.ts tests/v2.0-integration.ts tests/contract.test.ts tests/agora.test.ts tests/values.test.ts tests/delegation.test.ts tests/attribution.test.ts tests/policy.test.ts tests/canonical.test.ts tests/coordination.test.ts tests/commerce.test.ts tests/enforcement.test.ts tests/routing.test.ts tests/did-vc.test.ts tests/a2a.test.ts tests/principal.test.ts tests/adversarial-paper.test.ts tests/property-delegation.test.ts tests/intent.test.ts tests/reputation-authority.test.ts tests/cross-chain.test.ts tests/encrypted-messaging.test.ts tests/obligations.test.ts tests/execution-envelope.test.ts tests/adversarial-causal-chain.test.ts tests/governance.test.ts tests/feasibility.test.ts tests/identity.test.ts tests/precedent.test.ts tests/reanchor.test.ts tests/escalation.test.ts tests/oracle-witness.test.ts tests/messaging-audit.test.ts tests/policy-conflict.test.ts tests/data-source.test.ts tests/decision-semantics.test.ts tests/interop-vectors.test.ts tests/v2-bridge.test.ts tests/v2-full.test.ts tests/key-storage.test.ts tests/qntm-bridge.test.ts tests/agent-json-bridge.test.ts tests/did-resolution-conformance.test.ts tests/decision-equivalence.test.ts tests/data-lifecycle.test.ts tests/campaign7-composition.test.ts tests/entity-verification.test.ts tests/conformance.test.ts tests/governance-block.test.ts tests/aps-txt.test.ts tests/governance-360.test.ts tests/storage-backend.test.ts tests/receipt-bundle.test.ts tests/reputation-confidence.test.ts tests/governance-consumer.test.ts tests/charter.test.ts tests/institutional-governance-phase2.test.ts tests/data-source-attribution.test.ts tests/canonical-jcs.test.ts tests/temporal-spread.test.ts tests/fidelity-pressure.test.ts tests/denial-domains.test.ts tests/data-narrowing.test.ts tests/governance-posture.test.ts tests/anchor-state.test.ts tests/issuer-signature.test.ts tests/openshell-adapter.test.ts tests/attestation.test.ts tests/execution-attestation.test.ts tests/bilateral-receipt.test.ts tests/proof-namespace.test.ts tests/ecosystem-features.test.ts tests/persistent-passport.test.ts tests/security-av.test.ts tests/audit-fixes.test.ts tests/did-interop.test.ts tests/identity-bridge.test.ts tests/vc-wrapper.test.ts tests/identity-pipeline.test.ts tests/cross-protocol/sint-crossverify.test.ts tests/action-ref.test.ts tests/external-action-ref.test.ts tests/freshness.test.ts tests/evidence-grade.test.ts tests/key-rotation.test.ts tests/governance-regression.test.ts tests/posture-overlay.test.ts tests/feasibility-gateway.test.ts tests/trust-adapters.test.ts tests/evaluation-context.test.ts tests/health.test.ts tests/composio-adapter.test.ts tests/interop/ietf-envelope.test.ts tests/interop/signet-combined.test.ts tests/interop/moltrust-attestation.test.ts tests/interop/cross-protocol-vectors.test.ts tests/interop/receipt-chaining.test.ts tests/ibac-adapter.test.ts tests/langchain-adapter.test.ts tests/crewai-adapter.test.ts tests/mcp-adapter.test.ts tests/a2a-adapter.test.ts tests/gonka-adapter.test.ts tests/cross-algo-mismatch.test.ts tests/credential-lifecycle.test.ts tests/behavioral-memory.test.ts tests/telemetry-scope.test.ts tests/idempotency.test.ts tests/v2/wallet-binding.test.ts tests/v2/wallet-binding-fixture.test.ts tests/v2/credential-check-policy.test.ts tests/v2/delegation-escalation.test.ts tests/v2/attribution-consent.test.ts tests/v2/attribution-integration.test.ts tests/v2/attribution-primitive.test.ts tests/v2/attribution-primitive-integration.test.ts tests/v2/build-b-fractional-weights.test.ts tests/v2/build-b-cross-language.test.ts tests/v2/build-c-settlement.test.ts tests/v2/build-c-cross-language.test.ts tests/v2/build-c-end-to-end.test.ts tests/v2/provisional-statement.test.ts tests/temporal-decay.test.ts tests/confidence-breakdown.test.ts tests/behavioral-fingerprint.test.ts tests/session-boundary.test.ts tests/probe-identity.test.ts tests/v2/cognitive-attestation/envelope.test.ts tests/v2/cognitive-attestation/verify.test.ts tests/v2/cognitive-attestation/adversarial.test.ts tests/v2/mutual-auth/handshake.test.ts tests/v2/mutual-auth/adversarial.test.ts tests/v2/mutual-auth/conformance.test.ts tests/property-bilateral-receipt.test.ts tests/v2/instruction-provenance/conformance.test.ts tests/v2/instruction-provenance/adversarial.test.ts tests/v2/identity-composition-error.test.ts tests/v2/claim-evidence-types.test.ts tests/v2/claim-verifier.test.ts tests/v2/downstream-taint.test.ts tests/v2/payment-rails/nano.test.ts tests/v2/payment-rails/governance.test.ts tests/v2/payment-rails/ap2.test.ts tests/v2/payment-rails/x402.test.ts tests/v2/payment-rails/conformance/harness.test.ts tests/v2/payment-rails/binding-harness.test.ts tests/v2/payment-rails/stripe-issuing-primitives.test.ts tests/v2/payment-rails/acp.test.ts tests/v2/payment-rails/cycles.test.ts tests/v2/payment-rails/mpp.test.ts tests/v2/payment-rails/scope-resolution.test.ts tests/v2/payment-rails/accountability-bundle.test.ts tests/v2/payment-rails/did-uri-signing.test.ts tests/v2/payment-rails/cross-receipt-chain.test.ts src/v2/accountability/__tests__/action.test.ts src/v2/accountability/__tests__/authority-boundary.test.ts src/v2/accountability/__tests__/bundle.test.ts src/v2/accountability/__tests__/contestability.test.ts src/v2/accountability/__tests__/custody.test.ts src/v2/accountability/__tests__/fixtures.test.ts src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.ts src/v2/delegation/__tests__/responsibility_anchor.test.ts src/v2/memory_provenance/__tests__/memory_provenance.test.ts src/v2/cross_issuer_attestation/__tests__/cross_issuer_attestation.test.ts src/v2/behavioral_drift_window/__tests__/behavioral_drift_window.test.ts tests/tool-registry-integrity.test.ts tests/v2/transport/rfc9421/request-binding.test.ts tests/v2/verifier-hardening.test.ts tests/v2/key-resolution/resolver.test.ts src/v2/feasibility/__tests__/feasibility.test.ts tests/oauth-rfc8693-bridge.test.ts tests/conformance/conformance-negatives.test.ts tests/v2/policy-bundle/policy-bundle.test.ts src/v2/scope-registry/__tests__/scope-registry.test.ts tests/check-many-parity.test.ts tests/cross-impl/jcs-equivalence.test.ts tests/remote-signer.test.ts tests/v2/assurance/descriptor.test.ts tests/v2/audience-binding/audience-binding.test.ts tests/v2/hash-pointer/bbs-composition.test.ts tests/v2/hash-pointer/profile.test.ts tests/v2/human-oversight/human-oversight.test.ts tests/v2/offline-verifier/conformance-runner.test.ts tests/v2/offline-verifier/middleware.test.ts tests/v2/offline-verifier/verify.test.ts tests/v2/payment-rails/cycles-evidence-resolution.test.ts tests/v2/revocation-enforcement.test.ts tests/v2/trust-policy/trust-policy.test.ts src/v2/context-provenance/__tests__/roundtrip.test.ts src/v2/context-provenance/__tests__/disclosure.test.ts src/v2/context-provenance/__tests__/known-answer.test.ts src/v2/context-provenance/__tests__/conformance.test.ts src/v2/context-provenance/__tests__/adversarial.test.ts src/v2/context-provenance/__tests__/parity.test.ts src/v2/context-provenance/__tests__/cross-lang-parity.test.ts tests/v2/verification-source.test.ts tests/v2/producer-attestation.test.ts tests/delegation-currency-narrowing.test.ts tests/delegation-temporal-narrowing.test.ts tests/oauth-id-jag-bridge.test.ts",
23
+ "test": "npx tsx --test tests/passport.test.ts tests/adversarial.ts tests/v2.0-integration.ts tests/contract.test.ts tests/agora.test.ts tests/values.test.ts tests/delegation.test.ts tests/attribution.test.ts tests/policy.test.ts tests/canonical.test.ts tests/coordination.test.ts tests/commerce.test.ts tests/enforcement.test.ts tests/routing.test.ts tests/did-vc.test.ts tests/a2a.test.ts tests/principal.test.ts tests/adversarial-paper.test.ts tests/property-delegation.test.ts tests/intent.test.ts tests/reputation-authority.test.ts tests/cross-chain.test.ts tests/encrypted-messaging.test.ts tests/obligations.test.ts tests/execution-envelope.test.ts tests/adversarial-causal-chain.test.ts tests/governance.test.ts tests/feasibility.test.ts tests/identity.test.ts tests/precedent.test.ts tests/reanchor.test.ts tests/escalation.test.ts tests/oracle-witness.test.ts tests/messaging-audit.test.ts tests/policy-conflict.test.ts tests/data-source.test.ts tests/decision-semantics.test.ts tests/interop-vectors.test.ts tests/v2-bridge.test.ts tests/v2-full.test.ts tests/key-storage.test.ts tests/qntm-bridge.test.ts tests/agent-json-bridge.test.ts tests/did-resolution-conformance.test.ts tests/decision-equivalence.test.ts tests/data-lifecycle.test.ts tests/campaign7-composition.test.ts tests/entity-verification.test.ts tests/conformance.test.ts tests/governance-block.test.ts tests/aps-txt.test.ts tests/governance-360.test.ts tests/storage-backend.test.ts tests/receipt-bundle.test.ts tests/reputation-confidence.test.ts tests/governance-consumer.test.ts tests/charter.test.ts tests/institutional-governance-phase2.test.ts tests/data-source-attribution.test.ts tests/canonical-jcs.test.ts tests/temporal-spread.test.ts tests/fidelity-pressure.test.ts tests/denial-domains.test.ts tests/data-narrowing.test.ts tests/governance-posture.test.ts tests/anchor-state.test.ts tests/issuer-signature.test.ts tests/openshell-adapter.test.ts tests/attestation.test.ts tests/execution-attestation.test.ts tests/bilateral-receipt.test.ts tests/proof-namespace.test.ts tests/ecosystem-features.test.ts tests/persistent-passport.test.ts tests/security-av.test.ts tests/audit-fixes.test.ts tests/did-interop.test.ts tests/identity-bridge.test.ts tests/vc-wrapper.test.ts tests/identity-pipeline.test.ts tests/cross-protocol/sint-crossverify.test.ts tests/action-ref.test.ts tests/external-action-ref.test.ts tests/freshness.test.ts tests/evidence-grade.test.ts tests/key-rotation.test.ts tests/governance-regression.test.ts tests/posture-overlay.test.ts tests/feasibility-gateway.test.ts tests/trust-adapters.test.ts tests/evaluation-context.test.ts tests/health.test.ts tests/composio-adapter.test.ts tests/interop/ietf-envelope.test.ts tests/interop/signet-combined.test.ts tests/interop/moltrust-attestation.test.ts tests/interop/cross-protocol-vectors.test.ts tests/interop/receipt-chaining.test.ts tests/ibac-adapter.test.ts tests/langchain-adapter.test.ts tests/crewai-adapter.test.ts tests/mcp-adapter.test.ts tests/a2a-adapter.test.ts tests/gonka-adapter.test.ts tests/cross-algo-mismatch.test.ts tests/credential-lifecycle.test.ts tests/behavioral-memory.test.ts tests/telemetry-scope.test.ts tests/idempotency.test.ts tests/v2/wallet-binding.test.ts tests/v2/wallet-binding-fixture.test.ts tests/v2/credential-check-policy.test.ts tests/v2/delegation-escalation.test.ts tests/v2/attribution-consent.test.ts tests/v2/attribution-integration.test.ts tests/v2/attribution-primitive.test.ts tests/v2/attribution-primitive-integration.test.ts tests/v2/build-b-fractional-weights.test.ts tests/v2/build-b-cross-language.test.ts tests/v2/build-c-settlement.test.ts tests/v2/build-c-cross-language.test.ts tests/v2/build-c-end-to-end.test.ts tests/v2/provisional-statement.test.ts tests/temporal-decay.test.ts tests/confidence-breakdown.test.ts tests/behavioral-fingerprint.test.ts tests/session-boundary.test.ts tests/probe-identity.test.ts tests/v2/cognitive-attestation/envelope.test.ts tests/v2/cognitive-attestation/verify.test.ts tests/v2/cognitive-attestation/adversarial.test.ts tests/v2/mutual-auth/handshake.test.ts tests/v2/mutual-auth/adversarial.test.ts tests/v2/mutual-auth/conformance.test.ts tests/property-bilateral-receipt.test.ts tests/v2/instruction-provenance/conformance.test.ts tests/v2/instruction-provenance/adversarial.test.ts tests/v2/identity-composition-error.test.ts tests/v2/claim-evidence-types.test.ts tests/v2/claim-verifier.test.ts tests/v2/downstream-taint.test.ts tests/v2/payment-rails/nano.test.ts tests/v2/payment-rails/governance.test.ts tests/v2/payment-rails/ap2.test.ts tests/v2/payment-rails/x402.test.ts tests/v2/payment-rails/conformance/harness.test.ts tests/v2/payment-rails/binding-harness.test.ts tests/v2/payment-rails/stripe-issuing-primitives.test.ts tests/v2/payment-rails/acp.test.ts tests/v2/payment-rails/cycles.test.ts tests/v2/payment-rails/mpp.test.ts tests/v2/payment-rails/scope-resolution.test.ts tests/v2/payment-rails/accountability-bundle.test.ts tests/v2/payment-rails/did-uri-signing.test.ts tests/v2/payment-rails/cross-receipt-chain.test.ts src/v2/accountability/__tests__/action.test.ts src/v2/accountability/__tests__/authority-boundary.test.ts src/v2/accountability/__tests__/bundle.test.ts src/v2/accountability/__tests__/contestability.test.ts src/v2/accountability/__tests__/custody.test.ts src/v2/accountability/__tests__/fixtures.test.ts src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.ts src/v2/delegation/__tests__/responsibility_anchor.test.ts src/v2/memory_provenance/__tests__/memory_provenance.test.ts src/v2/cross_issuer_attestation/__tests__/cross_issuer_attestation.test.ts src/v2/behavioral_drift_window/__tests__/behavioral_drift_window.test.ts tests/tool-registry-integrity.test.ts tests/v2/transport/rfc9421/request-binding.test.ts tests/v2/verifier-hardening.test.ts tests/v2/key-resolution/resolver.test.ts src/v2/feasibility/__tests__/feasibility.test.ts tests/oauth-rfc8693-bridge.test.ts tests/conformance/conformance-negatives.test.ts tests/v2/policy-bundle/policy-bundle.test.ts src/v2/scope-registry/__tests__/scope-registry.test.ts tests/check-many-parity.test.ts tests/cross-impl/jcs-equivalence.test.ts tests/remote-signer.test.ts tests/v2/assurance/descriptor.test.ts tests/v2/audience-binding/audience-binding.test.ts tests/v2/hash-pointer/bbs-composition.test.ts tests/v2/hash-pointer/profile.test.ts tests/v2/human-oversight/human-oversight.test.ts tests/v2/offline-verifier/conformance-runner.test.ts tests/v2/offline-verifier/middleware.test.ts tests/v2/offline-verifier/verify.test.ts tests/v2/payment-rails/cycles-evidence-resolution.test.ts tests/v2/payment-rails/cycles-evidence-authority.test.ts tests/v2/revocation-enforcement.test.ts tests/v2/trust-policy/trust-policy.test.ts src/v2/context-provenance/__tests__/roundtrip.test.ts src/v2/context-provenance/__tests__/disclosure.test.ts src/v2/context-provenance/__tests__/known-answer.test.ts src/v2/context-provenance/__tests__/conformance.test.ts src/v2/context-provenance/__tests__/adversarial.test.ts src/v2/context-provenance/__tests__/parity.test.ts src/v2/context-provenance/__tests__/cross-lang-parity.test.ts tests/v2/verification-source.test.ts tests/v2/producer-attestation.test.ts tests/delegation-currency-narrowing.test.ts tests/delegation-temporal-narrowing.test.ts tests/oauth-id-jag-bridge.test.ts tests/v2/regulated-action/conformance.test.ts",
24
24
  "test:interop": "npx tsx --test tests/interop/ietf-envelope.test.ts tests/interop/signet-combined.test.ts tests/interop/moltrust-attestation.test.ts tests/interop/cross-protocol-vectors.test.ts tests/interop/receipt-chaining.test.ts",
25
25
  "test:quick": "tsx --test tests/passport.test.ts",
26
26
  "test:fixtures": "tsx fixtures/bilateral-delegation/test-canonicalize.ts",