@peac/protocol 0.12.14 → 0.13.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.
Files changed (59) hide show
  1. package/dist/_internal/record-core/bounded-validator.d.ts +83 -0
  2. package/dist/_internal/record-core/bounded-validator.d.ts.map +1 -0
  3. package/dist/_internal/record-core/codec/index.d.ts +27 -0
  4. package/dist/_internal/record-core/codec/index.d.ts.map +1 -0
  5. package/dist/_internal/record-core/codec/jws-jwt.d.ts +25 -0
  6. package/dist/_internal/record-core/codec/jws-jwt.d.ts.map +1 -0
  7. package/dist/_internal/record-core/codec/types.d.ts +80 -0
  8. package/dist/_internal/record-core/codec/types.d.ts.map +1 -0
  9. package/dist/_internal/record-core/index.d.ts +14 -0
  10. package/dist/_internal/record-core/index.d.ts.map +1 -0
  11. package/dist/_internal/record-core/normalize.d.ts +24 -0
  12. package/dist/_internal/record-core/normalize.d.ts.map +1 -0
  13. package/dist/_internal/record-core/shadow-hook.d.ts +46 -0
  14. package/dist/_internal/record-core/shadow-hook.d.ts.map +1 -0
  15. package/dist/_internal/record-core/types.d.ts +15 -0
  16. package/dist/_internal/record-core/types.d.ts.map +1 -0
  17. package/dist/_internal/record-core/validators/extension-budget.d.ts +47 -0
  18. package/dist/_internal/record-core/validators/extension-budget.d.ts.map +1 -0
  19. package/dist/_internal/record-core/validators/index.d.ts +13 -0
  20. package/dist/_internal/record-core/validators/index.d.ts.map +1 -0
  21. package/dist/_internal/record-core/validators/issuer-form.d.ts +58 -0
  22. package/dist/_internal/record-core/validators/issuer-form.d.ts.map +1 -0
  23. package/dist/_internal/record-core/validators/jose-hardening.d.ts +58 -0
  24. package/dist/_internal/record-core/validators/jose-hardening.d.ts.map +1 -0
  25. package/dist/_internal/record-core/validators/kernel-constraints.d.ts +48 -0
  26. package/dist/_internal/record-core/validators/kernel-constraints.d.ts.map +1 -0
  27. package/dist/_internal/record-core/validators/temporal.d.ts +50 -0
  28. package/dist/_internal/record-core/validators/temporal.d.ts.map +1 -0
  29. package/dist/_internal/record-core/validators/type-extension-mapping.d.ts +51 -0
  30. package/dist/_internal/record-core/validators/type-extension-mapping.d.ts.map +1 -0
  31. package/dist/_internal/record-core/validators/types.d.ts +42 -0
  32. package/dist/_internal/record-core/validators/types.d.ts.map +1 -0
  33. package/dist/_internal/shadow-observe.d.ts +93 -0
  34. package/dist/_internal/shadow-observe.d.ts.map +1 -0
  35. package/dist/_internal/shadow-redact.d.ts +74 -0
  36. package/dist/_internal/shadow-redact.d.ts.map +1 -0
  37. package/dist/_internal/shadow-types.d.ts +62 -0
  38. package/dist/_internal/shadow-types.d.ts.map +1 -0
  39. package/dist/_internal/shadow.d.ts +134 -0
  40. package/dist/_internal/shadow.d.ts.map +1 -0
  41. package/dist/_internal/test-helpers/canonical-runner.d.ts +43 -0
  42. package/dist/_internal/test-helpers/canonical-runner.d.ts.map +1 -0
  43. package/dist/_internal/test-helpers/corpus-loader.d.ts +61 -0
  44. package/dist/_internal/test-helpers/corpus-loader.d.ts.map +1 -0
  45. package/dist/_internal/test-helpers/fixture-manifest.d.ts +46 -0
  46. package/dist/_internal/test-helpers/fixture-manifest.d.ts.map +1 -0
  47. package/dist/_internal/test-helpers/parity-verdict.d.ts +31 -0
  48. package/dist/_internal/test-helpers/parity-verdict.d.ts.map +1 -0
  49. package/dist/index.cjs +678 -5
  50. package/dist/index.cjs.map +1 -1
  51. package/dist/index.mjs +679 -6
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/issue.d.ts.map +1 -1
  54. package/dist/verify-local.cjs +645 -3
  55. package/dist/verify-local.cjs.map +1 -1
  56. package/dist/verify-local.d.ts.map +1 -1
  57. package/dist/verify-local.mjs +647 -5
  58. package/dist/verify-local.mjs.map +1 -1
  59. package/package.json +6 -4
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Fixture manifest generator for the parity differential harness.
3
+ *
4
+ * INTERNAL TEST HELPER. Walks the parity-corpus and wire-02 conformance
5
+ * fixture trees, categorizes every fixture as either included (eligible
6
+ * for the harness) or excluded (with an explicit reason string). The
7
+ * harness asserts `included.length + excluded.length` totals to the
8
+ * actual scanned count so no fixture is silently skipped.
9
+ *
10
+ * Used by parity-differential.test.ts and parity-verdict-self.test.ts.
11
+ */
12
+ import type { CanonicalRunnerKind } from './canonical-runner.js';
13
+ export type IncludedCategory = 'included_valid_wire_record' | 'included_invalid_wire_record' | 'included_jose_header_hardening' | 'included_warning_vector' | 'included_type_extension_mapping_warning' | 'included_issuer_form' | 'included_temporal_warning';
14
+ export type ExcludedCategory = 'excluded_legacy_or_bundle_only' | 'excluded_non_record_fixture' | 'excluded_non_current_wire' | 'excluded_requires_signature_or_external_artifact' | 'excluded_requires_verify_local_warning_layer' | 'excluded_requires_full_jws_verification_runner' | 'excluded_requires_policy_binding_runner' | 'excluded_requires_temporal_warning_runner' | 'excluded_requires_verify_local_strictness_runner' | 'excluded_requires_compact_jws_size_runner' | 'excluded_requires_signature_verification_runner';
15
+ export type ManifestCategory = IncludedCategory | ExcludedCategory;
16
+ export interface IncludedEntry {
17
+ readonly source: 'parity-corpus' | 'wire-02-conformance';
18
+ readonly family: string;
19
+ readonly id: string;
20
+ readonly category: IncludedCategory;
21
+ readonly runnerKind: CanonicalRunnerKind;
22
+ readonly input: Record<string, unknown>;
23
+ }
24
+ export interface ExcludedEntry {
25
+ readonly source: 'parity-corpus' | 'wire-02-conformance' | 'fixtures-other';
26
+ readonly family: string;
27
+ readonly id: string;
28
+ readonly category: ExcludedCategory;
29
+ readonly reason: string;
30
+ }
31
+ export interface FixtureManifest {
32
+ readonly included: readonly IncludedEntry[];
33
+ readonly excluded: readonly ExcludedEntry[];
34
+ readonly totals: {
35
+ readonly included: number;
36
+ readonly excluded: number;
37
+ readonly total: number;
38
+ };
39
+ }
40
+ /**
41
+ * Build the fixture manifest. Walks parity-corpus + wire-02 conformance
42
+ * (subdirectories and top-level *.json files) and enumerates non-wire-02
43
+ * fixture directories as exclusions with explicit reasons.
44
+ */
45
+ export declare function loadFixtureManifest(conformanceRootOverride?: string): FixtureManifest;
46
+ //# sourceMappingURL=fixture-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixture-manifest.d.ts","sourceRoot":"","sources":["../../../src/_internal/test-helpers/fixture-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GACxB,4BAA4B,GAC5B,8BAA8B,GAC9B,gCAAgC,GAChC,yBAAyB,GACzB,yCAAyC,GACzC,sBAAsB,GACtB,2BAA2B,CAAC;AAEhC,MAAM,MAAM,gBAAgB,GACxB,gCAAgC,GAChC,6BAA6B,GAC7B,2BAA2B,GAC3B,kDAAkD,GAClD,8CAA8C,GAC9C,gDAAgD,GAChD,yCAAyC,GACzC,2CAA2C,GAC3C,kDAAkD,GAClD,2CAA2C,GAC3C,iDAAiD,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,qBAAqB,CAAC;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,qBAAqB,GAAG,gBAAgB,CAAC;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AA+eD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,uBAAuB,CAAC,EAAE,MAAM,GAAG,eAAe,CA6ErF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Parity verdict normalization + comparison helpers.
3
+ *
4
+ * INTERNAL TEST HELPER. Used by the parity corpus sanity test and by the
5
+ * differential harness. Verdict comparison is done by stable JSON of the
6
+ * normalized shape, never by raw exception messages or Zod issue text.
7
+ */
8
+ import type { ParityError, ParityVerdict, ParityWarning } from '../record-core/validators/types.js';
9
+ export type { ParityError, ParityVerdict, ParityWarning };
10
+ /**
11
+ * Build a normalized ParityVerdict. Errors and warnings are sorted by
12
+ * (code, path) and deduplicated. Optional canonicalClaimsDigest carries
13
+ * through unchanged.
14
+ */
15
+ export declare function makeVerdict(accepted: boolean, errors?: ParityError[], warnings?: ParityWarning[], canonicalClaimsDigest?: string): ParityVerdict;
16
+ /**
17
+ * Stringify a ParityVerdict for byte-equality comparison. Stable key
18
+ * order: accepted, errors, warnings, canonicalClaimsDigest. Omits
19
+ * undefined path / digest fields so absence and explicit-undefined are
20
+ * equivalent. Use this when both sides under comparison are expected
21
+ * to carry the same digest (e.g., the same-path differential proof).
22
+ */
23
+ export declare function verdictKey(v: ParityVerdict): string;
24
+ /**
25
+ * Stringify a ParityVerdict OMITTING canonicalClaimsDigest. Use this
26
+ * when comparing a runtime verdict (which carries a digest for accepted
27
+ * records) against a fixture-supplied expectation (which does not
28
+ * encode digests). Example caller: corpus-canonical-truth sanity test.
29
+ */
30
+ export declare function verdictKeyShape(v: ParityVerdict): string;
31
+ //# sourceMappingURL=parity-verdict.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parity-verdict.d.ts","sourceRoot":"","sources":["../../../src/_internal/test-helpers/parity-verdict.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEpG,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAwB1D;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,EACjB,MAAM,GAAE,WAAW,EAAO,EAC1B,QAAQ,GAAE,aAAa,EAAO,EAC9B,qBAAqB,CAAC,EAAE,MAAM,GAC7B,aAAa,CAUf;AAgBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAMnD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAExD"}