@cello-protocol/protocol-types 0.0.2

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.
@@ -0,0 +1,362 @@
1
+ /**
2
+ * @cello-protocol/protocol-types — CELLO-CONNREQ-001
3
+ * Connection package wire types, CBOR encoding/decoding, and validation.
4
+ *
5
+ * ──── Phase P: Pseudocode ────
6
+ *
7
+ * Connection package structure (CBOR map):
8
+ * {
9
+ * pseudonym_binding: PseudonymBinding,
10
+ * endorsements: Endorsement[],
11
+ * attestations: Attestation[],
12
+ * }
13
+ *
14
+ * PseudonymBinding construction:
15
+ * 1. Validate pseudonym_label ≤ 64 UTF-8 bytes
16
+ * 2. Fetch ml_dsa_pubkey from keyProvider.getPublicKey()
17
+ * 3. Build TBS positional array:
18
+ * [pseudonym_label, k_local_pubkey, primary_pubkey, ml_dsa_pubkey, created_at]
19
+ * canonical CBOR per RFC 8949 §4.2.1 (Encoder({tagUint8Array: false}))
20
+ * 4. ml_dsa_signature = await keyProvider.sign(TBS_bytes) [ML-DSA, NIST FIPS 204]
21
+ * 5. Return PseudonymBinding with all six fields
22
+ *
23
+ * PseudonymBinding verification:
24
+ * 1. Rebuild TBS same as above (excluding ml_dsa_signature)
25
+ * 2. mlDsaVerify(ml_dsa_pubkey, TBS_bytes, ml_dsa_signature) → boolean
26
+ *
27
+ * Endorsement TBS = canonical CBOR of all fields except endorser_ml_dsa_signature:
28
+ * [endorser_pubkey, endorser_ml_dsa_pubkey, target_pubkey, endorsement_type,
29
+ * created_at, expires_at]
30
+ *
31
+ * Attestation TBS = canonical CBOR of all fields except attester_ml_dsa_signature:
32
+ * [attester_pubkey, attester_ml_dsa_pubkey, attestation_type, attestation_data,
33
+ * created_at, expires_at]
34
+ *
35
+ * Validation logic:
36
+ * 1. Verify pseudonym_binding signature → if invalid, return { valid: false, reason: 'pseudonym_binding_invalid' }
37
+ * 2. Validate pseudonym_label byte length → if > 64, return { valid: false, reason: 'pseudonym_label_too_long' }
38
+ * NOTE: label length is checked at build time; but validation also checks in case
39
+ * a tampered package is passed directly to validateConnectionPackage.
40
+ * 3. For each endorsement:
41
+ * a. Verify endorser_ml_dsa_signature → if invalid, mark 'signature_invalid'
42
+ * b. Else if expires_at <= current_timestamp_ms → mark 'expired'
43
+ * c. Else if target_pubkey ≠ sender_k_local_pubkey → mark 'target_mismatch'
44
+ * d. Else → mark 'valid'
45
+ * 4. For each attestation:
46
+ * a. Verify attester_ml_dsa_signature → if invalid, mark 'signature_invalid'
47
+ * b. Else if expires_at <= current_timestamp_ms → mark 'expired'
48
+ * c. Else → mark 'valid'
49
+ * 5. Return { valid: true, pseudonym_binding, endorsements: [...], attestations: [...] }
50
+ *
51
+ * IMPORTANT: Items 3 and 4 are per-item — a bad endorsement does NOT reject the package.
52
+ * Only a bad pseudonym_binding rejects the whole package.
53
+ *
54
+ * Canonical CBOR encoding (RFC 8949 §4.2.1):
55
+ * - All byte arrays as CBOR major-type-2 byte strings (tagUint8Array: false)
56
+ * - Integers use shortest encoding; BigInt for timestamps > 0xFFFFFFFF
57
+ * - Map keys are text strings in deterministic order (cbor-x preserves insertion order)
58
+ *
59
+ * References:
60
+ * RFC 8949 §4.2.1 — Core Deterministic Encoding Requirements
61
+ * NIST FIPS 204 — Module-Lattice-Based Digital Signature Standard (ML-DSA)
62
+ */
63
+ /**
64
+ * ML-DSA-44 key provider interface.
65
+ *
66
+ * Defined here (not imported from @cello-protocol/crypto) because protocol-types is a leaf
67
+ * package that @cello-protocol/crypto will import from, not the reverse.
68
+ *
69
+ * The crypto package's InMemoryMlDsaKeyProvider and FileMlDsaKeyProvider will
70
+ * implement this interface.
71
+ *
72
+ * Key sizes for ML-DSA-44 (NIST FIPS 204):
73
+ * - Public key: 1312 bytes
74
+ * - Signature: 2420 bytes
75
+ */
76
+ export interface MlDsaKeyProvider {
77
+ /** Returns the 1312-byte ML-DSA-44 public key. */
78
+ getPublicKey(): Promise<Uint8Array>;
79
+ /** Signs the message; returns a 2420-byte ML-DSA-44 signature. */
80
+ sign(message: Uint8Array): Promise<Uint8Array>;
81
+ }
82
+ /**
83
+ * Pseudonym binding: anchors the agent's pseudonym label to their cryptographic identity.
84
+ *
85
+ * ML-DSA signature is over canonical CBOR of:
86
+ * [pseudonym_label, k_local_pubkey, primary_pubkey, ml_dsa_pubkey, created_at]
87
+ * (positional array, same pattern as existing TBS arrays in this package)
88
+ *
89
+ * NIST FIPS 204 — ML-DSA-44
90
+ */
91
+ export interface PseudonymBinding {
92
+ /** Stable human-readable identity label; max 64 UTF-8 bytes. */
93
+ pseudonym_label: string;
94
+ /** 32-byte Ed25519 K_local public key of the agent. */
95
+ k_local_pubkey: Uint8Array;
96
+ /** FROST group public key of the agent (primary_pubkey from CONTEXT.md). */
97
+ primary_pubkey: Uint8Array;
98
+ /** 1312-byte ML-DSA-44 public key. */
99
+ ml_dsa_pubkey: Uint8Array;
100
+ /** Unix milliseconds when the binding was created. */
101
+ created_at: number;
102
+ /**
103
+ * 2420-byte ML-DSA-44 signature over canonical CBOR of:
104
+ * [pseudonym_label, k_local_pubkey, primary_pubkey, ml_dsa_pubkey, created_at]
105
+ */
106
+ ml_dsa_signature: Uint8Array;
107
+ }
108
+ /**
109
+ * Endorsement: a third-party voucher for the agent.
110
+ *
111
+ * ML-DSA signature is over canonical CBOR of all fields except endorser_ml_dsa_signature.
112
+ *
113
+ * NIST FIPS 204 — ML-DSA-44
114
+ */
115
+ export interface Endorsement {
116
+ /** 32-byte Ed25519 public key of the endorser. */
117
+ endorser_pubkey: Uint8Array;
118
+ /** 1312-byte ML-DSA-44 public key of the endorser. */
119
+ endorser_ml_dsa_pubkey: Uint8Array;
120
+ /**
121
+ * 32-byte Ed25519 public key this endorsement targets.
122
+ * Must match the sender's k_local_pubkey for 'valid' status.
123
+ */
124
+ target_pubkey: Uint8Array;
125
+ /** Endorsement type string (e.g. "peer_trust", "organizational"). */
126
+ endorsement_type: string;
127
+ /** Unix milliseconds when endorsement was created. */
128
+ created_at: number;
129
+ /** Unix milliseconds when endorsement expires. */
130
+ expires_at: number;
131
+ /**
132
+ * 2420-byte ML-DSA-44 signature over canonical CBOR of:
133
+ * [endorser_pubkey, endorser_ml_dsa_pubkey, target_pubkey, endorsement_type, created_at, expires_at]
134
+ */
135
+ endorser_ml_dsa_signature: Uint8Array;
136
+ }
137
+ /**
138
+ * Attestation: a self-describing claim about the agent.
139
+ *
140
+ * ML-DSA signature is over canonical CBOR of all fields except attester_ml_dsa_signature.
141
+ *
142
+ * NIST FIPS 204 — ML-DSA-44
143
+ */
144
+ export interface Attestation {
145
+ /** 32-byte Ed25519 public key of the attester. */
146
+ attester_pubkey: Uint8Array;
147
+ /** 1312-byte ML-DSA-44 public key of the attester. */
148
+ attester_ml_dsa_pubkey: Uint8Array;
149
+ /** Attestation type string (e.g. "capability", "audit_log"). */
150
+ attestation_type: string;
151
+ /** Opaque attestation payload bytes. */
152
+ attestation_data: Uint8Array;
153
+ /** Unix milliseconds when attestation was created. */
154
+ created_at: number;
155
+ /** Unix milliseconds when attestation expires. */
156
+ expires_at: number;
157
+ /**
158
+ * 2420-byte ML-DSA-44 signature over canonical CBOR of:
159
+ * [attester_pubkey, attester_ml_dsa_pubkey, attestation_type, attestation_data, created_at, expires_at]
160
+ */
161
+ attester_ml_dsa_signature: Uint8Array;
162
+ }
163
+ /**
164
+ * Full connection package presented during a connection request.
165
+ * Each agent decides how many endorsements/attestations to include; receivers
166
+ * cannot infer how many items were withheld.
167
+ */
168
+ export interface ConnectionPackage {
169
+ pseudonym_binding: PseudonymBinding;
170
+ endorsements: Endorsement[];
171
+ attestations: Attestation[];
172
+ }
173
+ /** Per-endorsement validation status. */
174
+ export type EndorsementValidationStatus = "valid" | "expired" | "signature_invalid" | "target_mismatch";
175
+ /** Per-attestation validation status. */
176
+ export type AttestationValidationStatus = "valid" | "expired" | "signature_invalid";
177
+ /** Endorsement annotated with its validation result. */
178
+ export interface ValidatedEndorsement extends Endorsement {
179
+ validation_status: EndorsementValidationStatus;
180
+ }
181
+ /** Attestation annotated with its validation result. */
182
+ export interface ValidatedAttestation extends Attestation {
183
+ validation_status: AttestationValidationStatus;
184
+ }
185
+ /** Result of validating a full connection package. */
186
+ export type PackageValidationResult = {
187
+ valid: true;
188
+ pseudonym_binding: PseudonymBinding;
189
+ endorsements: ValidatedEndorsement[];
190
+ attestations: ValidatedAttestation[];
191
+ } | {
192
+ valid: false;
193
+ reason: "pseudonym_binding_invalid" | "pseudonym_label_too_long";
194
+ };
195
+ /**
196
+ * Condition that can be applied to a signal requirement.
197
+ *
198
+ * - min_count: the signal must meet or exceed this count
199
+ * - min_age_days: the signal's age must be >= this many days (boundary-inclusive)
200
+ * - attestation_type: all listed types must have at least one valid attestation
201
+ * - from_shared_contact: M6 only — unsatisfiable in M3
202
+ */
203
+ export type SignalCondition = {
204
+ type: "min_count";
205
+ count: number;
206
+ } | {
207
+ type: "min_age_days";
208
+ days: number;
209
+ } | {
210
+ type: "attestation_type";
211
+ required: string[];
212
+ } | {
213
+ type: "from_shared_contact";
214
+ min: number;
215
+ };
216
+ /** A single signal requirement that must be satisfied by an incoming package. */
217
+ export type SignalRequirement = {
218
+ signal_type: "endorsement";
219
+ condition: SignalCondition;
220
+ } | {
221
+ signal_type: "attestation";
222
+ condition: SignalCondition;
223
+ } | {
224
+ signal_type: "pseudonym_age";
225
+ condition: SignalCondition;
226
+ } | {
227
+ signal_type: "registration_age";
228
+ condition: SignalCondition;
229
+ };
230
+ /**
231
+ * Policy governing how the agent evaluates incoming connection requests.
232
+ *
233
+ * mode:
234
+ * 'open' — accept all packages that pass structural validation (requirements ignored)
235
+ * 'closed' — reject all packages
236
+ * 'selective' — accept only packages that satisfy all requirements
237
+ * 'guarded' — identical to 'selective' in M3; M6 adds endorsement-from-shared-contact default
238
+ *
239
+ * review_mode:
240
+ * 'deterministic' — engine evaluates automatically; no agent involvement
241
+ * 'inference' — engine produces a ConnectionReport; agent makes the final decision
242
+ */
243
+ export interface ConnectionPolicy {
244
+ mode: "open" | "closed" | "selective" | "guarded";
245
+ review_mode: "deterministic" | "inference";
246
+ requirements: SignalRequirement[];
247
+ whitelist?: string[];
248
+ }
249
+ /**
250
+ * Context about the connection requester from the directory.
251
+ *
252
+ * Appended by the connection request flow (CONNREQ-001).
253
+ * In M3: conversation_count always 0, clean_close_rate always 1.0.
254
+ */
255
+ export interface DirectoryContext {
256
+ /** Unix ms timestamp when the agent registered with the directory. */
257
+ registered_at: number;
258
+ /** If true, the agent is provisional and cannot receive connections. */
259
+ is_provisional: boolean;
260
+ /** Number of completed conversations (always 0 in M3). */
261
+ conversation_count: number;
262
+ /** Rate of clean closes (always 1.0 in M3). */
263
+ clean_close_rate: number;
264
+ }
265
+ export type BuildPseudonymBindingResult = {
266
+ ok: true;
267
+ binding: PseudonymBinding;
268
+ } | {
269
+ ok: false;
270
+ reason: "pseudonym_label_too_long";
271
+ };
272
+ /** Maximum pseudonym_label size in UTF-8 bytes (AC-007, AC-008). */
273
+ export declare const MAX_PSEUDONYM_LABEL_BYTES = 64;
274
+ /** Expected ML-DSA-44 public key size in bytes (NIST FIPS 204). */
275
+ export declare const ML_DSA_PUBKEY_BYTES = 1312;
276
+ /** Expected ML-DSA-44 signature size in bytes (NIST FIPS 204). */
277
+ export declare const ML_DSA_SIGNATURE_BYTES = 2420;
278
+ /**
279
+ * Verify an ML-DSA-44 signature.
280
+ *
281
+ * This function is a thin wrapper that enables real ML-DSA verification once
282
+ * a native binding is available. Currently delegates to the provided verifier
283
+ * function — this indirection is necessary because protocol-types cannot import
284
+ * @cello-protocol/crypto (direction of the dependency would be inverted).
285
+ *
286
+ * Callers that need verification MUST supply a verifier. The default throws to
287
+ * prevent silent acceptance if the caller forgets to wire one in.
288
+ *
289
+ * For tests, pass the real node-oqs verify function directly.
290
+ */
291
+ export type MlDsaVerifier = (publicKey: Uint8Array, message: Uint8Array, signature: Uint8Array) => boolean;
292
+ /**
293
+ * Build a PseudonymBinding by signing with the MlDsaKeyProvider.
294
+ *
295
+ * SI-003 enforcement: callers supply a provider, not raw signature bytes.
296
+ * The type signature makes it impossible to inject a pre-computed signature.
297
+ *
298
+ * @param params - Binding fields (pseudonym_label, keys, created_at)
299
+ * @param mlDsaKeyProvider - ML-DSA key provider (private key never leaves the provider)
300
+ */
301
+ export declare function buildPseudonymBinding(params: {
302
+ pseudonym_label: string;
303
+ k_local_pubkey: Uint8Array;
304
+ primary_pubkey: Uint8Array;
305
+ ml_dsa_pubkey: Uint8Array;
306
+ created_at: number;
307
+ }, mlDsaKeyProvider: MlDsaKeyProvider): Promise<BuildPseudonymBindingResult>;
308
+ /**
309
+ * Verify a PseudonymBinding signature standalone.
310
+ *
311
+ * Exported so endorsement stripping tests (SI-002 pattern) can verify items
312
+ * outside of a full package.
313
+ */
314
+ export declare function verifyPseudonymBinding(binding: PseudonymBinding, mlDsaVerify: MlDsaVerifier): boolean;
315
+ /**
316
+ * Verify an Endorsement signature standalone.
317
+ *
318
+ * SI-002: each item independently verifiable outside of a package.
319
+ */
320
+ export declare function verifyEndorsement(endorsement: Endorsement, mlDsaVerify: MlDsaVerifier): boolean;
321
+ /**
322
+ * Verify an Attestation signature standalone.
323
+ *
324
+ * SI-002: each item independently verifiable outside of a package.
325
+ */
326
+ export declare function verifyAttestation(attestation: Attestation, mlDsaVerify: MlDsaVerifier): boolean;
327
+ /**
328
+ * Validate a ConnectionPackage.
329
+ *
330
+ * Validation rules:
331
+ * - Invalid pseudonym binding → whole package rejected, reason: 'pseudonym_binding_invalid'
332
+ * - Label > 64 UTF-8 bytes → whole package rejected, reason: 'pseudonym_label_too_long'
333
+ * - Per-endorsement: signature_invalid | expired | target_mismatch | valid
334
+ * - Per-attestation: signature_invalid | expired | valid
335
+ *
336
+ * SI-001: invalid pseudonym binding always rejects the package,
337
+ * regardless of endorsement/attestation validity.
338
+ *
339
+ * @param pkg - The connection package to validate
340
+ * @param sender_k_local_pubkey - Sender's K_local pubkey (for endorsement target check)
341
+ * @param current_timestamp_ms - Current time (for expiry checks)
342
+ * @param mlDsaVerify - ML-DSA verify function (injected to avoid circular deps)
343
+ */
344
+ export declare function validateConnectionPackage(pkg: ConnectionPackage, sender_k_local_pubkey: Uint8Array, current_timestamp_ms: number, mlDsaVerify: MlDsaVerifier): PackageValidationResult;
345
+ /**
346
+ * Encode a ConnectionPackage to canonical CBOR bytes.
347
+ *
348
+ * Wire format: CBOR map with keys: pseudonym_binding, endorsements, attestations.
349
+ * Each PseudonymBinding/Endorsement/Attestation is also a CBOR map.
350
+ * Timestamps use minimal encoding per RFC 8949 §4.2.1.
351
+ */
352
+ export declare function encodeConnectionPackage(pkg: ConnectionPackage): Uint8Array;
353
+ /**
354
+ * Decode a ConnectionPackage from CBOR bytes.
355
+ *
356
+ * Performs structural validation (field presence, types, sizes).
357
+ * Does NOT verify signatures — call validateConnectionPackage for that.
358
+ *
359
+ * @throws Error if the bytes cannot be decoded or are structurally invalid.
360
+ */
361
+ export declare function decodeConnectionPackage(bytes: Uint8Array): ConnectionPackage;
362
+ //# sourceMappingURL=connection-package.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection-package.d.ts","sourceRoot":"","sources":["../src/connection-package.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAKH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kDAAkD;IAClD,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,kEAAkE;IAClE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAChD;AAID;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAC;IACxB,uDAAuD;IACvD,cAAc,EAAE,UAAU,CAAC;IAC3B,4EAA4E;IAC5E,cAAc,EAAE,UAAU,CAAC;IAC3B,sCAAsC;IACtC,aAAa,E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