agent-passport-system 2.6.0-alpha.4 → 2.6.0-alpha.5
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.
- package/README.md +2 -2
- package/dist/src/core/action-ref.d.ts +1 -1
- package/dist/src/core/action-ref.js +1 -1
- package/dist/src/core/canonical-jcs.d.ts +1 -1
- package/dist/src/core/canonical-jcs.js +1 -1
- package/dist/src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.d.ts +2 -0
- package/dist/src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.d.ts.map +1 -0
- package/dist/src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.js +224 -0
- package/dist/src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.js.map +1 -0
- package/dist/src/v2/cognitive_attestation/envelope.d.ts +25 -0
- package/dist/src/v2/cognitive_attestation/envelope.d.ts.map +1 -0
- package/dist/src/v2/cognitive_attestation/envelope.js +42 -0
- package/dist/src/v2/cognitive_attestation/envelope.js.map +1 -0
- package/dist/src/v2/cognitive_attestation/index.d.ts +5 -0
- package/dist/src/v2/cognitive_attestation/index.d.ts.map +1 -0
- package/dist/src/v2/cognitive_attestation/index.js +28 -0
- package/dist/src/v2/cognitive_attestation/index.js.map +1 -0
- package/dist/src/v2/cognitive_attestation/types.d.ts +129 -0
- package/dist/src/v2/cognitive_attestation/types.d.ts.map +1 -0
- package/dist/src/v2/cognitive_attestation/types.js +139 -0
- package/dist/src/v2/cognitive_attestation/types.js.map +1 -0
- package/dist/src/v2/cognitive_attestation/verify.d.ts +13 -0
- package/dist/src/v2/cognitive_attestation/verify.d.ts.map +1 -0
- package/dist/src/v2/cognitive_attestation/verify.js +62 -0
- package/dist/src/v2/cognitive_attestation/verify.js.map +1 -0
- package/dist/src/v2/delegation/__tests__/responsibility_anchor.test.d.ts +2 -0
- package/dist/src/v2/delegation/__tests__/responsibility_anchor.test.d.ts.map +1 -0
- package/dist/src/v2/delegation/__tests__/responsibility_anchor.test.js +270 -0
- package/dist/src/v2/delegation/__tests__/responsibility_anchor.test.js.map +1 -0
- package/dist/src/v2/delegation/responsibility.d.ts +89 -0
- package/dist/src/v2/delegation/responsibility.d.ts.map +1 -0
- package/dist/src/v2/delegation/responsibility.js +149 -0
- package/dist/src/v2/delegation/responsibility.js.map +1 -0
- package/dist/src/v2/delegation/validateChainComposition.d.ts +33 -0
- package/dist/src/v2/delegation/validateChainComposition.d.ts.map +1 -0
- package/dist/src/v2/delegation/validateChainComposition.js +94 -0
- package/dist/src/v2/delegation/validateChainComposition.js.map +1 -0
- package/dist/src/v2/payment-rails/cycles/index.d.ts +37 -0
- package/dist/src/v2/payment-rails/cycles/index.d.ts.map +1 -0
- package/dist/src/v2/payment-rails/cycles/index.js +378 -0
- package/dist/src/v2/payment-rails/cycles/index.js.map +1 -0
- package/dist/src/v2/payment-rails/cycles/types.d.ts +246 -0
- package/dist/src/v2/payment-rails/cycles/types.d.ts.map +1 -0
- package/dist/src/v2/payment-rails/cycles/types.js +51 -0
- package/dist/src/v2/payment-rails/cycles/types.js.map +1 -0
- package/dist/src/v2/payment-rails/index.d.ts +2 -0
- package/dist/src/v2/payment-rails/index.d.ts.map +1 -1
- package/dist/src/v2/payment-rails/index.js +8 -0
- package/dist/src/v2/payment-rails/index.js.map +1 -1
- package/dist/src/v2/types.d.ts +43 -0
- package/dist/src/v2/types.d.ts.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -143,7 +143,7 @@ The composition contract specifies how a verifier MUST cross-check per-request s
|
|
|
143
143
|
|
|
144
144
|
## Numbers
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
3,008 tests. 8 protocol layers. Framework adapters for CrewAI, LangChain, ADK, A2A, MCP, OpenShell, IBAC, Gonka. Gateway evaluation under 2ms. Zero heavy dependencies. Apache-2.0.
|
|
147
147
|
|
|
148
148
|
## Papers
|
|
149
149
|
|
|
@@ -155,7 +155,7 @@ The composition contract specifies how a verifier MUST cross-check per-request s
|
|
|
155
155
|
- [Governance in the Medium](https://doi.org/10.5281/zenodo.19582550)
|
|
156
156
|
- [Cognitive Attestation](https://doi.org/10.5281/zenodo.19646276)
|
|
157
157
|
- [The Evidence-Safety Gap](https://doi.org/10.5281/zenodo.19914628)
|
|
158
|
-
- IETF Internet-Draft: `draft-pidlisnyi-aps-
|
|
158
|
+
- IETF Internet-Draft: `draft-pidlisnyi-aps-01`
|
|
159
159
|
|
|
160
160
|
## Contributing
|
|
161
161
|
|
|
@@ -5,7 +5,7 @@ import type { ActionIntent } from '../types/policy.js';
|
|
|
5
5
|
* Inputs hashed: agentId, action.type, action.scopeRequired, normalized timestamp.
|
|
6
6
|
* Timestamp defaults to intent.createdAt; falls back to current time.
|
|
7
7
|
*
|
|
8
|
-
* Canonicalization follows RFC 8785 JCS strictly, per draft-pidlisnyi-aps-
|
|
8
|
+
* Canonicalization follows RFC 8785 JCS strictly, per draft-pidlisnyi-aps-01
|
|
9
9
|
* §4.1: null/undefined-valued keys are preserved (not stripped) so that
|
|
10
10
|
* cross-engine correlation byte-matches against any other strict-JCS
|
|
11
11
|
* implementation (x402 ecosystem, AgentGraph CTEF, Nobulex, etc.).
|
|
@@ -23,7 +23,7 @@ import { canonicalHashJCS } from './canonical-jcs.js';
|
|
|
23
23
|
* Inputs hashed: agentId, action.type, action.scopeRequired, normalized timestamp.
|
|
24
24
|
* Timestamp defaults to intent.createdAt; falls back to current time.
|
|
25
25
|
*
|
|
26
|
-
* Canonicalization follows RFC 8785 JCS strictly, per draft-pidlisnyi-aps-
|
|
26
|
+
* Canonicalization follows RFC 8785 JCS strictly, per draft-pidlisnyi-aps-01
|
|
27
27
|
* §4.1: null/undefined-valued keys are preserved (not stripped) so that
|
|
28
28
|
* cross-engine correlation byte-matches against any other strict-JCS
|
|
29
29
|
* implementation (x402 ecosystem, AgentGraph CTEF, Nobulex, etc.).
|
|
@@ -21,7 +21,7 @@ export interface CanonicalizationTestVector {
|
|
|
21
21
|
/** SHA-256 (lowercase hex) of canonicalizeJCS(obj). Strict-RFC-8785
|
|
22
22
|
* counterpart of canonicalHash() from ./canonical.ts. Use this for any
|
|
23
23
|
* cross-implementation hash whose conformance pin requires strict JCS
|
|
24
|
-
* (e.g. action_ref per draft-pidlisnyi-aps-
|
|
24
|
+
* (e.g. action_ref per draft-pidlisnyi-aps-01 §4.1). */
|
|
25
25
|
export declare function canonicalHashJCS(obj: Record<string, unknown>): string;
|
|
26
26
|
/** Built-in test vectors for cross-language verification */
|
|
27
27
|
export declare function getTestVectors(): CanonicalizationTestVector[];
|
|
@@ -81,7 +81,7 @@ function sha256hex(input) {
|
|
|
81
81
|
/** SHA-256 (lowercase hex) of canonicalizeJCS(obj). Strict-RFC-8785
|
|
82
82
|
* counterpart of canonicalHash() from ./canonical.ts. Use this for any
|
|
83
83
|
* cross-implementation hash whose conformance pin requires strict JCS
|
|
84
|
-
* (e.g. action_ref per draft-pidlisnyi-aps-
|
|
84
|
+
* (e.g. action_ref per draft-pidlisnyi-aps-01 §4.1). */
|
|
85
85
|
export function canonicalHashJCS(obj) {
|
|
86
86
|
return sha256hex(canonicalizeJCS(obj));
|
|
87
87
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cognitive_attestation.test.d.ts","sourceRoot":"","sources":["../../../../../src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// Copyright 2024-2026 Tymofii Pidlisnyi. Apache-2.0 license. See LICENSE.
|
|
2
|
+
// ══════════════════════════════════════════════════════════════════
|
|
3
|
+
// cognitive_attestation signal_type (v0.1): tests
|
|
4
|
+
// ══════════════════════════════════════════════════════════════════
|
|
5
|
+
import { describe, it } from 'node:test';
|
|
6
|
+
import assert from 'node:assert/strict';
|
|
7
|
+
import { createHash } from 'node:crypto';
|
|
8
|
+
import { generateKeyPair, publicKeyFromPrivate } from '../../../crypto/keys.js';
|
|
9
|
+
import { signCognitiveAttestation, verifyCognitiveAttestation, isCognitiveAttestation, canonicalizeForSignature, } from '../index.js';
|
|
10
|
+
function sha256Hex(s) {
|
|
11
|
+
return createHash('sha256').update(s, 'utf8').digest('hex');
|
|
12
|
+
}
|
|
13
|
+
const FIXED_TIMESTAMP_MS = 1748275200000; // 2026-05-26T16:00:00Z
|
|
14
|
+
const PRECONDITION_PAYLOAD = (() => {
|
|
15
|
+
const sorted = ['policy.4.2', 'scope.commerce.purchase', 'tool.email_send'];
|
|
16
|
+
return {
|
|
17
|
+
available_preconditions: sorted,
|
|
18
|
+
precondition_hashes: sorted.map(sha256Hex),
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
const CANDIDATE_PAYLOAD = {
|
|
22
|
+
evaluated_candidates: [
|
|
23
|
+
{ candidate_ref: sha256Hex('action.transfer'), eliminated: true, elimination_reason: 'violates policy 4.2' },
|
|
24
|
+
{ candidate_ref: sha256Hex('action.deny'), eliminated: false },
|
|
25
|
+
{ candidate_ref: sha256Hex('action.escalate'), eliminated: true, elimination_reason: 'no human available in scope' },
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
const DECISION_PATH_PAYLOAD = {
|
|
29
|
+
chosen_path_ref: sha256Hex('chosen.deny'),
|
|
30
|
+
confidence: 0.91,
|
|
31
|
+
reasoning_chain_hashes: [
|
|
32
|
+
sha256Hex('step.1.precondition-check'),
|
|
33
|
+
sha256Hex('step.2.candidate-eval'),
|
|
34
|
+
sha256Hex('step.3.policy-match'),
|
|
35
|
+
],
|
|
36
|
+
};
|
|
37
|
+
function makeUnsigned(klass, agent_id) {
|
|
38
|
+
const decision_ref = sha256Hex('decision.test.001');
|
|
39
|
+
const base = {
|
|
40
|
+
signal_type: 'cognitive_attestation',
|
|
41
|
+
agent_id,
|
|
42
|
+
decision_ref,
|
|
43
|
+
timestamp_ms: FIXED_TIMESTAMP_MS,
|
|
44
|
+
};
|
|
45
|
+
if (klass === 'precondition_set') {
|
|
46
|
+
return { ...base, class: 'precondition_set', class_payload: PRECONDITION_PAYLOAD };
|
|
47
|
+
}
|
|
48
|
+
if (klass === 'candidate_set') {
|
|
49
|
+
return { ...base, class: 'candidate_set', class_payload: CANDIDATE_PAYLOAD };
|
|
50
|
+
}
|
|
51
|
+
return { ...base, class: 'decision_path', class_payload: DECISION_PATH_PAYLOAD };
|
|
52
|
+
}
|
|
53
|
+
// ── Round-trip per class ─────────────────────────────────────────
|
|
54
|
+
describe('cognitive_attestation: round-trip per class', () => {
|
|
55
|
+
for (const klass of ['precondition_set', 'candidate_set', 'decision_path']) {
|
|
56
|
+
it(`sign + verify round-trips a ${klass} envelope`, () => {
|
|
57
|
+
const kp = generateKeyPair();
|
|
58
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned(klass, kp.publicKey));
|
|
59
|
+
assert.equal(signed.signal_type, 'cognitive_attestation');
|
|
60
|
+
assert.equal(signed.class, klass);
|
|
61
|
+
assert.equal(signed.agent_id, kp.publicKey);
|
|
62
|
+
assert.equal(signed.signature.length, 128);
|
|
63
|
+
const result = verifyCognitiveAttestation(signed);
|
|
64
|
+
assert.equal(result.valid, true, `expected valid, got reason=${result.reason}`);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
// ── Tamper detection ────────────────────────────────────────────
|
|
69
|
+
describe('cognitive_attestation: tamper detection', () => {
|
|
70
|
+
it('flipping one byte of class_payload causes verification to fail', () => {
|
|
71
|
+
const kp = generateKeyPair();
|
|
72
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('decision_path', kp.publicKey));
|
|
73
|
+
// Mutate the confidence by a hair: still a valid two-decimal number but a
|
|
74
|
+
// different signed byte sequence.
|
|
75
|
+
const tampered = {
|
|
76
|
+
...signed,
|
|
77
|
+
class_payload: { ...signed.class_payload, confidence: 0.92 },
|
|
78
|
+
};
|
|
79
|
+
const result = verifyCognitiveAttestation(tampered);
|
|
80
|
+
assert.equal(result.valid, false);
|
|
81
|
+
assert.equal(result.reason, 'SIGNATURE_INVALID');
|
|
82
|
+
});
|
|
83
|
+
it('mutating a precondition_set hash causes verification to fail', () => {
|
|
84
|
+
const kp = generateKeyPair();
|
|
85
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('precondition_set', kp.publicKey));
|
|
86
|
+
const mutatedHashes = [...signed.class_payload.precondition_hashes];
|
|
87
|
+
// Flip the last character of the first hash to a different hex digit.
|
|
88
|
+
const first = mutatedHashes[0];
|
|
89
|
+
const lastChar = first.slice(-1);
|
|
90
|
+
const flippedChar = lastChar === '0' ? '1' : '0';
|
|
91
|
+
mutatedHashes[0] = first.slice(0, -1) + flippedChar;
|
|
92
|
+
const tampered = {
|
|
93
|
+
...signed,
|
|
94
|
+
class_payload: { ...signed.class_payload, precondition_hashes: mutatedHashes },
|
|
95
|
+
};
|
|
96
|
+
const result = verifyCognitiveAttestation(tampered);
|
|
97
|
+
assert.equal(result.valid, false);
|
|
98
|
+
assert.equal(result.reason, 'SIGNATURE_INVALID');
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
// ── Wrong-key detection ────────────────────────────────────────
|
|
102
|
+
describe('cognitive_attestation: wrong-key detection', () => {
|
|
103
|
+
it('envelope signed with key A but claiming agent_id of key B fails', () => {
|
|
104
|
+
const keyA = generateKeyPair();
|
|
105
|
+
const keyB = generateKeyPair();
|
|
106
|
+
// Sign with A but rewrite agent_id to B's public key without re-signing.
|
|
107
|
+
const signedByA = signCognitiveAttestation(keyA.privateKey, makeUnsigned('candidate_set', keyA.publicKey));
|
|
108
|
+
const lyingEnvelope = { ...signedByA, agent_id: keyB.publicKey };
|
|
109
|
+
const result = verifyCognitiveAttestation(lyingEnvelope);
|
|
110
|
+
assert.equal(result.valid, false);
|
|
111
|
+
assert.equal(result.reason, 'SIGNATURE_INVALID');
|
|
112
|
+
});
|
|
113
|
+
it('signCognitiveAttestation always overwrites agent_id to match the signing key', () => {
|
|
114
|
+
const keyA = generateKeyPair();
|
|
115
|
+
const keyB = generateKeyPair();
|
|
116
|
+
// Caller hands in agent_id = B but signs with A. Helper overwrites to A.
|
|
117
|
+
const unsigned = makeUnsigned('precondition_set', keyB.publicKey);
|
|
118
|
+
const signed = signCognitiveAttestation(keyA.privateKey, unsigned);
|
|
119
|
+
assert.equal(signed.agent_id, publicKeyFromPrivate(keyA.privateKey));
|
|
120
|
+
const result = verifyCognitiveAttestation(signed);
|
|
121
|
+
assert.equal(result.valid, true);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
// ── Canonicalization stability ─────────────────────────────────
|
|
125
|
+
describe('cognitive_attestation: canonicalization stability', () => {
|
|
126
|
+
it('two envelopes with the same logical content but different field order produce the same signature', () => {
|
|
127
|
+
const kp = generateKeyPair();
|
|
128
|
+
const decision_ref = sha256Hex('decision.test.canon');
|
|
129
|
+
const ordering1 = {
|
|
130
|
+
signal_type: 'cognitive_attestation',
|
|
131
|
+
agent_id: kp.publicKey,
|
|
132
|
+
class: 'decision_path',
|
|
133
|
+
class_payload: DECISION_PATH_PAYLOAD,
|
|
134
|
+
decision_ref,
|
|
135
|
+
timestamp_ms: FIXED_TIMESTAMP_MS,
|
|
136
|
+
};
|
|
137
|
+
const ordering2 = {
|
|
138
|
+
class_payload: DECISION_PATH_PAYLOAD,
|
|
139
|
+
decision_ref,
|
|
140
|
+
timestamp_ms: FIXED_TIMESTAMP_MS,
|
|
141
|
+
class: 'decision_path',
|
|
142
|
+
agent_id: kp.publicKey,
|
|
143
|
+
signal_type: 'cognitive_attestation',
|
|
144
|
+
};
|
|
145
|
+
const signed1 = signCognitiveAttestation(kp.privateKey, ordering1);
|
|
146
|
+
const signed2 = signCognitiveAttestation(kp.privateKey, ordering2);
|
|
147
|
+
assert.equal(signed1.signature, signed2.signature);
|
|
148
|
+
// Canonical bytes equal across orderings, with the signature field emptied.
|
|
149
|
+
const canon1 = canonicalizeForSignature(ordering1);
|
|
150
|
+
const canon2 = canonicalizeForSignature(ordering2);
|
|
151
|
+
assert.equal(canon1, canon2);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
// ── Class discriminator ────────────────────────────────────────
|
|
155
|
+
describe('cognitive_attestation: class discriminator', () => {
|
|
156
|
+
it('isCognitiveAttestation accepts each of the three v0.1 class envelopes', () => {
|
|
157
|
+
const kp = generateKeyPair();
|
|
158
|
+
for (const klass of ['precondition_set', 'candidate_set', 'decision_path']) {
|
|
159
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned(klass, kp.publicKey));
|
|
160
|
+
assert.equal(isCognitiveAttestation(signed), true, `failed for ${klass}`);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
it('isCognitiveAttestation rejects envelopes carrying pre_commit_chain (v0.2 deferred)', () => {
|
|
164
|
+
const kp = generateKeyPair();
|
|
165
|
+
const v0_2_attempt = {
|
|
166
|
+
signal_type: 'cognitive_attestation',
|
|
167
|
+
class: 'pre_commit_chain',
|
|
168
|
+
agent_id: kp.publicKey,
|
|
169
|
+
decision_ref: sha256Hex('decision.v0_2'),
|
|
170
|
+
class_payload: {
|
|
171
|
+
// Whatever shape might land in v0.2 is irrelevant; the discriminator
|
|
172
|
+
// rejects the class name itself.
|
|
173
|
+
chained_commitments: [],
|
|
174
|
+
},
|
|
175
|
+
timestamp_ms: FIXED_TIMESTAMP_MS,
|
|
176
|
+
signature: '0'.repeat(128),
|
|
177
|
+
};
|
|
178
|
+
assert.equal(isCognitiveAttestation(v0_2_attempt), false);
|
|
179
|
+
});
|
|
180
|
+
it('isCognitiveAttestation rejects non-object inputs, wrong signal_type, malformed agent_id', () => {
|
|
181
|
+
assert.equal(isCognitiveAttestation(null), false);
|
|
182
|
+
assert.equal(isCognitiveAttestation('string'), false);
|
|
183
|
+
assert.equal(isCognitiveAttestation({}), false);
|
|
184
|
+
assert.equal(isCognitiveAttestation({ signal_type: 'reasoning_integrity' }), false);
|
|
185
|
+
const kp = generateKeyPair();
|
|
186
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('decision_path', kp.publicKey));
|
|
187
|
+
assert.equal(isCognitiveAttestation({ ...signed, agent_id: 'not-hex' }), false);
|
|
188
|
+
assert.equal(isCognitiveAttestation({ ...signed, signature: 'short' }), false);
|
|
189
|
+
});
|
|
190
|
+
it('isCognitiveAttestation rejects a candidate_set entry with eliminated=false carrying a reason', () => {
|
|
191
|
+
const kp = generateKeyPair();
|
|
192
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('candidate_set', kp.publicKey));
|
|
193
|
+
const bad = {
|
|
194
|
+
...signed,
|
|
195
|
+
class_payload: {
|
|
196
|
+
evaluated_candidates: [
|
|
197
|
+
{ candidate_ref: sha256Hex('a'), eliminated: false, elimination_reason: 'should not be present' },
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
assert.equal(isCognitiveAttestation(bad), false);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
// ── Verifier rejects malformed inputs without throwing ─────────
|
|
205
|
+
describe('cognitive_attestation: verifier shape failures', () => {
|
|
206
|
+
it('returns INVALID_SIGNAL_TYPE for a non-object input', () => {
|
|
207
|
+
assert.deepEqual(verifyCognitiveAttestation(null), { valid: false, reason: 'INVALID_SIGNAL_TYPE' });
|
|
208
|
+
});
|
|
209
|
+
it('returns INVALID_CLASS for an unknown class', () => {
|
|
210
|
+
const kp = generateKeyPair();
|
|
211
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('decision_path', kp.publicKey));
|
|
212
|
+
const result = verifyCognitiveAttestation({ ...signed, class: 'pre_commit_chain' });
|
|
213
|
+
assert.equal(result.valid, false);
|
|
214
|
+
assert.equal(result.reason, 'INVALID_CLASS');
|
|
215
|
+
});
|
|
216
|
+
it('returns INVALID_AGENT_ID for a malformed agent_id', () => {
|
|
217
|
+
const kp = generateKeyPair();
|
|
218
|
+
const signed = signCognitiveAttestation(kp.privateKey, makeUnsigned('candidate_set', kp.publicKey));
|
|
219
|
+
const result = verifyCognitiveAttestation({ ...signed, agent_id: 'XYZ' });
|
|
220
|
+
assert.equal(result.valid, false);
|
|
221
|
+
assert.equal(result.reason, 'INVALID_AGENT_ID');
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
//# sourceMappingURL=cognitive_attestation.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cognitive_attestation.test.js","sourceRoot":"","sources":["../../../../../src/v2/cognitive_attestation/__tests__/cognitive_attestation.test.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,kDAAkD;AAClD,qEAAqE;AAErE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,MAAM,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAE/E,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,aAAa,CAAA;AAapB,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,kBAAkB,GAAG,aAAa,CAAA,CAAC,uBAAuB;AAEhE,MAAM,oBAAoB,GAA2B,CAAC,GAAG,EAAE;IACzD,MAAM,MAAM,GAAG,CAAC,YAAY,EAAE,yBAAyB,EAAE,iBAAiB,CAAC,CAAA;IAC3E,OAAO;QACL,uBAAuB,EAAE,MAAM;QAC/B,mBAAmB,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;KAC3C,CAAA;AACH,CAAC,CAAC,EAAE,CAAA;AAEJ,MAAM,iBAAiB,GAAwB;IAC7C,oBAAoB,EAAE;QACpB,EAAE,aAAa,EAAE,SAAS,CAAC,i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. The signature field is set to the
|
|
4
|
+
* empty string before serialization so that signing and verification
|
|
5
|
+
* agree on the bytes-under-signature without either side rebuilding the
|
|
6
|
+
* envelope from a partial shape.
|
|
7
|
+
*/
|
|
8
|
+
export declare function canonicalizeForSignature(envelope: UnsignedCognitiveAttestationEnvelope | CognitiveAttestationEnvelope): string;
|
|
9
|
+
/**
|
|
10
|
+
* Sign an unsigned envelope with an Ed25519 private key (hex). Derives
|
|
11
|
+
* the public key from the private key and writes it into `agent_id` on
|
|
12
|
+
* the returned envelope; this guarantees that the embedded `agent_id`
|
|
13
|
+
* matches the signing key, which the verifier checks against.
|
|
14
|
+
*
|
|
15
|
+
* If the caller provides their own `agent_id` on the input, this helper
|
|
16
|
+
* still derives the public key from the private key and overwrites the
|
|
17
|
+
* field, because a divergence between the embedded agent_id and the
|
|
18
|
+
* signing key is always a bug. Use `publicKeyFromPrivate` upstream if a
|
|
19
|
+
* pre-flight check is needed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function signCognitiveAttestation<T extends UnsignedCognitiveAttestationEnvelope>(privateKeyHex: string, unsigned: T): T & {
|
|
22
|
+
readonly signature: string;
|
|
23
|
+
readonly agent_id: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../../src/v2/cognitive_attestation/envelope.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACrC,MAAM,YAAY,CAAA;AAEnB;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,oCAAoC,GAAG,4BAA4B,GAC5E,MAAM,CAGR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,oCAAoC,EACrF,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,CAAC,GACV,CAAC,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAM/D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2024-2026 Tymofii Pidlisnyi. Apache-2.0 license. See LICENSE.
|
|
2
|
+
// ══════════════════════════════════════════════════════════════════
|
|
3
|
+
// cognitive_attestation signal_type (v0.1): envelope helpers
|
|
4
|
+
// ══════════════════════════════════════════════════════════════════
|
|
5
|
+
// Signs the JCS-canonical form of the envelope with the signature field
|
|
6
|
+
// emptied, then attaches the resulting signature. Mirrors the pattern
|
|
7
|
+
// used by v2/payment-rails and v2/instruction-provenance: canonical form
|
|
8
|
+
// is the source of truth, the wire object is the canonical bytes plus
|
|
9
|
+
// signature.
|
|
10
|
+
// ══════════════════════════════════════════════════════════════════
|
|
11
|
+
import { canonicalizeJCS } from '../../core/canonical-jcs.js';
|
|
12
|
+
import { sign, publicKeyFromPrivate } from '../../crypto/keys.js';
|
|
13
|
+
/**
|
|
14
|
+
* Canonicalize an envelope for signing. The signature field is set to the
|
|
15
|
+
* empty string before serialization so that signing and verification
|
|
16
|
+
* agree on the bytes-under-signature without either side rebuilding the
|
|
17
|
+
* envelope from a partial shape.
|
|
18
|
+
*/
|
|
19
|
+
export function canonicalizeForSignature(envelope) {
|
|
20
|
+
const draft = { ...envelope, signature: '' };
|
|
21
|
+
return canonicalizeJCS(draft);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Sign an unsigned envelope with an Ed25519 private key (hex). Derives
|
|
25
|
+
* the public key from the private key and writes it into `agent_id` on
|
|
26
|
+
* the returned envelope; this guarantees that the embedded `agent_id`
|
|
27
|
+
* matches the signing key, which the verifier checks against.
|
|
28
|
+
*
|
|
29
|
+
* If the caller provides their own `agent_id` on the input, this helper
|
|
30
|
+
* still derives the public key from the private key and overwrites the
|
|
31
|
+
* field, because a divergence between the embedded agent_id and the
|
|
32
|
+
* signing key is always a bug. Use `publicKeyFromPrivate` upstream if a
|
|
33
|
+
* pre-flight check is needed.
|
|
34
|
+
*/
|
|
35
|
+
export function signCognitiveAttestation(privateKeyHex, unsigned) {
|
|
36
|
+
const agent_id = publicKeyFromPrivate(privateKeyHex);
|
|
37
|
+
const withDerivedKey = { ...unsigned, agent_id };
|
|
38
|
+
const bytes = canonicalizeForSignature(withDerivedKey);
|
|
39
|
+
const signature = sign(bytes, privateKeyHex);
|
|
40
|
+
return { ...withDerivedKey, signature };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=envelope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../../../src/v2/cognitive_attestation/envelope.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,6DAA6D;AAC7D,qEAAqE;AACrE,wEAAwE;AACxE,sEAAsE;AACtE,yEAAyE;AACzE,sEAAsE;AACtE,aAAa;AACb,qEAAqE;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOjE;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,QAA6E;IAE7E,MAAM,KAAK,GAAG,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAA;IAC5C,OAAO,eAAe,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CACtC,aAAqB,EACrB,QAAW;IAEX,MAAM,QAAQ,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAA;IACpD,MAAM,cAAc,GAAG,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAA;IAChD,MAAM,KAAK,GAAG,wBAAwB,CAAC,cAAsD,CAAC,CAAA;IAC9F,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,CAAA;IAC5C,OAAO,EAAE,GAAG,cAAc,EAAE,SAAS,EAAmE,CAAA;AAC1G,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { signCognitiveAttestation, canonicalizeForSignature } from './envelope.js';
|
|
2
|
+
export { verifyCognitiveAttestation } from './verify.js';
|
|
3
|
+
export { isCognitiveAttestation, isPreconditionSetPayload, isCandidateSetPayload, isDecisionPathPayload, } from './types.js';
|
|
4
|
+
export type { CognitiveAttestationSignalType, CognitiveAttestationClass, CognitiveAttestationEnvelope, PreconditionSetEnvelope, CandidateSetEnvelope, DecisionPathEnvelope, UnsignedCognitiveAttestationEnvelope, UnsignedPreconditionSetEnvelope, UnsignedCandidateSetEnvelope, UnsignedDecisionPathEnvelope, PreconditionSetPayload, CandidateSetPayload, EvaluatedCandidate, DecisionPathPayload, CognitiveAttestationVerifyResult, CognitiveAttestationVerifyReason, } from './types.js';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/v2/cognitive_attestation/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAA;AAEnB,YAAY,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,oCAAoC,EACpC,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2024-2026 Tymofii Pidlisnyi. Apache-2.0 license. See LICENSE.
|
|
2
|
+
// ══════════════════════════════════════════════════════════════════
|
|
3
|
+
// cognitive_attestation signal_type (v0.1): public surface
|
|
4
|
+
// ══════════════════════════════════════════════════════════════════
|
|
5
|
+
// Vocabulary primitive declared at aeoess/agent-governance-vocabulary
|
|
6
|
+
// PR #104 (signal_types.cognitive_attestation, status:proposed). This
|
|
7
|
+
// module is the AEOESS reference implementation submitted as the first
|
|
8
|
+
// of the two implementations CONTRIBUTING.md requires before the
|
|
9
|
+
// status can promote.
|
|
10
|
+
//
|
|
11
|
+
// Scope (v0.1):
|
|
12
|
+
// - Three determinability classes: precondition_set, candidate_set,
|
|
13
|
+
// decision_path.
|
|
14
|
+
// - Envelope construction, JCS canonicalization, Ed25519 signing,
|
|
15
|
+
// signature verification.
|
|
16
|
+
// - Runtime type guard.
|
|
17
|
+
//
|
|
18
|
+
// Out of scope (v0.2 or deferred per PR #104 notes):
|
|
19
|
+
// - pre_commit_chain class.
|
|
20
|
+
// - (F, Ω, D) structural support in the signed envelope.
|
|
21
|
+
// - Reduction-map syntax.
|
|
22
|
+
// - Truth-of-claim verifier; downstream consumer responsibility.
|
|
23
|
+
// - Privacy posture (selective disclosure, ZK over reductions).
|
|
24
|
+
// ══════════════════════════════════════════════════════════════════
|
|
25
|
+
export { signCognitiveAttestation, canonicalizeForSignature } from './envelope.js';
|
|
26
|
+
export { verifyCognitiveAttestation } from './verify.js';
|
|
27
|
+
export { isCognitiveAttestation, isPreconditionSetPayload, isCandidateSetPayload, isDecisionPathPayload, } from './types.js';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v2/cognitive_attestation/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qEAAqE;AACrE,2DAA2D;AAC3D,qEAAqE;AACrE,sEAAsE;AACtE,sEAAsE;AACtE,uEAAuE;AACvE,iEAAiE;AACjE,sBAAsB;AACtB,EAAE;AACF,gBAAgB;AAChB,sEAAsE;AACtE,qBAAqB;AACrB,oEAAoE;AACpE,8BAA8B;AAC9B,0BAA0B;AAC1B,EAAE;AACF,qDAAqD;AACrD,8BAA8B;AAC9B,2DAA2D;AAC3D,4BAA4B;AAC5B,mEAAmE;AACnE,kEAAkE;AAClE,qEAAqE;AAErE,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAA;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAA"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Literal tag for envelope discrimination at the wire level.
|
|
3
|
+
*/
|
|
4
|
+
export type CognitiveAttestationSignalType = 'cognitive_attestation';
|
|
5
|
+
/**
|
|
6
|
+
* The three v0.1 determinability classes. `pre_commit_chain` is a v0.2
|
|
7
|
+
* candidate per PR #104 notes and is not in this union.
|
|
8
|
+
*/
|
|
9
|
+
export type CognitiveAttestationClass = 'precondition_set' | 'candidate_set' | 'decision_path';
|
|
10
|
+
/**
|
|
11
|
+
* Class payload for precondition_set: which preconditions were available
|
|
12
|
+
* at decision time (delegation scope, policy constraints, tool availability,
|
|
13
|
+
* context window). `available_preconditions` MUST be sorted lexicographically
|
|
14
|
+
* to produce a stable canonical form; `precondition_hashes[i]` is the
|
|
15
|
+
* sha256 hex of `available_preconditions[i]`.
|
|
16
|
+
*/
|
|
17
|
+
export interface PreconditionSetPayload {
|
|
18
|
+
/** Sorted lexicographically. JCS-canonical preserves array order. */
|
|
19
|
+
readonly available_preconditions: readonly string[];
|
|
20
|
+
/** sha256 hex (64 lowercase chars) of each precondition string, same order. */
|
|
21
|
+
readonly precondition_hashes: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Class payload for candidate_set: which candidate actions were evaluated
|
|
25
|
+
* and which were eliminated, with elimination reasons. `elimination_reason`
|
|
26
|
+
* is REQUIRED when `eliminated === true` and MUST be omitted when
|
|
27
|
+
* `eliminated === false`.
|
|
28
|
+
*/
|
|
29
|
+
export interface CandidateSetPayload {
|
|
30
|
+
readonly evaluated_candidates: readonly EvaluatedCandidate[];
|
|
31
|
+
}
|
|
32
|
+
export interface EvaluatedCandidate {
|
|
33
|
+
/** sha256 hex of the candidate description. */
|
|
34
|
+
readonly candidate_ref: string;
|
|
35
|
+
readonly eliminated: boolean;
|
|
36
|
+
/** Required when eliminated, omitted otherwise. */
|
|
37
|
+
readonly elimination_reason?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Class payload for decision_path: the chosen path with confidence and
|
|
41
|
+
* the structured reasoning that selected it.
|
|
42
|
+
*/
|
|
43
|
+
export interface DecisionPathPayload {
|
|
44
|
+
/** sha256 hex of the chosen path description. */
|
|
45
|
+
readonly chosen_path_ref: string;
|
|
46
|
+
/** Two decimal places max, 0.00 through 1.00. */
|
|
47
|
+
readonly confidence: number;
|
|
48
|
+
/** sha256 hex of each reasoning step description, in evaluation order. */
|
|
49
|
+
readonly reasoning_chain_hashes: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Discriminated union of the three class-specific envelope shapes. The
|
|
53
|
+
* `class` field is the discriminator; `class_payload` is narrowed by it.
|
|
54
|
+
*/
|
|
55
|
+
export type CognitiveAttestationEnvelope = PreconditionSetEnvelope | CandidateSetEnvelope | DecisionPathEnvelope;
|
|
56
|
+
export interface PreconditionSetEnvelope extends CognitiveAttestationEnvelopeBase {
|
|
57
|
+
readonly class: 'precondition_set';
|
|
58
|
+
readonly class_payload: PreconditionSetPayload;
|
|
59
|
+
}
|
|
60
|
+
export interface CandidateSetEnvelope extends CognitiveAttestationEnvelopeBase {
|
|
61
|
+
readonly class: 'candidate_set';
|
|
62
|
+
readonly class_payload: CandidateSetPayload;
|
|
63
|
+
}
|
|
64
|
+
export interface DecisionPathEnvelope extends CognitiveAttestationEnvelopeBase {
|
|
65
|
+
readonly class: 'decision_path';
|
|
66
|
+
readonly class_payload: DecisionPathPayload;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Shared envelope shape. The signature is computed over the JCS-canonical
|
|
70
|
+
* form of the envelope with the `signature` field omitted, then attached.
|
|
71
|
+
*/
|
|
72
|
+
interface CognitiveAttestationEnvelopeBase {
|
|
73
|
+
readonly signal_type: CognitiveAttestationSignalType;
|
|
74
|
+
/** Ed25519 public key of the attestor, lowercase hex (64 chars). */
|
|
75
|
+
readonly agent_id: string;
|
|
76
|
+
/** sha256 hex of the decision description being attested. */
|
|
77
|
+
readonly decision_ref: string;
|
|
78
|
+
/** Unix epoch milliseconds at the moment of attestation. */
|
|
79
|
+
readonly timestamp_ms: number;
|
|
80
|
+
/** Ed25519 signature, lowercase hex (128 chars). Empty during signing. */
|
|
81
|
+
readonly signature: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Unsigned envelope shape: same fields as the signed envelope, minus the
|
|
85
|
+
* signature. The signing helper accepts this and returns a fully populated
|
|
86
|
+
* envelope.
|
|
87
|
+
*/
|
|
88
|
+
export type UnsignedCognitiveAttestationEnvelope = UnsignedPreconditionSetEnvelope | UnsignedCandidateSetEnvelope | UnsignedDecisionPathEnvelope;
|
|
89
|
+
export type UnsignedPreconditionSetEnvelope = Omit<PreconditionSetEnvelope, 'signature'>;
|
|
90
|
+
export type UnsignedCandidateSetEnvelope = Omit<CandidateSetEnvelope, 'signature'>;
|
|
91
|
+
export type UnsignedDecisionPathEnvelope = Omit<DecisionPathEnvelope, 'signature'>;
|
|
92
|
+
/**
|
|
93
|
+
* Result of verifying an envelope. `valid: false` carries a `reason`
|
|
94
|
+
* string naming the specific failure mode. Reasons:
|
|
95
|
+
* - INVALID_SIGNAL_TYPE: signal_type field is not the literal.
|
|
96
|
+
* - INVALID_CLASS: class field is not one of the v0.1 classes.
|
|
97
|
+
* - INVALID_AGENT_ID: agent_id is not 64 lowercase hex chars.
|
|
98
|
+
* - INVALID_SIGNATURE_FORMAT: signature is not 128 lowercase hex chars.
|
|
99
|
+
* - INVALID_PAYLOAD: class_payload shape does not match the declared class.
|
|
100
|
+
* - SIGNATURE_INVALID: Ed25519 verification failed.
|
|
101
|
+
*/
|
|
102
|
+
export interface CognitiveAttestationVerifyResult {
|
|
103
|
+
readonly valid: boolean;
|
|
104
|
+
readonly reason?: CognitiveAttestationVerifyReason;
|
|
105
|
+
}
|
|
106
|
+
export type CognitiveAttestationVerifyReason = 'INVALID_SIGNAL_TYPE' | 'INVALID_CLASS' | 'INVALID_AGENT_ID' | 'INVALID_SIGNATURE_FORMAT' | 'INVALID_PAYLOAD' | 'SIGNATURE_INVALID';
|
|
107
|
+
/**
|
|
108
|
+
* Runtime type guard. Returns true when `value` is structurally a signed
|
|
109
|
+
* cognitive_attestation envelope of any v0.1 class. Does NOT verify the
|
|
110
|
+
* signature; use `verifyCognitiveAttestation` for that.
|
|
111
|
+
*
|
|
112
|
+
* Invariants checked:
|
|
113
|
+
* - signal_type literal matches.
|
|
114
|
+
* - class is one of the three v0.1 values.
|
|
115
|
+
* - agent_id, signature, decision_ref are lowercase hex of the expected
|
|
116
|
+
* length.
|
|
117
|
+
* - class_payload is structurally consistent with the declared class.
|
|
118
|
+
* - timestamp_ms is a finite, non-negative integer.
|
|
119
|
+
*/
|
|
120
|
+
export declare function isCognitiveAttestation(value: unknown): value is CognitiveAttestationEnvelope;
|
|
121
|
+
/**
|
|
122
|
+
* Validate a precondition_set payload shape. Exported as helper for the
|
|
123
|
+
* verifier; not part of the public surface beyond the type guard.
|
|
124
|
+
*/
|
|
125
|
+
export declare function isPreconditionSetPayload(value: unknown): value is PreconditionSetPayload;
|
|
126
|
+
export declare function isCandidateSetPayload(value: unknown): value is CandidateSetPayload;
|
|
127
|
+
export declare function isDecisionPathPayload(value: unknown): value is DecisionPathPayload;
|
|
128
|
+
export {};
|
|
129
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/v2/cognitive_attestation/types.ts"],"names":[],"mappings":"AAuBA;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAEpE;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,kBAAkB,GAClB,eAAe,GACf,eAAe,CAAA;AAEnB;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,QAAQ,CAAC,uBAAuB,EAAE,SAAS,MAAM,EAAE,CAAA;IACnD,+EAA+E;IAC/E,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAA;CAChD;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,oBAAoB,EAAE,SAAS,kBAAkB,EAAE,CAAA;CAC7D;AAED,MAAM,WAAW,kBAAkB;IACjC,+CAA+C;IAC/C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAA;CACnD;AAED;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GACpC,uBAAuB,GACvB,oBAAoB,GACpB,oBAAoB,CAAA;AAExB,MAAM,WAAW,uBAAwB,SAAQ,gCAAgC;IAC/E,QAAQ,CAAC,KA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