open-privacy-protocol 0.1.0-alpha.1 → 0.2.0-alpha.1

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/dist/data.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export declare const SCHEMAS: {
2
2
  readonly catalog: {
3
3
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
4
- readonly $id: "https://openprivacyprotocol.com/schema/0.1/catalog.schema.json";
4
+ readonly $id: "https://openprivacyprotocol.com/schema/0.2/catalog.schema.json";
5
5
  readonly title: "OPP catalog";
6
6
  readonly type: "object";
7
7
  readonly properties: {
@@ -224,9 +224,363 @@ export declare const SCHEMAS: {
224
224
  };
225
225
  };
226
226
  };
227
+ readonly decision: {
228
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
229
+ readonly $id: "https://openprivacyprotocol.com/schema/0.2/decision.schema.json";
230
+ readonly title: "OPP decision";
231
+ readonly type: "object";
232
+ readonly properties: {
233
+ readonly verdict: {
234
+ readonly enum: readonly ["allow", "generalize", "pseudonymize", "redact", "block", "review"];
235
+ };
236
+ readonly destination: {
237
+ readonly enum: readonly ["internal", "partner", "external_ai", "public"];
238
+ };
239
+ readonly summary: {
240
+ readonly type: "string";
241
+ };
242
+ readonly findings: {
243
+ readonly type: "array";
244
+ readonly items: {
245
+ readonly $ref: "#/$defs/Finding";
246
+ };
247
+ };
248
+ readonly safe_content: {};
249
+ readonly model: {
250
+ readonly type: "string";
251
+ };
252
+ readonly decision: {
253
+ readonly $ref: "#/$defs/Decision";
254
+ };
255
+ };
256
+ readonly required: readonly ["verdict", "destination", "findings", "decision"];
257
+ readonly additionalProperties: false;
258
+ readonly $defs: {
259
+ readonly Finding: {
260
+ readonly type: "object";
261
+ readonly properties: {
262
+ readonly class: {
263
+ readonly type: "string";
264
+ };
265
+ readonly label: {
266
+ readonly type: "string";
267
+ };
268
+ readonly sensitivity: {
269
+ readonly enum: readonly ["public", "internal", "confidential", "restricted"];
270
+ };
271
+ readonly action: {
272
+ readonly enum: readonly ["allow", "generalize", "pseudonymize", "redact", "block", "review"];
273
+ };
274
+ readonly rule: {
275
+ readonly type: "string";
276
+ };
277
+ readonly unmet: {
278
+ readonly type: "boolean";
279
+ };
280
+ readonly source: {
281
+ readonly type: "string";
282
+ };
283
+ readonly reason: {
284
+ readonly type: "string";
285
+ };
286
+ readonly start: {
287
+ readonly type: "integer";
288
+ };
289
+ readonly end: {
290
+ readonly type: "integer";
291
+ };
292
+ readonly row: {
293
+ readonly type: "integer";
294
+ };
295
+ readonly field: {
296
+ readonly type: "string";
297
+ };
298
+ readonly dataset: {
299
+ readonly type: "string";
300
+ };
301
+ };
302
+ readonly required: readonly ["class", "sensitivity", "action", "rule"];
303
+ readonly additionalProperties: false;
304
+ };
305
+ readonly Detector: {
306
+ readonly type: "object";
307
+ readonly properties: {
308
+ readonly id: {
309
+ readonly type: "string";
310
+ };
311
+ readonly version: {
312
+ readonly type: "string";
313
+ };
314
+ readonly digest: {
315
+ readonly type: "string";
316
+ };
317
+ readonly covers: {
318
+ readonly type: "array";
319
+ readonly items: {
320
+ readonly type: "string";
321
+ };
322
+ };
323
+ readonly languages: {
324
+ readonly type: "array";
325
+ readonly items: {
326
+ readonly type: "string";
327
+ };
328
+ };
329
+ readonly human_reviewed: {
330
+ readonly type: "boolean";
331
+ };
332
+ };
333
+ readonly required: readonly ["id"];
334
+ readonly additionalProperties: false;
335
+ };
336
+ readonly Decision: {
337
+ readonly type: "object";
338
+ readonly properties: {
339
+ readonly id: {
340
+ readonly type: "string";
341
+ readonly minLength: 1;
342
+ };
343
+ readonly opp: {
344
+ readonly type: "string";
345
+ };
346
+ readonly at: {
347
+ readonly type: "string";
348
+ };
349
+ readonly expires: {
350
+ readonly type: "string";
351
+ };
352
+ readonly stage: {
353
+ readonly enum: readonly ["input", "output", "tool_call"];
354
+ };
355
+ readonly destination: {
356
+ readonly type: "object";
357
+ readonly properties: {
358
+ readonly category: {
359
+ readonly enum: readonly ["internal", "partner", "external_ai", "public"];
360
+ };
361
+ readonly id: {
362
+ readonly type: "string";
363
+ };
364
+ readonly mode: {
365
+ readonly type: "string";
366
+ };
367
+ readonly mechanism: {
368
+ readonly enum: readonly ["plaintext", "tee", "fhe", "mpc", "local"];
369
+ };
370
+ readonly assurance: {
371
+ readonly enum: readonly ["asserted", "approved", "verified"];
372
+ };
373
+ };
374
+ readonly required: readonly ["category", "mechanism", "assurance"];
375
+ readonly additionalProperties: false;
376
+ };
377
+ readonly purpose: {
378
+ readonly type: "object";
379
+ readonly properties: {
380
+ readonly id: {
381
+ readonly type: "string";
382
+ };
383
+ readonly status: {
384
+ readonly enum: readonly ["authorised", "asserted"];
385
+ };
386
+ };
387
+ readonly required: readonly ["id", "status"];
388
+ readonly additionalProperties: false;
389
+ };
390
+ readonly model: {
391
+ readonly type: "object";
392
+ readonly properties: {
393
+ readonly name: {
394
+ readonly type: "string";
395
+ };
396
+ readonly digest: {
397
+ readonly type: "string";
398
+ };
399
+ };
400
+ readonly required: readonly ["name", "digest"];
401
+ readonly additionalProperties: false;
402
+ };
403
+ readonly registry: {
404
+ readonly type: "object";
405
+ readonly properties: {
406
+ readonly name: {
407
+ readonly type: "string";
408
+ };
409
+ readonly digest: {
410
+ readonly type: "string";
411
+ };
412
+ };
413
+ readonly required: readonly ["name", "digest"];
414
+ readonly additionalProperties: false;
415
+ };
416
+ readonly content_digest: {
417
+ readonly type: "string";
418
+ };
419
+ readonly rules: {
420
+ readonly type: "array";
421
+ readonly items: {
422
+ readonly type: "string";
423
+ };
424
+ };
425
+ readonly obligations: {
426
+ readonly type: "array";
427
+ readonly items: {
428
+ readonly enum: readonly ["enforce_mode", "no_plaintext_fallback", "check_output", "record_decision", "human_approval"];
429
+ };
430
+ readonly uniqueItems: true;
431
+ };
432
+ readonly evidence: {
433
+ readonly type: "array";
434
+ readonly items: {
435
+ readonly type: "string";
436
+ };
437
+ };
438
+ readonly detectors: {
439
+ readonly type: "array";
440
+ readonly items: {
441
+ readonly $ref: "#/$defs/Detector";
442
+ };
443
+ };
444
+ };
445
+ readonly required: readonly ["id", "opp", "at", "expires", "destination", "model", "content_digest", "rules", "obligations"];
446
+ readonly additionalProperties: false;
447
+ };
448
+ };
449
+ };
450
+ readonly destinations: {
451
+ readonly $schema: "https://json-schema.org/draft/2020-12/schema";
452
+ readonly $id: "https://openprivacyprotocol.com/schema/0.2/destinations.schema.json";
453
+ readonly title: "OPP destination registry";
454
+ readonly type: "object";
455
+ readonly properties: {
456
+ readonly opp: {
457
+ readonly type: "string";
458
+ readonly minLength: 1;
459
+ };
460
+ readonly name: {
461
+ readonly type: "string";
462
+ readonly minLength: 1;
463
+ };
464
+ readonly version: {
465
+ readonly type: "string";
466
+ };
467
+ readonly description: {
468
+ readonly type: "string";
469
+ };
470
+ readonly destinations: {
471
+ readonly type: "array";
472
+ readonly items: {
473
+ readonly $ref: "#/$defs/Destination";
474
+ };
475
+ };
476
+ };
477
+ readonly required: readonly ["opp", "name", "destinations"];
478
+ readonly additionalProperties: false;
479
+ readonly $defs: {
480
+ readonly Evidence: {
481
+ readonly type: "object";
482
+ readonly properties: {
483
+ readonly kind: {
484
+ readonly enum: readonly ["admin_approval", "contract", "audit_report", "attestation", "client_build"];
485
+ };
486
+ readonly ref: {
487
+ readonly type: "string";
488
+ readonly minLength: 1;
489
+ };
490
+ readonly issued: {
491
+ readonly type: "string";
492
+ readonly pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
493
+ };
494
+ readonly expires: {
495
+ readonly type: "string";
496
+ readonly pattern: "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
497
+ };
498
+ readonly verifier: {
499
+ readonly type: "string";
500
+ };
501
+ };
502
+ readonly required: readonly ["kind", "ref"];
503
+ readonly additionalProperties: false;
504
+ };
505
+ readonly Mode: {
506
+ readonly type: "object";
507
+ readonly properties: {
508
+ readonly id: {
509
+ readonly type: "string";
510
+ readonly pattern: "^[a-z0-9][a-z0-9_.-]*$";
511
+ };
512
+ readonly mechanism: {
513
+ readonly enum: readonly ["plaintext", "tee", "fhe", "mpc", "local"];
514
+ };
515
+ readonly plaintext_access: {
516
+ readonly enum: readonly ["none", "enclave", "provider"];
517
+ };
518
+ readonly key_custody: {
519
+ readonly enum: readonly ["client", "provider", "shared"];
520
+ };
521
+ readonly retention: {
522
+ readonly enum: readonly ["none", "transient", "retained"];
523
+ };
524
+ readonly region: {
525
+ readonly type: "string";
526
+ readonly minLength: 1;
527
+ };
528
+ readonly operations: {
529
+ readonly type: "array";
530
+ readonly items: {
531
+ readonly type: "string";
532
+ readonly minLength: 1;
533
+ };
534
+ };
535
+ readonly assurance: {
536
+ readonly enum: readonly ["asserted", "approved", "verified"];
537
+ };
538
+ readonly evidence: {
539
+ readonly type: "array";
540
+ readonly items: {
541
+ readonly $ref: "#/$defs/Evidence";
542
+ };
543
+ };
544
+ };
545
+ readonly required: readonly ["id", "mechanism", "plaintext_access", "key_custody", "retention", "assurance"];
546
+ readonly additionalProperties: false;
547
+ };
548
+ readonly Destination: {
549
+ readonly type: "object";
550
+ readonly properties: {
551
+ readonly id: {
552
+ readonly type: "string";
553
+ readonly pattern: "^[a-z0-9][a-z0-9_.-]*$";
554
+ };
555
+ readonly label: {
556
+ readonly type: "string";
557
+ };
558
+ readonly category: {
559
+ readonly enum: readonly ["internal", "partner", "external_ai", "public"];
560
+ };
561
+ readonly endpoints: {
562
+ readonly type: "array";
563
+ readonly items: {
564
+ readonly type: "string";
565
+ readonly minLength: 1;
566
+ };
567
+ };
568
+ readonly modes: {
569
+ readonly type: "array";
570
+ readonly items: {
571
+ readonly $ref: "#/$defs/Mode";
572
+ };
573
+ readonly minItems: 1;
574
+ };
575
+ };
576
+ readonly required: readonly ["id", "category", "modes"];
577
+ readonly additionalProperties: false;
578
+ };
579
+ };
580
+ };
227
581
  readonly model: {
228
582
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
229
- readonly $id: "https://openprivacyprotocol.com/schema/0.1/model.schema.json";
583
+ readonly $id: "https://openprivacyprotocol.com/schema/0.2/model.schema.json";
230
584
  readonly title: "OPP privacy model";
231
585
  readonly type: "object";
232
586
  readonly properties: {
@@ -290,6 +644,12 @@ export declare const SCHEMAS: {
290
644
  readonly $ref: "#/$defs/Classification_setting";
291
645
  };
292
646
  };
647
+ readonly purposes: {
648
+ readonly type: "array";
649
+ readonly items: {
650
+ readonly $ref: "#/$defs/Purpose";
651
+ };
652
+ };
293
653
  };
294
654
  readonly required: readonly ["opp", "name", "organization", "catalog", "sources"];
295
655
  readonly additionalProperties: false;
@@ -641,6 +1001,27 @@ export declare const SCHEMAS: {
641
1001
  readonly reason: {
642
1002
  readonly type: "string";
643
1003
  };
1004
+ readonly id: {
1005
+ readonly type: "string";
1006
+ readonly pattern: "^[a-z0-9][a-z0-9_.-]*$";
1007
+ };
1008
+ readonly purpose: {
1009
+ readonly type: "string";
1010
+ readonly minLength: 1;
1011
+ };
1012
+ readonly requires: {
1013
+ readonly $ref: "#/$defs/Requires";
1014
+ };
1015
+ readonly obligations: {
1016
+ readonly type: "array";
1017
+ readonly items: {
1018
+ readonly $ref: "#/$defs/Obligation";
1019
+ };
1020
+ readonly uniqueItems: true;
1021
+ };
1022
+ readonly on_unmet: {
1023
+ readonly enum: readonly ["block", "review", "fall_through"];
1024
+ };
644
1025
  };
645
1026
  readonly required: readonly ["target", "destination", "action"];
646
1027
  readonly additionalProperties: false;
@@ -713,11 +1094,83 @@ export declare const SCHEMAS: {
713
1094
  readonly required: readonly ["class", "reason", "status"];
714
1095
  readonly additionalProperties: false;
715
1096
  };
1097
+ readonly Purpose: {
1098
+ readonly type: "object";
1099
+ readonly properties: {
1100
+ readonly id: {
1101
+ readonly type: "string";
1102
+ readonly pattern: "^[a-z][a-z0-9_]*$";
1103
+ };
1104
+ readonly label: {
1105
+ readonly type: "string";
1106
+ readonly minLength: 1;
1107
+ };
1108
+ readonly description: {
1109
+ readonly type: "string";
1110
+ };
1111
+ };
1112
+ readonly required: readonly ["id", "label"];
1113
+ readonly additionalProperties: false;
1114
+ };
1115
+ readonly Mechanism: {
1116
+ readonly enum: readonly ["plaintext", "tee", "fhe", "mpc", "local"];
1117
+ };
1118
+ readonly Obligation: {
1119
+ readonly enum: readonly ["enforce_mode", "no_plaintext_fallback", "check_output", "record_decision", "human_approval"];
1120
+ };
1121
+ readonly Requirement: {
1122
+ readonly type: "object";
1123
+ readonly properties: {
1124
+ readonly mechanism: {
1125
+ readonly $ref: "#/$defs/Mechanism";
1126
+ };
1127
+ readonly key_custody: {
1128
+ readonly enum: readonly ["client", "provider", "shared"];
1129
+ };
1130
+ readonly plaintext_access: {
1131
+ readonly enum: readonly ["none", "enclave", "provider"];
1132
+ };
1133
+ readonly retention: {
1134
+ readonly enum: readonly ["none", "transient", "retained"];
1135
+ };
1136
+ readonly regions: {
1137
+ readonly type: "array";
1138
+ readonly items: {
1139
+ readonly type: "string";
1140
+ readonly minLength: 1;
1141
+ };
1142
+ readonly minItems: 1;
1143
+ };
1144
+ readonly assurance: {
1145
+ readonly enum: readonly ["approved", "verified"];
1146
+ };
1147
+ };
1148
+ readonly minProperties: 1;
1149
+ readonly additionalProperties: false;
1150
+ };
1151
+ readonly Requires: {
1152
+ readonly anyOf: readonly [{
1153
+ readonly $ref: "#/$defs/Requirement";
1154
+ }, {
1155
+ readonly type: "object";
1156
+ readonly properties: {
1157
+ readonly any_of: {
1158
+ readonly type: "array";
1159
+ readonly items: {
1160
+ readonly $ref: "#/$defs/Requirement";
1161
+ };
1162
+ readonly minItems: 1;
1163
+ };
1164
+ };
1165
+ readonly required: readonly ["any_of"];
1166
+ readonly additionalProperties: false;
1167
+ }];
1168
+ };
716
1169
  };
717
1170
  };
718
1171
  readonly presets: {
719
1172
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
720
- readonly $id: "https://openprivacyprotocol.com/schema/0.1/presets.schema.json";
1173
+ readonly $id: "https://openprivacyprotocol.com/schema/0.2/presets.schema.json";
721
1174
  readonly title: "OPP industry presets";
722
1175
  readonly type: "object";
723
1176
  readonly additionalProperties: false;