@kya-os/mcp-i-cloudflare 1.12.4 → 1.13.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.
- package/README.md +5 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +23 -24
- package/dist/agent.js.map +1 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +10 -5
- package/dist/app.js.map +1 -1
- package/dist/audit/assurance.d.ts +12 -0
- package/dist/audit/assurance.d.ts.map +1 -0
- package/dist/audit/assurance.js +21 -0
- package/dist/audit/assurance.js.map +1 -0
- package/dist/audit/deployment-binding.d.ts +513 -0
- package/dist/audit/deployment-binding.d.ts.map +1 -0
- package/dist/audit/deployment-binding.js +364 -0
- package/dist/audit/deployment-binding.js.map +1 -0
- package/dist/audit/durable-producer.d.ts +151 -0
- package/dist/audit/durable-producer.d.ts.map +1 -0
- package/dist/audit/durable-producer.js +953 -0
- package/dist/audit/durable-producer.js.map +1 -0
- package/dist/audit/verified-recorder-client.d.ts +34 -0
- package/dist/audit/verified-recorder-client.d.ts.map +1 -0
- package/dist/audit/verified-recorder-client.js +192 -0
- package/dist/audit/verified-recorder-client.js.map +1 -0
- package/dist/config.d.ts +4 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/delegation-http/pickup-routes.d.ts.map +1 -1
- package/dist/delegation-http/pickup-routes.js +36 -3
- package/dist/delegation-http/pickup-routes.js.map +1 -1
- package/dist/delegation-http/well-known-capability.d.ts +2 -1
- package/dist/delegation-http/well-known-capability.d.ts.map +1 -1
- package/dist/delegation-http/well-known-capability.js +2 -1
- package/dist/delegation-http/well-known-capability.js.map +1 -1
- package/dist/helpers/env-mapper.d.ts.map +1 -1
- package/dist/helpers/env-mapper.js +25 -0
- package/dist/helpers/env-mapper.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/runtime/invoke-tool-handler.d.ts +10 -0
- package/dist/runtime/invoke-tool-handler.d.ts.map +1 -0
- package/dist/runtime/invoke-tool-handler.js +11 -0
- package/dist/runtime/invoke-tool-handler.js.map +1 -0
- package/dist/runtime.d.ts +1 -6
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +72 -72
- package/dist/runtime.js.map +1 -1
- package/dist/services/consent-audit.service.d.ts +3 -10
- package/dist/services/consent-audit.service.d.ts.map +1 -1
- package/dist/services/consent-audit.service.js +44 -77
- package/dist/services/consent-audit.service.js.map +1 -1
- package/dist/services/consent.service.d.ts.map +1 -1
- package/dist/services/consent.service.js +5 -9
- package/dist/services/consent.service.js.map +1 -1
- package/dist/services/proof.service.d.ts.map +1 -1
- package/dist/services/proof.service.js +20 -4
- package/dist/services/proof.service.js.map +1 -1
- package/dist/services/vault-resolver.d.ts +0 -8
- package/dist/services/vault-resolver.d.ts.map +1 -1
- package/dist/services/vault-resolver.js +0 -22
- package/dist/services/vault-resolver.js.map +1 -1
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -5
- package/dist/runtime/audit-logger.d.ts +0 -96
- package/dist/runtime/audit-logger.d.ts.map +0 -1
- package/dist/runtime/audit-logger.js +0 -276
- package/dist/runtime/audit-logger.js.map +0 -1
|
@@ -0,0 +1,513 @@
|
|
|
1
|
+
import { type AuditCapabilities, type SignerRef } from "@kya-os/mcp/audit";
|
|
2
|
+
import { type RuntimeAuditConfig } from "@kya-os/mcp-i-runtime";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import type { CloudflareEnv } from "../types";
|
|
5
|
+
import { CloudflareAuditProducerBinding, createCloudflareAuditTrail } from "./durable-producer";
|
|
6
|
+
export declare const KYA_OS_AUDIT_DISCOVERY_PATH: "/.well-known/kya-os-audit";
|
|
7
|
+
export declare const KYA_OS_AUDIT_CANARY_PATH: "/_kya/audit/canary";
|
|
8
|
+
declare const PROBE_FORMAT: "org.kya-os.audit.runtime-capabilities.v1";
|
|
9
|
+
declare const deploymentBindingSchema: z.ZodObject<{
|
|
10
|
+
schema: z.ZodLiteral<"https://schema.kya-os.org/v1/protocol/audit/deployment-binding/v1.0.0">;
|
|
11
|
+
config: z.ZodObject<{
|
|
12
|
+
enabled: z.ZodBoolean;
|
|
13
|
+
requestedProfile: z.ZodEnum<["AAP-0", "AAP-1", "AAP-2", "AAP-3", "AAP-4"]>;
|
|
14
|
+
delivery: z.ZodEnum<["best-effort", "buffered", "required"]>;
|
|
15
|
+
evidenceMode: z.ZodEnum<["none", "encrypted-separate", "encrypted-inline"]>;
|
|
16
|
+
retentionClass: z.ZodString;
|
|
17
|
+
retentionDays: z.ZodNumber;
|
|
18
|
+
residency: z.ZodEnum<["inherit-project", "us", "eu", "global"]>;
|
|
19
|
+
keyCustody: z.ZodEnum<["none", "checkpoint-managed", "customer-managed-kms"]>;
|
|
20
|
+
recorderTopology: z.ZodEnum<["none", "self-hosted", "managed", "verified-mirror"]>;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
delivery: "best-effort" | "buffered" | "required";
|
|
24
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
25
|
+
evidenceMode: "none" | "encrypted-separate" | "encrypted-inline";
|
|
26
|
+
retentionClass: string;
|
|
27
|
+
retentionDays: number;
|
|
28
|
+
residency: "global" | "eu" | "inherit-project" | "us";
|
|
29
|
+
keyCustody: "none" | "checkpoint-managed" | "customer-managed-kms";
|
|
30
|
+
recorderTopology: "none" | "self-hosted" | "managed" | "verified-mirror";
|
|
31
|
+
}, {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
delivery: "best-effort" | "buffered" | "required";
|
|
34
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
35
|
+
evidenceMode: "none" | "encrypted-separate" | "encrypted-inline";
|
|
36
|
+
retentionClass: string;
|
|
37
|
+
retentionDays: number;
|
|
38
|
+
residency: "global" | "eu" | "inherit-project" | "us";
|
|
39
|
+
keyCustody: "none" | "checkpoint-managed" | "customer-managed-kms";
|
|
40
|
+
recorderTopology: "none" | "self-hosted" | "managed" | "verified-mirror";
|
|
41
|
+
}>;
|
|
42
|
+
readiness: z.ZodObject<{
|
|
43
|
+
requestedProfile: z.ZodEnum<["AAP-0", "AAP-1", "AAP-2", "AAP-3", "AAP-4"]>;
|
|
44
|
+
effectiveProfile: z.ZodEnum<["AAP-0", "AAP-1", "AAP-2", "AAP-3", "AAP-4"]>;
|
|
45
|
+
status: z.ZodEnum<["disabled", "ready", "degraded"]>;
|
|
46
|
+
reasonCodes: z.ZodArray<z.ZodString, "many">;
|
|
47
|
+
canary: z.ZodNullable<z.ZodUnknown>;
|
|
48
|
+
}, "strict", z.ZodTypeAny, {
|
|
49
|
+
status: "disabled" | "ready" | "degraded";
|
|
50
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
51
|
+
effectiveProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
52
|
+
reasonCodes: string[];
|
|
53
|
+
canary?: unknown;
|
|
54
|
+
}, {
|
|
55
|
+
status: "disabled" | "ready" | "degraded";
|
|
56
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
57
|
+
effectiveProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
58
|
+
reasonCodes: string[];
|
|
59
|
+
canary?: unknown;
|
|
60
|
+
}>;
|
|
61
|
+
protocolBinding: z.ZodString;
|
|
62
|
+
tenantRef: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"public_did">;
|
|
64
|
+
did: z.ZodString;
|
|
65
|
+
}, "strict", z.ZodTypeAny, {
|
|
66
|
+
did: string;
|
|
67
|
+
kind: "public_did";
|
|
68
|
+
}, {
|
|
69
|
+
did: string;
|
|
70
|
+
kind: "public_did";
|
|
71
|
+
}>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"pairwise_did">;
|
|
73
|
+
did: z.ZodString;
|
|
74
|
+
}, "strict", z.ZodTypeAny, {
|
|
75
|
+
did: string;
|
|
76
|
+
kind: "pairwise_did";
|
|
77
|
+
}, {
|
|
78
|
+
did: string;
|
|
79
|
+
kind: "pairwise_did";
|
|
80
|
+
}>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"keyed_commitment">;
|
|
82
|
+
value: z.ZodString;
|
|
83
|
+
keyId: z.ZodString;
|
|
84
|
+
}, "strict", z.ZodTypeAny, {
|
|
85
|
+
value: string;
|
|
86
|
+
keyId: string;
|
|
87
|
+
kind: "keyed_commitment";
|
|
88
|
+
}, {
|
|
89
|
+
value: string;
|
|
90
|
+
keyId: string;
|
|
91
|
+
kind: "keyed_commitment";
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"evidence_ref">;
|
|
94
|
+
ref: z.ZodObject<{
|
|
95
|
+
objectId: z.ZodString;
|
|
96
|
+
ciphertextDigest: z.ZodString;
|
|
97
|
+
plaintextCommitment: z.ZodOptional<z.ZodString>;
|
|
98
|
+
mediaType: z.ZodString;
|
|
99
|
+
size: z.ZodString;
|
|
100
|
+
encryption: z.ZodObject<{
|
|
101
|
+
suite: z.ZodLiteral<"A256GCM">;
|
|
102
|
+
keyId: z.ZodString;
|
|
103
|
+
nonce: z.ZodString;
|
|
104
|
+
aadDigest: z.ZodString;
|
|
105
|
+
}, "strict", z.ZodTypeAny, {
|
|
106
|
+
suite: "A256GCM";
|
|
107
|
+
keyId: string;
|
|
108
|
+
nonce: string;
|
|
109
|
+
aadDigest: string;
|
|
110
|
+
}, {
|
|
111
|
+
suite: "A256GCM";
|
|
112
|
+
keyId: string;
|
|
113
|
+
nonce: string;
|
|
114
|
+
aadDigest: string;
|
|
115
|
+
}>;
|
|
116
|
+
}, "strict", z.ZodTypeAny, {
|
|
117
|
+
objectId: string;
|
|
118
|
+
ciphertextDigest: string;
|
|
119
|
+
mediaType: string;
|
|
120
|
+
size: string;
|
|
121
|
+
encryption: {
|
|
122
|
+
suite: "A256GCM";
|
|
123
|
+
keyId: string;
|
|
124
|
+
nonce: string;
|
|
125
|
+
aadDigest: string;
|
|
126
|
+
};
|
|
127
|
+
plaintextCommitment?: string | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
objectId: string;
|
|
130
|
+
ciphertextDigest: string;
|
|
131
|
+
mediaType: string;
|
|
132
|
+
size: string;
|
|
133
|
+
encryption: {
|
|
134
|
+
suite: "A256GCM";
|
|
135
|
+
keyId: string;
|
|
136
|
+
nonce: string;
|
|
137
|
+
aadDigest: string;
|
|
138
|
+
};
|
|
139
|
+
plaintextCommitment?: string | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
}, "strict", z.ZodTypeAny, {
|
|
142
|
+
ref: {
|
|
143
|
+
objectId: string;
|
|
144
|
+
ciphertextDigest: string;
|
|
145
|
+
mediaType: string;
|
|
146
|
+
size: string;
|
|
147
|
+
encryption: {
|
|
148
|
+
suite: "A256GCM";
|
|
149
|
+
keyId: string;
|
|
150
|
+
nonce: string;
|
|
151
|
+
aadDigest: string;
|
|
152
|
+
};
|
|
153
|
+
plaintextCommitment?: string | undefined;
|
|
154
|
+
};
|
|
155
|
+
kind: "evidence_ref";
|
|
156
|
+
}, {
|
|
157
|
+
ref: {
|
|
158
|
+
objectId: string;
|
|
159
|
+
ciphertextDigest: string;
|
|
160
|
+
mediaType: string;
|
|
161
|
+
size: string;
|
|
162
|
+
encryption: {
|
|
163
|
+
suite: "A256GCM";
|
|
164
|
+
keyId: string;
|
|
165
|
+
nonce: string;
|
|
166
|
+
aadDigest: string;
|
|
167
|
+
};
|
|
168
|
+
plaintextCommitment?: string | undefined;
|
|
169
|
+
};
|
|
170
|
+
kind: "evidence_ref";
|
|
171
|
+
}>]>;
|
|
172
|
+
producerRef: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
173
|
+
kind: z.ZodLiteral<"public_did">;
|
|
174
|
+
did: z.ZodString;
|
|
175
|
+
}, "strict", z.ZodTypeAny, {
|
|
176
|
+
did: string;
|
|
177
|
+
kind: "public_did";
|
|
178
|
+
}, {
|
|
179
|
+
did: string;
|
|
180
|
+
kind: "public_did";
|
|
181
|
+
}>, z.ZodObject<{
|
|
182
|
+
kind: z.ZodLiteral<"pairwise_did">;
|
|
183
|
+
did: z.ZodString;
|
|
184
|
+
}, "strict", z.ZodTypeAny, {
|
|
185
|
+
did: string;
|
|
186
|
+
kind: "pairwise_did";
|
|
187
|
+
}, {
|
|
188
|
+
did: string;
|
|
189
|
+
kind: "pairwise_did";
|
|
190
|
+
}>, z.ZodObject<{
|
|
191
|
+
kind: z.ZodLiteral<"keyed_commitment">;
|
|
192
|
+
value: z.ZodString;
|
|
193
|
+
keyId: z.ZodString;
|
|
194
|
+
}, "strict", z.ZodTypeAny, {
|
|
195
|
+
value: string;
|
|
196
|
+
keyId: string;
|
|
197
|
+
kind: "keyed_commitment";
|
|
198
|
+
}, {
|
|
199
|
+
value: string;
|
|
200
|
+
keyId: string;
|
|
201
|
+
kind: "keyed_commitment";
|
|
202
|
+
}>, z.ZodObject<{
|
|
203
|
+
kind: z.ZodLiteral<"evidence_ref">;
|
|
204
|
+
ref: z.ZodObject<{
|
|
205
|
+
objectId: z.ZodString;
|
|
206
|
+
ciphertextDigest: z.ZodString;
|
|
207
|
+
plaintextCommitment: z.ZodOptional<z.ZodString>;
|
|
208
|
+
mediaType: z.ZodString;
|
|
209
|
+
size: z.ZodString;
|
|
210
|
+
encryption: z.ZodObject<{
|
|
211
|
+
suite: z.ZodLiteral<"A256GCM">;
|
|
212
|
+
keyId: z.ZodString;
|
|
213
|
+
nonce: z.ZodString;
|
|
214
|
+
aadDigest: z.ZodString;
|
|
215
|
+
}, "strict", z.ZodTypeAny, {
|
|
216
|
+
suite: "A256GCM";
|
|
217
|
+
keyId: string;
|
|
218
|
+
nonce: string;
|
|
219
|
+
aadDigest: string;
|
|
220
|
+
}, {
|
|
221
|
+
suite: "A256GCM";
|
|
222
|
+
keyId: string;
|
|
223
|
+
nonce: string;
|
|
224
|
+
aadDigest: string;
|
|
225
|
+
}>;
|
|
226
|
+
}, "strict", z.ZodTypeAny, {
|
|
227
|
+
objectId: string;
|
|
228
|
+
ciphertextDigest: string;
|
|
229
|
+
mediaType: string;
|
|
230
|
+
size: string;
|
|
231
|
+
encryption: {
|
|
232
|
+
suite: "A256GCM";
|
|
233
|
+
keyId: string;
|
|
234
|
+
nonce: string;
|
|
235
|
+
aadDigest: string;
|
|
236
|
+
};
|
|
237
|
+
plaintextCommitment?: string | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
objectId: string;
|
|
240
|
+
ciphertextDigest: string;
|
|
241
|
+
mediaType: string;
|
|
242
|
+
size: string;
|
|
243
|
+
encryption: {
|
|
244
|
+
suite: "A256GCM";
|
|
245
|
+
keyId: string;
|
|
246
|
+
nonce: string;
|
|
247
|
+
aadDigest: string;
|
|
248
|
+
};
|
|
249
|
+
plaintextCommitment?: string | undefined;
|
|
250
|
+
}>;
|
|
251
|
+
}, "strict", z.ZodTypeAny, {
|
|
252
|
+
ref: {
|
|
253
|
+
objectId: string;
|
|
254
|
+
ciphertextDigest: string;
|
|
255
|
+
mediaType: string;
|
|
256
|
+
size: string;
|
|
257
|
+
encryption: {
|
|
258
|
+
suite: "A256GCM";
|
|
259
|
+
keyId: string;
|
|
260
|
+
nonce: string;
|
|
261
|
+
aadDigest: string;
|
|
262
|
+
};
|
|
263
|
+
plaintextCommitment?: string | undefined;
|
|
264
|
+
};
|
|
265
|
+
kind: "evidence_ref";
|
|
266
|
+
}, {
|
|
267
|
+
ref: {
|
|
268
|
+
objectId: string;
|
|
269
|
+
ciphertextDigest: string;
|
|
270
|
+
mediaType: string;
|
|
271
|
+
size: string;
|
|
272
|
+
encryption: {
|
|
273
|
+
suite: "A256GCM";
|
|
274
|
+
keyId: string;
|
|
275
|
+
nonce: string;
|
|
276
|
+
aadDigest: string;
|
|
277
|
+
};
|
|
278
|
+
plaintextCommitment?: string | undefined;
|
|
279
|
+
};
|
|
280
|
+
kind: "evidence_ref";
|
|
281
|
+
}>]>;
|
|
282
|
+
recorderSigner: z.ZodObject<{
|
|
283
|
+
did: z.ZodString;
|
|
284
|
+
kid: z.ZodString;
|
|
285
|
+
alg: z.ZodEnum<["EdDSA", "ES256"]>;
|
|
286
|
+
}, "strict", z.ZodTypeAny, {
|
|
287
|
+
did: string;
|
|
288
|
+
kid: string;
|
|
289
|
+
alg: "EdDSA" | "ES256";
|
|
290
|
+
}, {
|
|
291
|
+
did: string;
|
|
292
|
+
kid: string;
|
|
293
|
+
alg: "EdDSA" | "ES256";
|
|
294
|
+
}>;
|
|
295
|
+
recorderPublicJwk: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>;
|
|
296
|
+
secretReferences: z.ZodObject<{
|
|
297
|
+
producerInternalToken: z.ZodLiteral<"KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN">;
|
|
298
|
+
referenceSecret: z.ZodLiteral<"KYA_OS_AUDIT_REFERENCE_SECRET">;
|
|
299
|
+
evidenceKey: z.ZodOptional<z.ZodLiteral<"KYA_OS_AUDIT_EVIDENCE_KEY">>;
|
|
300
|
+
}, "strict", z.ZodTypeAny, {
|
|
301
|
+
producerInternalToken: "KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN";
|
|
302
|
+
referenceSecret: "KYA_OS_AUDIT_REFERENCE_SECRET";
|
|
303
|
+
evidenceKey?: "KYA_OS_AUDIT_EVIDENCE_KEY" | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
producerInternalToken: "KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN";
|
|
306
|
+
referenceSecret: "KYA_OS_AUDIT_REFERENCE_SECRET";
|
|
307
|
+
evidenceKey?: "KYA_OS_AUDIT_EVIDENCE_KEY" | undefined;
|
|
308
|
+
}>;
|
|
309
|
+
}, "strict", z.ZodTypeAny, {
|
|
310
|
+
schema: "https://schema.kya-os.org/v1/protocol/audit/deployment-binding/v1.0.0";
|
|
311
|
+
recorderSigner: {
|
|
312
|
+
did: string;
|
|
313
|
+
kid: string;
|
|
314
|
+
alg: "EdDSA" | "ES256";
|
|
315
|
+
};
|
|
316
|
+
recorderPublicJwk: Record<string, unknown>;
|
|
317
|
+
tenantRef: {
|
|
318
|
+
did: string;
|
|
319
|
+
kind: "public_did";
|
|
320
|
+
} | {
|
|
321
|
+
did: string;
|
|
322
|
+
kind: "pairwise_did";
|
|
323
|
+
} | {
|
|
324
|
+
value: string;
|
|
325
|
+
keyId: string;
|
|
326
|
+
kind: "keyed_commitment";
|
|
327
|
+
} | {
|
|
328
|
+
ref: {
|
|
329
|
+
objectId: string;
|
|
330
|
+
ciphertextDigest: string;
|
|
331
|
+
mediaType: string;
|
|
332
|
+
size: string;
|
|
333
|
+
encryption: {
|
|
334
|
+
suite: "A256GCM";
|
|
335
|
+
keyId: string;
|
|
336
|
+
nonce: string;
|
|
337
|
+
aadDigest: string;
|
|
338
|
+
};
|
|
339
|
+
plaintextCommitment?: string | undefined;
|
|
340
|
+
};
|
|
341
|
+
kind: "evidence_ref";
|
|
342
|
+
};
|
|
343
|
+
config: {
|
|
344
|
+
enabled: boolean;
|
|
345
|
+
delivery: "best-effort" | "buffered" | "required";
|
|
346
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
347
|
+
evidenceMode: "none" | "encrypted-separate" | "encrypted-inline";
|
|
348
|
+
retentionClass: string;
|
|
349
|
+
retentionDays: number;
|
|
350
|
+
residency: "global" | "eu" | "inherit-project" | "us";
|
|
351
|
+
keyCustody: "none" | "checkpoint-managed" | "customer-managed-kms";
|
|
352
|
+
recorderTopology: "none" | "self-hosted" | "managed" | "verified-mirror";
|
|
353
|
+
};
|
|
354
|
+
readiness: {
|
|
355
|
+
status: "disabled" | "ready" | "degraded";
|
|
356
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
357
|
+
effectiveProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
358
|
+
reasonCodes: string[];
|
|
359
|
+
canary?: unknown;
|
|
360
|
+
};
|
|
361
|
+
protocolBinding: string;
|
|
362
|
+
producerRef: {
|
|
363
|
+
did: string;
|
|
364
|
+
kind: "public_did";
|
|
365
|
+
} | {
|
|
366
|
+
did: string;
|
|
367
|
+
kind: "pairwise_did";
|
|
368
|
+
} | {
|
|
369
|
+
value: string;
|
|
370
|
+
keyId: string;
|
|
371
|
+
kind: "keyed_commitment";
|
|
372
|
+
} | {
|
|
373
|
+
ref: {
|
|
374
|
+
objectId: string;
|
|
375
|
+
ciphertextDigest: string;
|
|
376
|
+
mediaType: string;
|
|
377
|
+
size: string;
|
|
378
|
+
encryption: {
|
|
379
|
+
suite: "A256GCM";
|
|
380
|
+
keyId: string;
|
|
381
|
+
nonce: string;
|
|
382
|
+
aadDigest: string;
|
|
383
|
+
};
|
|
384
|
+
plaintextCommitment?: string | undefined;
|
|
385
|
+
};
|
|
386
|
+
kind: "evidence_ref";
|
|
387
|
+
};
|
|
388
|
+
secretReferences: {
|
|
389
|
+
producerInternalToken: "KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN";
|
|
390
|
+
referenceSecret: "KYA_OS_AUDIT_REFERENCE_SECRET";
|
|
391
|
+
evidenceKey?: "KYA_OS_AUDIT_EVIDENCE_KEY" | undefined;
|
|
392
|
+
};
|
|
393
|
+
}, {
|
|
394
|
+
schema: "https://schema.kya-os.org/v1/protocol/audit/deployment-binding/v1.0.0";
|
|
395
|
+
recorderSigner: {
|
|
396
|
+
did: string;
|
|
397
|
+
kid: string;
|
|
398
|
+
alg: "EdDSA" | "ES256";
|
|
399
|
+
};
|
|
400
|
+
recorderPublicJwk: Record<string, unknown>;
|
|
401
|
+
tenantRef: {
|
|
402
|
+
did: string;
|
|
403
|
+
kind: "public_did";
|
|
404
|
+
} | {
|
|
405
|
+
did: string;
|
|
406
|
+
kind: "pairwise_did";
|
|
407
|
+
} | {
|
|
408
|
+
value: string;
|
|
409
|
+
keyId: string;
|
|
410
|
+
kind: "keyed_commitment";
|
|
411
|
+
} | {
|
|
412
|
+
ref: {
|
|
413
|
+
objectId: string;
|
|
414
|
+
ciphertextDigest: string;
|
|
415
|
+
mediaType: string;
|
|
416
|
+
size: string;
|
|
417
|
+
encryption: {
|
|
418
|
+
suite: "A256GCM";
|
|
419
|
+
keyId: string;
|
|
420
|
+
nonce: string;
|
|
421
|
+
aadDigest: string;
|
|
422
|
+
};
|
|
423
|
+
plaintextCommitment?: string | undefined;
|
|
424
|
+
};
|
|
425
|
+
kind: "evidence_ref";
|
|
426
|
+
};
|
|
427
|
+
config: {
|
|
428
|
+
enabled: boolean;
|
|
429
|
+
delivery: "best-effort" | "buffered" | "required";
|
|
430
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
431
|
+
evidenceMode: "none" | "encrypted-separate" | "encrypted-inline";
|
|
432
|
+
retentionClass: string;
|
|
433
|
+
retentionDays: number;
|
|
434
|
+
residency: "global" | "eu" | "inherit-project" | "us";
|
|
435
|
+
keyCustody: "none" | "checkpoint-managed" | "customer-managed-kms";
|
|
436
|
+
recorderTopology: "none" | "self-hosted" | "managed" | "verified-mirror";
|
|
437
|
+
};
|
|
438
|
+
readiness: {
|
|
439
|
+
status: "disabled" | "ready" | "degraded";
|
|
440
|
+
requestedProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
441
|
+
effectiveProfile: "AAP-0" | "AAP-1" | "AAP-2" | "AAP-3" | "AAP-4";
|
|
442
|
+
reasonCodes: string[];
|
|
443
|
+
canary?: unknown;
|
|
444
|
+
};
|
|
445
|
+
protocolBinding: string;
|
|
446
|
+
producerRef: {
|
|
447
|
+
did: string;
|
|
448
|
+
kind: "public_did";
|
|
449
|
+
} | {
|
|
450
|
+
did: string;
|
|
451
|
+
kind: "pairwise_did";
|
|
452
|
+
} | {
|
|
453
|
+
value: string;
|
|
454
|
+
keyId: string;
|
|
455
|
+
kind: "keyed_commitment";
|
|
456
|
+
} | {
|
|
457
|
+
ref: {
|
|
458
|
+
objectId: string;
|
|
459
|
+
ciphertextDigest: string;
|
|
460
|
+
mediaType: string;
|
|
461
|
+
size: string;
|
|
462
|
+
encryption: {
|
|
463
|
+
suite: "A256GCM";
|
|
464
|
+
keyId: string;
|
|
465
|
+
nonce: string;
|
|
466
|
+
aadDigest: string;
|
|
467
|
+
};
|
|
468
|
+
plaintextCommitment?: string | undefined;
|
|
469
|
+
};
|
|
470
|
+
kind: "evidence_ref";
|
|
471
|
+
};
|
|
472
|
+
secretReferences: {
|
|
473
|
+
producerInternalToken: "KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN";
|
|
474
|
+
referenceSecret: "KYA_OS_AUDIT_REFERENCE_SECRET";
|
|
475
|
+
evidenceKey?: "KYA_OS_AUDIT_EVIDENCE_KEY" | undefined;
|
|
476
|
+
};
|
|
477
|
+
}>;
|
|
478
|
+
export type AuditDeploymentBinding = z.infer<typeof deploymentBindingSchema>;
|
|
479
|
+
export type AuditRuntimeCapabilities = Omit<AuditCapabilities, "profile">;
|
|
480
|
+
export interface AuditRuntimeProbe {
|
|
481
|
+
format: typeof PROBE_FORMAT;
|
|
482
|
+
configured: boolean;
|
|
483
|
+
enabled: boolean;
|
|
484
|
+
capabilities: AuditRuntimeCapabilities;
|
|
485
|
+
canaryEndpoint: typeof KYA_OS_AUDIT_CANARY_PATH;
|
|
486
|
+
}
|
|
487
|
+
export interface AuditRuntimeCanaryResult {
|
|
488
|
+
passed: boolean;
|
|
489
|
+
observedAt: number;
|
|
490
|
+
capabilities: AuditRuntimeCapabilities;
|
|
491
|
+
checks: Array<{
|
|
492
|
+
id: string;
|
|
493
|
+
passed: boolean;
|
|
494
|
+
}>;
|
|
495
|
+
bundleHash?: string;
|
|
496
|
+
}
|
|
497
|
+
interface ConfiguredAuditRuntime {
|
|
498
|
+
binding: AuditDeploymentBinding;
|
|
499
|
+
capabilities: AuditCapabilities;
|
|
500
|
+
auditTrail: RuntimeAuditConfig;
|
|
501
|
+
trail: ReturnType<typeof createCloudflareAuditTrail>;
|
|
502
|
+
producer: CloudflareAuditProducerBinding;
|
|
503
|
+
}
|
|
504
|
+
export declare function resolveAuditRuntimeProbe(env: CloudflareEnv): AuditRuntimeProbe;
|
|
505
|
+
export declare function createCloudflareAuditRuntimeFromEnv(env: CloudflareEnv): ConfiguredAuditRuntime | undefined;
|
|
506
|
+
export declare function runAuditRuntimeCanary(request: Request, env: CloudflareEnv): Promise<Response>;
|
|
507
|
+
export declare function handleAuditRuntimeControlRequest(request: Request, env: CloudflareEnv): Promise<Response | null>;
|
|
508
|
+
export declare function recorderConfigurationFromBinding(binding: AuditDeploymentBinding): {
|
|
509
|
+
signer: SignerRef;
|
|
510
|
+
publicJwk: Record<string, unknown>;
|
|
511
|
+
};
|
|
512
|
+
export {};
|
|
513
|
+
//# sourceMappingURL=deployment-binding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployment-binding.d.ts","sourceRoot":"","sources":["../../src/audit/deployment-binding.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EAOtB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;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