@kya-os/mcp 1.11.0 → 1.12.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 (103) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/CONFORMANCE.md +10 -8
  3. package/README.md +2 -2
  4. package/SPEC.md +23 -30
  5. package/dist/audit/index.d.ts +3 -0
  6. package/dist/audit/index.d.ts.map +1 -1
  7. package/dist/audit/index.js +3 -0
  8. package/dist/audit/index.js.map +1 -1
  9. package/dist/audit/read-contract.d.ts +445 -0
  10. package/dist/audit/read-contract.d.ts.map +1 -0
  11. package/dist/audit/read-contract.js +126 -0
  12. package/dist/audit/read-contract.js.map +1 -0
  13. package/dist/audit/read-service.d.ts +99 -0
  14. package/dist/audit/read-service.d.ts.map +1 -0
  15. package/dist/audit/read-service.js +124 -0
  16. package/dist/audit/read-service.js.map +1 -0
  17. package/dist/audit/reference-recorder.d.ts +43 -0
  18. package/dist/audit/reference-recorder.d.ts.map +1 -0
  19. package/dist/audit/reference-recorder.js +131 -0
  20. package/dist/audit/reference-recorder.js.map +1 -0
  21. package/dist/audit/schemas.d.ts +1 -0
  22. package/dist/audit/schemas.d.ts.map +1 -1
  23. package/dist/audit/schemas.js +1 -1
  24. package/dist/audit/schemas.js.map +1 -1
  25. package/dist/card/builder.d.ts +1 -1
  26. package/dist/card/builder.js +1 -1
  27. package/dist/card/emit.d.ts +3 -3
  28. package/dist/card/emit.d.ts.map +1 -1
  29. package/dist/card/emit.js.map +1 -1
  30. package/dist/card/index.d.ts +1 -1
  31. package/dist/card/index.js +1 -1
  32. package/dist/card/middleware.d.ts +6 -4
  33. package/dist/card/middleware.d.ts.map +1 -1
  34. package/dist/card/middleware.js +11 -7
  35. package/dist/card/middleware.js.map +1 -1
  36. package/dist/card/proof/build.d.ts +3 -3
  37. package/dist/card/proof/build.js +3 -3
  38. package/dist/card/proof/http-sig.d.ts +1 -1
  39. package/dist/card/proof/http-sig.js +1 -1
  40. package/dist/card/proof/index.d.ts +2 -2
  41. package/dist/card/proof/index.js +2 -2
  42. package/dist/card/proof/nonce-cache.d.ts +1 -1
  43. package/dist/card/proof/nonce-cache.js +1 -1
  44. package/dist/card/proof/types.d.ts +16 -7
  45. package/dist/card/proof/types.d.ts.map +1 -1
  46. package/dist/card/proof/types.js +16 -7
  47. package/dist/card/proof/types.js.map +1 -1
  48. package/dist/card/proof/verify.d.ts +2 -2
  49. package/dist/card/proof/verify.js +2 -2
  50. package/dist/card/schema.d.ts +14 -6
  51. package/dist/card/schema.d.ts.map +1 -1
  52. package/dist/card/schema.js +14 -3
  53. package/dist/card/schema.js.map +1 -1
  54. package/dist/card/verify.d.ts +1 -1
  55. package/dist/card/verify.d.ts.map +1 -1
  56. package/dist/delegation/vc-verification-checks.d.ts.map +1 -1
  57. package/dist/delegation/vc-verification-checks.js +16 -1
  58. package/dist/delegation/vc-verification-checks.js.map +1 -1
  59. package/dist/extension/declaration.d.ts +60 -0
  60. package/dist/extension/declaration.d.ts.map +1 -0
  61. package/dist/extension/declaration.js +75 -0
  62. package/dist/extension/declaration.js.map +1 -0
  63. package/dist/extension/gate.d.ts +110 -0
  64. package/dist/extension/gate.d.ts.map +1 -0
  65. package/dist/extension/gate.js +133 -0
  66. package/dist/extension/gate.js.map +1 -0
  67. package/dist/extension/index.d.ts +14 -0
  68. package/dist/extension/index.d.ts.map +1 -0
  69. package/dist/extension/index.js +14 -0
  70. package/dist/extension/index.js.map +1 -0
  71. package/dist/extension/settings.d.ts +70 -0
  72. package/dist/extension/settings.d.ts.map +1 -0
  73. package/dist/extension/settings.js +96 -0
  74. package/dist/extension/settings.js.map +1 -0
  75. package/dist/index.d.ts +2 -1
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +3 -1
  78. package/dist/index.js.map +1 -1
  79. package/dist/middleware/kya-os-transport.d.ts +1 -1
  80. package/dist/middleware/kya-os-transport.js +1 -1
  81. package/dist/middleware/with-kya-os.delegation-verify.d.ts.map +1 -1
  82. package/dist/middleware/with-kya-os.delegation-verify.js +2 -2
  83. package/dist/middleware/with-kya-os.delegation-verify.js.map +1 -1
  84. package/dist/proof/generator.d.ts +14 -2
  85. package/dist/proof/generator.d.ts.map +1 -1
  86. package/dist/proof/generator.js +14 -2
  87. package/dist/proof/generator.js.map +1 -1
  88. package/dist/proof/index.d.ts +1 -1
  89. package/dist/proof/index.d.ts.map +1 -1
  90. package/dist/proof/index.js +1 -1
  91. package/dist/proof/index.js.map +1 -1
  92. package/dist/proof/verifier.d.ts +3 -2
  93. package/dist/proof/verifier.d.ts.map +1 -1
  94. package/dist/proof/verifier.js +13 -8
  95. package/dist/proof/verifier.js.map +1 -1
  96. package/dist/types/protocol.d.ts +22 -0
  97. package/dist/types/protocol.d.ts.map +1 -1
  98. package/dist/types/protocol.js +31 -5
  99. package/dist/types/protocol.js.map +1 -1
  100. package/package.json +1 -1
  101. package/schemas/README.md +1 -0
  102. package/schemas/kya-os-card.schema.json +6 -6
  103. package/schemas/mcp-extension-settings.json +37 -0
@@ -0,0 +1,445 @@
1
+ import { z } from 'zod';
2
+ import { type AuditReadEntriesPage } from './read-service.js';
3
+ import type { AuditBundleConsistencyProofV1, AuditBundleInclusionProofV1, AuditHead, AuditLedgerRef, DecimalString, SignedAuditEntryV1 } from './types.js';
4
+ /**
5
+ * Network wire contract for the operator-facing audit READ/replay API - the
6
+ * request and response envelopes an HTTP or RPC transport carries. Each
7
+ * envelope is schema-tagged (like the producer event and recorder receipt) so
8
+ * versioning and validation are explicit at the boundary. Responses embed the
9
+ * recorder's own signed artifacts, so a client validates the envelope here and
10
+ * then re-verifies the artifacts with {@link AuditArtifactVerifier}.
11
+ */
12
+ export declare const AUDIT_HEAD_REQUEST_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/head-request/v1.0.0";
13
+ export declare const AUDIT_HEAD_RESPONSE_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/head-response/v1.0.0";
14
+ export declare const AUDIT_LIST_ENTRIES_REQUEST_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/list-entries-request/v1.0.0";
15
+ export declare const AUDIT_LIST_ENTRIES_RESPONSE_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/list-entries-response/v1.0.0";
16
+ export declare const AUDIT_INCLUSION_PROOF_REQUEST_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-request/v1.0.0";
17
+ export declare const AUDIT_INCLUSION_PROOF_RESPONSE_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-response/v1.0.0";
18
+ export declare const AUDIT_CONSISTENCY_PROOF_REQUEST_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/consistency-proof-request/v1.0.0";
19
+ export declare const AUDIT_CONSISTENCY_PROOF_RESPONSE_SCHEMA_ID: "https://schema.kya-os.org/v1/protocol/audit/consistency-proof-response/v1.0.0";
20
+ export declare const auditHeadSchema: z.ZodObject<{
21
+ ledgerId: z.ZodString;
22
+ ledgerEpochId: z.ZodString;
23
+ sequence: z.ZodString;
24
+ entryDigest: z.ZodString;
25
+ }, z.core.$strict>;
26
+ export interface AuditHeadRequestV1 {
27
+ schema: typeof AUDIT_HEAD_REQUEST_SCHEMA_ID;
28
+ ledger: AuditLedgerRef;
29
+ }
30
+ export interface AuditHeadResponseV1 {
31
+ schema: typeof AUDIT_HEAD_RESPONSE_SCHEMA_ID;
32
+ head: AuditHead | null;
33
+ }
34
+ export declare const auditHeadRequestSchema: z.ZodObject<{
35
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/head-request/v1.0.0">;
36
+ ledger: z.ZodObject<{
37
+ ledgerId: z.ZodString;
38
+ ledgerEpochId: z.ZodString;
39
+ }, z.core.$strict>;
40
+ }, z.core.$strict>;
41
+ export declare const auditHeadResponseSchema: z.ZodObject<{
42
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/head-response/v1.0.0">;
43
+ head: z.ZodNullable<z.ZodObject<{
44
+ ledgerId: z.ZodString;
45
+ ledgerEpochId: z.ZodString;
46
+ sequence: z.ZodString;
47
+ entryDigest: z.ZodString;
48
+ }, z.core.$strict>>;
49
+ }, z.core.$strict>;
50
+ export interface AuditListEntriesRequestV1 {
51
+ schema: typeof AUDIT_LIST_ENTRIES_REQUEST_SCHEMA_ID;
52
+ ledger: AuditLedgerRef;
53
+ afterSequence?: DecimalString;
54
+ limit?: number;
55
+ }
56
+ export interface AuditListEntriesResponseV1 {
57
+ schema: typeof AUDIT_LIST_ENTRIES_RESPONSE_SCHEMA_ID;
58
+ entries: SignedAuditEntryV1[];
59
+ head: AuditHead | null;
60
+ nextAfterSequence: DecimalString | null;
61
+ }
62
+ export declare const auditListEntriesRequestSchema: z.ZodObject<{
63
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/list-entries-request/v1.0.0">;
64
+ ledger: z.ZodObject<{
65
+ ledgerId: z.ZodString;
66
+ ledgerEpochId: z.ZodString;
67
+ }, z.core.$strict>;
68
+ afterSequence: z.ZodOptional<z.ZodString>;
69
+ limit: z.ZodOptional<z.ZodNumber>;
70
+ }, z.core.$strict>;
71
+ export declare const auditListEntriesResponseSchema: z.ZodObject<{
72
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/list-entries-response/v1.0.0">;
73
+ entries: z.ZodArray<z.ZodObject<{
74
+ core: z.ZodObject<{
75
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/entry/v1.0.0">;
76
+ ledgerId: z.ZodString;
77
+ ledgerEpochId: z.ZodString;
78
+ sequence: z.ZodString;
79
+ previousEntryDigest: z.ZodNullable<z.ZodString>;
80
+ recordedAt: z.ZodNumber;
81
+ recorder: z.ZodObject<{
82
+ did: z.ZodString;
83
+ kid: z.ZodString;
84
+ alg: z.ZodEnum<{
85
+ EdDSA: "EdDSA";
86
+ ES256: "ES256";
87
+ }>;
88
+ }, z.core.$strict>;
89
+ eventDigest: z.ZodString;
90
+ event: z.ZodObject<{
91
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/event/v1.0.0">;
92
+ eventId: z.ZodString;
93
+ eventType: z.ZodEnum<{
94
+ "session.established": "session.established";
95
+ "session.rejected": "session.rejected";
96
+ "session.expired": "session.expired";
97
+ "session.replay_rejected": "session.replay_rejected";
98
+ "tool.call.started": "tool.call.started";
99
+ "tool.call.completed": "tool.call.completed";
100
+ "tool.call.failed": "tool.call.failed";
101
+ "tool.call.denied": "tool.call.denied";
102
+ "tool.call.challenged": "tool.call.challenged";
103
+ "proof.generated": "proof.generated";
104
+ "proof.verified": "proof.verified";
105
+ "proof.rejected": "proof.rejected";
106
+ "delegation.issued": "delegation.issued";
107
+ "delegation.verified": "delegation.verified";
108
+ "delegation.rejected": "delegation.rejected";
109
+ "delegation.revoked": "delegation.revoked";
110
+ "delegation.cascade_revoked": "delegation.cascade_revoked";
111
+ "delegation.outbound_attached": "delegation.outbound_attached";
112
+ "authorization.evaluated": "authorization.evaluated";
113
+ "authorization.approved": "authorization.approved";
114
+ "authorization.denied": "authorization.denied";
115
+ "authorization.step_up_required": "authorization.step_up_required";
116
+ "grant.used": "grant.used";
117
+ "consent.requested": "consent.requested";
118
+ "consent.approved": "consent.approved";
119
+ "consent.denied": "consent.denied";
120
+ "credential.required": "credential.required";
121
+ "credential.verified": "credential.verified";
122
+ "credential.failed": "credential.failed";
123
+ "key.rotated": "key.rotated";
124
+ "policy.changed": "policy.changed";
125
+ "configuration.changed": "configuration.changed";
126
+ "integrity_suite.transitioned": "integrity_suite.transitioned";
127
+ "ledger.epoch.started": "ledger.epoch.started";
128
+ "ledger.epoch.transitioned": "ledger.epoch.transitioned";
129
+ "checkpoint.created": "checkpoint.created";
130
+ "checkpoint.anchored": "checkpoint.anchored";
131
+ "checkpoint.anchor_failed": "checkpoint.anchor_failed";
132
+ "evidence.disposed": "evidence.disposed";
133
+ "projection.reconciled": "projection.reconciled";
134
+ "audit.source_high_water": "audit.source_high_water";
135
+ "audit.accessed": "audit.accessed";
136
+ "audit.exported": "audit.exported";
137
+ "legal_hold.applied": "legal_hold.applied";
138
+ "retention.executed": "retention.executed";
139
+ }>;
140
+ eventVersion: z.ZodLiteral<"1.0.0">;
141
+ binding: z.ZodString;
142
+ occurredAt: z.ZodNumber;
143
+ tenantRef: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
144
+ source: z.ZodObject<{
145
+ producer: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
146
+ sourceId: z.ZodString;
147
+ sourceSequence: z.ZodOptional<z.ZodString>;
148
+ previousSourceEventDigest: z.ZodOptional<z.ZodString>;
149
+ }, z.core.$strict>;
150
+ correlationId: z.ZodOptional<z.ZodString>;
151
+ causationId: z.ZodOptional<z.ZodString>;
152
+ trace: z.ZodOptional<z.ZodObject<{
153
+ traceId: z.ZodOptional<z.ZodString>;
154
+ spanId: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strict>>;
156
+ session: z.ZodOptional<z.ZodObject<{
157
+ ref: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
158
+ handshakeNonceCommitment: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strict>>;
160
+ actor: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
161
+ responsibleParty: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
162
+ resource: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
163
+ action: z.ZodObject<{
164
+ category: z.ZodString;
165
+ name: z.ZodOptional<z.ZodString>;
166
+ detailRef: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
167
+ }, z.core.$strict>;
168
+ outcome: z.ZodEnum<{
169
+ denied: "denied";
170
+ unknown: "unknown";
171
+ failed: "failed";
172
+ challenged: "challenged";
173
+ succeeded: "succeeded";
174
+ }>;
175
+ reason: z.ZodOptional<z.ZodObject<{
176
+ code: z.ZodString;
177
+ detailRef: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
178
+ }, z.core.$strict>>;
179
+ authorization: z.ZodOptional<z.ZodObject<{
180
+ source: z.ZodEnum<{
181
+ delegation: "delegation";
182
+ anonymous: "anonymous";
183
+ grant: "grant";
184
+ policy: "policy";
185
+ }>;
186
+ decision: z.ZodEnum<{
187
+ needs_authorization: "needs_authorization";
188
+ allowed: "allowed";
189
+ denied: "denied";
190
+ step_up_required: "step_up_required";
191
+ }>;
192
+ scopeId: z.ZodOptional<z.ZodString>;
193
+ delegationRef: z.ZodOptional<z.ZodString>;
194
+ delegationCredentialDigest: z.ZodOptional<z.ZodString>;
195
+ delegationChainDigests: z.ZodOptional<z.ZodArray<z.ZodString>>;
196
+ statusEvidence: z.ZodOptional<z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
197
+ grantRef: z.ZodOptional<z.ZodString>;
198
+ policyId: z.ZodOptional<z.ZodString>;
199
+ policyVersion: z.ZodOptional<z.ZodString>;
200
+ policyDigest: z.ZodOptional<z.ZodString>;
201
+ verificationCode: z.ZodOptional<z.ZodString>;
202
+ }, z.core.$strict>>;
203
+ proof: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
204
+ evidence: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
205
+ details: z.ZodDiscriminatedUnion<readonly [z.ZodObject<{
206
+ family: z.ZodLiteral<"session">;
207
+ phase: z.ZodEnum<{
208
+ expired: "expired";
209
+ established: "established";
210
+ rejected: "rejected";
211
+ replay_rejected: "replay_rejected";
212
+ }>;
213
+ reasonCode: z.ZodOptional<z.ZodString>;
214
+ }, z.core.$strict>, z.ZodObject<{
215
+ family: z.ZodLiteral<"tool">;
216
+ phase: z.ZodEnum<{
217
+ denied: "denied";
218
+ started: "started";
219
+ completed: "completed";
220
+ failed: "failed";
221
+ challenged: "challenged";
222
+ }>;
223
+ attempt: z.ZodString;
224
+ idempotencyRef: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strict>, z.ZodObject<{
226
+ family: z.ZodLiteral<"proof">;
227
+ phase: z.ZodEnum<{
228
+ rejected: "rejected";
229
+ generated: "generated";
230
+ verified: "verified";
231
+ }>;
232
+ proofDigest: z.ZodOptional<z.ZodString>;
233
+ verificationCode: z.ZodOptional<z.ZodString>;
234
+ }, z.core.$strict>, z.ZodObject<{
235
+ family: z.ZodLiteral<"delegation">;
236
+ phase: z.ZodEnum<{
237
+ revoked: "revoked";
238
+ rejected: "rejected";
239
+ verified: "verified";
240
+ issued: "issued";
241
+ cascade_revoked: "cascade_revoked";
242
+ outbound_attached: "outbound_attached";
243
+ }>;
244
+ delegationRef: z.ZodString;
245
+ parentRef: z.ZodOptional<z.ZodString>;
246
+ statusEvidence: z.ZodOptional<z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
247
+ }, z.core.$strict>, z.ZodObject<{
248
+ family: z.ZodLiteral<"authorization">;
249
+ phase: z.ZodEnum<{
250
+ denied: "denied";
251
+ step_up_required: "step_up_required";
252
+ evaluated: "evaluated";
253
+ approved: "approved";
254
+ grant_used: "grant_used";
255
+ }>;
256
+ policyDigest: z.ZodOptional<z.ZodString>;
257
+ grantRef: z.ZodOptional<z.ZodString>;
258
+ }, z.core.$strict>, z.ZodObject<{
259
+ family: z.ZodLiteral<"consent">;
260
+ phase: z.ZodEnum<{
261
+ denied: "denied";
262
+ approved: "approved";
263
+ requested: "requested";
264
+ credential_required: "credential_required";
265
+ credential_verified: "credential_verified";
266
+ credential_failed: "credential_failed";
267
+ }>;
268
+ consentRef: z.ZodOptional<z.ZodString>;
269
+ }, z.core.$strict>, z.ZodObject<{
270
+ family: z.ZodLiteral<"key">;
271
+ phase: z.ZodEnum<{
272
+ rotated: "rotated";
273
+ policy_changed: "policy_changed";
274
+ configuration_changed: "configuration_changed";
275
+ integrity_suite_transitioned: "integrity_suite_transitioned";
276
+ }>;
277
+ previousSigner: z.ZodOptional<z.ZodObject<{
278
+ did: z.ZodString;
279
+ kid: z.ZodString;
280
+ alg: z.ZodEnum<{
281
+ EdDSA: "EdDSA";
282
+ ES256: "ES256";
283
+ }>;
284
+ }, z.core.$strict>>;
285
+ nextSigner: z.ZodOptional<z.ZodObject<{
286
+ did: z.ZodString;
287
+ kid: z.ZodString;
288
+ alg: z.ZodEnum<{
289
+ EdDSA: "EdDSA";
290
+ ES256: "ES256";
291
+ }>;
292
+ }, z.core.$strict>>;
293
+ configurationDigest: z.ZodOptional<z.ZodString>;
294
+ }, z.core.$strict>, z.ZodObject<{
295
+ family: z.ZodLiteral<"ledger">;
296
+ phase: z.ZodEnum<{
297
+ epoch_started: "epoch_started";
298
+ epoch_transitioned: "epoch_transitioned";
299
+ checkpoint_created: "checkpoint_created";
300
+ checkpoint_anchored: "checkpoint_anchored";
301
+ checkpoint_anchor_failed: "checkpoint_anchor_failed";
302
+ evidence_disposed: "evidence_disposed";
303
+ projection_reconciled: "projection_reconciled";
304
+ }>;
305
+ checkpointDigest: z.ZodOptional<z.ZodString>;
306
+ previousEpochId: z.ZodOptional<z.ZodString>;
307
+ previousTerminalCheckpointDigest: z.ZodOptional<z.ZodString>;
308
+ successorEpochIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
309
+ targetEvidenceRef: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
310
+ }, z.core.$strict>, z.ZodObject<{
311
+ family: z.ZodLiteral<"administration">;
312
+ phase: z.ZodEnum<{
313
+ source_high_water: "source_high_water";
314
+ accessed: "accessed";
315
+ exported: "exported";
316
+ legal_hold_applied: "legal_hold_applied";
317
+ retention_executed: "retention_executed";
318
+ }>;
319
+ purpose: z.ZodOptional<z.ZodString>;
320
+ sourceSequence: z.ZodOptional<z.ZodString>;
321
+ selectionDigest: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strict>], "family">;
323
+ privacy: z.ZodObject<{
324
+ classification: z.ZodEnum<{
325
+ public: "public";
326
+ internal: "internal";
327
+ confidential: "confidential";
328
+ restricted: "restricted";
329
+ }>;
330
+ retentionClass: z.ZodString;
331
+ legalHold: z.ZodOptional<z.ZodString>;
332
+ }, z.core.$strict>;
333
+ }, z.core.$strict>;
334
+ evidenceManifestDigest: z.ZodString;
335
+ integritySuite: z.ZodLiteral<"KYA-AUDIT-JCS-SHA256-JWS-2026">;
336
+ }, z.core.$strict>;
337
+ eventDigest: z.ZodString;
338
+ entryDigest: z.ZodString;
339
+ recorderReceipt: z.ZodObject<{
340
+ core: z.ZodObject<{
341
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/receipt/v1.0.0">;
342
+ ledgerId: z.ZodString;
343
+ ledgerEpochId: z.ZodString;
344
+ sequence: z.ZodString;
345
+ eventId: z.ZodString;
346
+ entryDigest: z.ZodString;
347
+ previousEntryDigest: z.ZodNullable<z.ZodString>;
348
+ recordedAt: z.ZodNumber;
349
+ recorder: z.ZodObject<{
350
+ did: z.ZodString;
351
+ kid: z.ZodString;
352
+ alg: z.ZodEnum<{
353
+ EdDSA: "EdDSA";
354
+ ES256: "ES256";
355
+ }>;
356
+ }, z.core.$strict>;
357
+ integritySuite: z.ZodLiteral<"KYA-AUDIT-JCS-SHA256-JWS-2026">;
358
+ }, z.core.$strict>;
359
+ jws: z.ZodString;
360
+ }, z.core.$strict>;
361
+ }, z.core.$strict>>;
362
+ head: z.ZodNullable<z.ZodObject<{
363
+ ledgerId: z.ZodString;
364
+ ledgerEpochId: z.ZodString;
365
+ sequence: z.ZodString;
366
+ entryDigest: z.ZodString;
367
+ }, z.core.$strict>>;
368
+ nextAfterSequence: z.ZodNullable<z.ZodString>;
369
+ }, z.core.$strict>;
370
+ export interface AuditInclusionProofRequestV1 {
371
+ schema: typeof AUDIT_INCLUSION_PROOF_REQUEST_SCHEMA_ID;
372
+ ledger: AuditLedgerRef;
373
+ sequence: DecimalString;
374
+ }
375
+ export interface AuditInclusionProofResponseV1 {
376
+ schema: typeof AUDIT_INCLUSION_PROOF_RESPONSE_SCHEMA_ID;
377
+ proof: AuditBundleInclusionProofV1;
378
+ }
379
+ export declare const auditInclusionProofRequestSchema: z.ZodObject<{
380
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-request/v1.0.0">;
381
+ ledger: z.ZodObject<{
382
+ ledgerId: z.ZodString;
383
+ ledgerEpochId: z.ZodString;
384
+ }, z.core.$strict>;
385
+ sequence: z.ZodString;
386
+ }, z.core.$strict>;
387
+ export declare const auditInclusionProofResponseSchema: z.ZodObject<{
388
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-response/v1.0.0">;
389
+ proof: z.ZodObject<{
390
+ ledgerId: z.ZodString;
391
+ ledgerEpochId: z.ZodString;
392
+ sequence: z.ZodString;
393
+ entryDigest: z.ZodString;
394
+ checkpointDigest: z.ZodString;
395
+ proof: z.ZodObject<{
396
+ leafIndex: z.ZodString;
397
+ treeSize: z.ZodString;
398
+ auditPath: z.ZodArray<z.ZodString>;
399
+ }, z.core.$strict>;
400
+ }, z.core.$strict>;
401
+ }, z.core.$strict>;
402
+ export interface AuditConsistencyProofRequestV1 {
403
+ schema: typeof AUDIT_CONSISTENCY_PROOF_REQUEST_SCHEMA_ID;
404
+ ledger: AuditLedgerRef;
405
+ oldTreeSize: DecimalString;
406
+ }
407
+ export interface AuditConsistencyProofResponseV1 {
408
+ schema: typeof AUDIT_CONSISTENCY_PROOF_RESPONSE_SCHEMA_ID;
409
+ proof: AuditBundleConsistencyProofV1;
410
+ }
411
+ export declare const auditConsistencyProofRequestSchema: z.ZodObject<{
412
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/consistency-proof-request/v1.0.0">;
413
+ ledger: z.ZodObject<{
414
+ ledgerId: z.ZodString;
415
+ ledgerEpochId: z.ZodString;
416
+ }, z.core.$strict>;
417
+ oldTreeSize: z.ZodString;
418
+ }, z.core.$strict>;
419
+ export declare const auditConsistencyProofResponseSchema: z.ZodObject<{
420
+ schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/consistency-proof-response/v1.0.0">;
421
+ proof: z.ZodObject<{
422
+ ledgerId: z.ZodString;
423
+ ledgerEpochId: z.ZodString;
424
+ oldCheckpointDigest: z.ZodString;
425
+ newCheckpointDigest: z.ZodString;
426
+ proof: z.ZodObject<{
427
+ oldTreeSize: z.ZodString;
428
+ newTreeSize: z.ZodString;
429
+ auditPath: z.ZodArray<z.ZodString>;
430
+ }, z.core.$strict>;
431
+ }, z.core.$strict>;
432
+ }, z.core.$strict>;
433
+ export declare function parseAuditHeadRequest(input: unknown): AuditHeadRequestV1;
434
+ export declare function parseAuditHeadResponse(input: unknown): AuditHeadResponseV1;
435
+ export declare function parseAuditListEntriesRequest(input: unknown): AuditListEntriesRequestV1;
436
+ export declare function parseAuditListEntriesResponse(input: unknown): AuditListEntriesResponseV1;
437
+ export declare function parseAuditInclusionProofRequest(input: unknown): AuditInclusionProofRequestV1;
438
+ export declare function parseAuditInclusionProofResponse(input: unknown): AuditInclusionProofResponseV1;
439
+ export declare function parseAuditConsistencyProofRequest(input: unknown): AuditConsistencyProofRequestV1;
440
+ export declare function parseAuditConsistencyProofResponse(input: unknown): AuditConsistencyProofResponseV1;
441
+ export declare function toAuditHeadResponse(head: AuditHead | null): AuditHeadResponseV1;
442
+ export declare function toAuditListEntriesResponse(page: AuditReadEntriesPage): AuditListEntriesResponseV1;
443
+ export declare function toAuditInclusionProofResponse(proof: AuditBundleInclusionProofV1): AuditInclusionProofResponseV1;
444
+ export declare function toAuditConsistencyProofResponse(proof: AuditBundleConsistencyProofV1): AuditConsistencyProofResponseV1;
445
+ //# sourceMappingURL=read-contract.d.ts.map
@@ -0,0 +1 @@
1
+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ED,eAAO,MAAM,kCAAkC;;;;;;;kBAIpC,CAAC;AAEZ,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;kBAGrC,CAAC;AAMZ,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAExE;AACD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAE1E;AACD,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CAEtF;AACD,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAExF;AACD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,4BAA4B,CAE5F;AACD,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,6BAA6B,CAE9F;AACD,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,8BAA8B,CAEhG;AACD,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,OAAO,GAAG,+BAA+B,CAElG;AAOD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,mBAAmB,CAE/E;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,oBAAoB,GAAG,0BAA0B,CAOjG;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,2BAA2B,GACjC,6BAA6B,CAE/B;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,6BAA6B,GACnC,+BAA+B,CAEjC"}
@@ -0,0 +1,126 @@
1
+ import { z } from 'zod';
2
+ import { auditBundleConsistencyProofSchema, auditBundleInclusionProofSchema, decimalStringSchema, digestSchema, signedAuditEntrySchema, } from './schemas.js';
3
+ import { MAX_READ_ENTRIES_LIMIT } from './read-service.js';
4
+ /**
5
+ * Network wire contract for the operator-facing audit READ/replay API - the
6
+ * request and response envelopes an HTTP or RPC transport carries. Each
7
+ * envelope is schema-tagged (like the producer event and recorder receipt) so
8
+ * versioning and validation are explicit at the boundary. Responses embed the
9
+ * recorder's own signed artifacts, so a client validates the envelope here and
10
+ * then re-verifies the artifacts with {@link AuditArtifactVerifier}.
11
+ */
12
+ export const AUDIT_HEAD_REQUEST_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/head-request/v1.0.0';
13
+ export const AUDIT_HEAD_RESPONSE_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/head-response/v1.0.0';
14
+ export const AUDIT_LIST_ENTRIES_REQUEST_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/list-entries-request/v1.0.0';
15
+ export const AUDIT_LIST_ENTRIES_RESPONSE_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/list-entries-response/v1.0.0';
16
+ export const AUDIT_INCLUSION_PROOF_REQUEST_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-request/v1.0.0';
17
+ export const AUDIT_INCLUSION_PROOF_RESPONSE_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/inclusion-proof-response/v1.0.0';
18
+ export const AUDIT_CONSISTENCY_PROOF_REQUEST_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/consistency-proof-request/v1.0.0';
19
+ export const AUDIT_CONSISTENCY_PROOF_RESPONSE_SCHEMA_ID = 'https://schema.kya-os.org/v1/protocol/audit/consistency-proof-response/v1.0.0';
20
+ // ---------------------------------------------------------------------------
21
+ // Shared primitives
22
+ // ---------------------------------------------------------------------------
23
+ const ledgerRefSchema = z.object({
24
+ ledgerId: z.string().min(1).max(256),
25
+ ledgerEpochId: z.string().min(1).max(256),
26
+ }).strict();
27
+ export const auditHeadSchema = z.object({
28
+ ledgerId: z.string().min(1).max(256),
29
+ ledgerEpochId: z.string().min(1).max(256),
30
+ sequence: decimalStringSchema,
31
+ entryDigest: digestSchema,
32
+ }).strict();
33
+ function deepFreeze(value) {
34
+ if (typeof value !== 'object' || value === null || Object.isFrozen(value))
35
+ return value;
36
+ for (const child of Object.values(value))
37
+ deepFreeze(child);
38
+ return Object.freeze(value);
39
+ }
40
+ export const auditHeadRequestSchema = z.object({
41
+ schema: z.literal(AUDIT_HEAD_REQUEST_SCHEMA_ID),
42
+ ledger: ledgerRefSchema,
43
+ }).strict();
44
+ export const auditHeadResponseSchema = z.object({
45
+ schema: z.literal(AUDIT_HEAD_RESPONSE_SCHEMA_ID),
46
+ head: auditHeadSchema.nullable(),
47
+ }).strict();
48
+ export const auditListEntriesRequestSchema = z.object({
49
+ schema: z.literal(AUDIT_LIST_ENTRIES_REQUEST_SCHEMA_ID),
50
+ ledger: ledgerRefSchema,
51
+ afterSequence: decimalStringSchema.optional(),
52
+ limit: z.number().int().positive().max(MAX_READ_ENTRIES_LIMIT).optional(),
53
+ }).strict();
54
+ export const auditListEntriesResponseSchema = z.object({
55
+ schema: z.literal(AUDIT_LIST_ENTRIES_RESPONSE_SCHEMA_ID),
56
+ entries: z.array(signedAuditEntrySchema),
57
+ head: auditHeadSchema.nullable(),
58
+ nextAfterSequence: decimalStringSchema.nullable(),
59
+ }).strict();
60
+ export const auditInclusionProofRequestSchema = z.object({
61
+ schema: z.literal(AUDIT_INCLUSION_PROOF_REQUEST_SCHEMA_ID),
62
+ ledger: ledgerRefSchema,
63
+ sequence: decimalStringSchema,
64
+ }).strict();
65
+ export const auditInclusionProofResponseSchema = z.object({
66
+ schema: z.literal(AUDIT_INCLUSION_PROOF_RESPONSE_SCHEMA_ID),
67
+ proof: auditBundleInclusionProofSchema,
68
+ }).strict();
69
+ export const auditConsistencyProofRequestSchema = z.object({
70
+ schema: z.literal(AUDIT_CONSISTENCY_PROOF_REQUEST_SCHEMA_ID),
71
+ ledger: ledgerRefSchema,
72
+ oldTreeSize: decimalStringSchema,
73
+ }).strict();
74
+ export const auditConsistencyProofResponseSchema = z.object({
75
+ schema: z.literal(AUDIT_CONSISTENCY_PROOF_RESPONSE_SCHEMA_ID),
76
+ proof: auditBundleConsistencyProofSchema,
77
+ }).strict();
78
+ // ---------------------------------------------------------------------------
79
+ // Parsers - validate untrusted wire input, then freeze.
80
+ // ---------------------------------------------------------------------------
81
+ export function parseAuditHeadRequest(input) {
82
+ return deepFreeze(auditHeadRequestSchema.parse(input));
83
+ }
84
+ export function parseAuditHeadResponse(input) {
85
+ return deepFreeze(auditHeadResponseSchema.parse(input));
86
+ }
87
+ export function parseAuditListEntriesRequest(input) {
88
+ return deepFreeze(auditListEntriesRequestSchema.parse(input));
89
+ }
90
+ export function parseAuditListEntriesResponse(input) {
91
+ return deepFreeze(auditListEntriesResponseSchema.parse(input));
92
+ }
93
+ export function parseAuditInclusionProofRequest(input) {
94
+ return deepFreeze(auditInclusionProofRequestSchema.parse(input));
95
+ }
96
+ export function parseAuditInclusionProofResponse(input) {
97
+ return deepFreeze(auditInclusionProofResponseSchema.parse(input));
98
+ }
99
+ export function parseAuditConsistencyProofRequest(input) {
100
+ return deepFreeze(auditConsistencyProofRequestSchema.parse(input));
101
+ }
102
+ export function parseAuditConsistencyProofResponse(input) {
103
+ return deepFreeze(auditConsistencyProofResponseSchema.parse(input));
104
+ }
105
+ // ---------------------------------------------------------------------------
106
+ // Serializers - wrap a read-service result in its wire envelope. A transport
107
+ // (e.g. an HTTP recorder) calls these to answer a request.
108
+ // ---------------------------------------------------------------------------
109
+ export function toAuditHeadResponse(head) {
110
+ return { schema: AUDIT_HEAD_RESPONSE_SCHEMA_ID, head };
111
+ }
112
+ export function toAuditListEntriesResponse(page) {
113
+ return {
114
+ schema: AUDIT_LIST_ENTRIES_RESPONSE_SCHEMA_ID,
115
+ entries: page.entries,
116
+ head: page.head,
117
+ nextAfterSequence: page.nextAfterSequence,
118
+ };
119
+ }
120
+ export function toAuditInclusionProofResponse(proof) {
121
+ return { schema: AUDIT_INCLUSION_PROOF_RESPONSE_SCHEMA_ID, proof };
122
+ }
123
+ export function toAuditConsistencyProofResponse(proof) {
124
+ return { schema: AUDIT_CONSISTENCY_PROOF_RESPONSE_SCHEMA_ID, proof };
125
+ }
126
+ //# sourceMappingURL=read-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-contract.js","sourceRoot":"","sources":["../../src/audit/read-contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,iCAAiC,EACjC,+BAA+B,EAC/B,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAA6B,MAAM,mBAAmB,CAAC;AAUtF;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GACvC,iEAA0E,CAAC;AAC7E,MAAM,CAAC,MAAM,6BAA6B,GACxC,kEAA2E,CAAC;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAC/C,yEAAkF,CAAC;AACrF,MAAM,CAAC,MAAM,qCAAqC,GAChD,0EAAmF,CAAC;AACtF,MAAM,CAAC,MAAM,uCAAuC,GAClD,4EAAqF,CAAC;AACxF,MAAM,CAAC,MAAM,wCAAwC,GACnD,6EAAsF,CAAC;AACzF,MAAM,CAAC,MAAM,yCAAyC,GACpD,8EAAuF,CAAC;AAC1F,MAAM,CAAC,MAAM,0CAA0C,GACrD,+EAAwF,CAAC;AAE3F,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACpC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC1C,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,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