@kya-os/checkpoint-shared 1.8.0 → 1.10.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 (155) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/README.md +1 -1
  3. package/dist/agent-catalog.d.mts +12 -0
  4. package/dist/agent-catalog.d.mts.map +1 -0
  5. package/dist/agent-catalog.d.ts +12 -0
  6. package/dist/agent-catalog.d.ts.map +1 -0
  7. package/dist/agent-catalog.js +105 -0
  8. package/dist/agent-catalog.mjs +105 -0
  9. package/dist/agent-catalog.mjs.map +1 -0
  10. package/dist/beacon-types/index.d.mts +18 -0
  11. package/dist/beacon-types/index.d.mts.map +1 -1
  12. package/dist/beacon-types/index.d.ts +18 -0
  13. package/dist/beacon-types/index.d.ts.map +1 -1
  14. package/dist/beacon-types/index.js +116 -12
  15. package/dist/beacon-types/index.mjs +105 -13
  16. package/dist/beacon-types/index.mjs.map +1 -1
  17. package/dist/browser-posture-5fPrsxx7.d.mts.map +1 -1
  18. package/dist/browser-posture-CCR1kh5e.d.ts.map +1 -1
  19. package/dist/browser-posture-cookie.js +1 -1
  20. package/dist/browser-posture-cookie.mjs +1 -1
  21. package/dist/browser-posture-cookie.mjs.map +1 -1
  22. package/dist/browser-posture-proof-verifier-DvsOmFrM.js +202 -0
  23. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +180 -0
  24. package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +1 -0
  25. package/dist/browser-posture-proof-verifier.d.mts +25 -0
  26. package/dist/browser-posture-proof-verifier.d.mts.map +1 -0
  27. package/dist/browser-posture-proof-verifier.d.ts +25 -0
  28. package/dist/browser-posture-proof-verifier.d.ts.map +1 -0
  29. package/dist/browser-posture-proof-verifier.js +7 -0
  30. package/dist/browser-posture-proof-verifier.mjs +3 -0
  31. package/dist/browser-posture-proof.d.mts +3 -18
  32. package/dist/browser-posture-proof.d.mts.map +1 -1
  33. package/dist/browser-posture-proof.d.ts +3 -18
  34. package/dist/browser-posture-proof.d.ts.map +1 -1
  35. package/dist/browser-posture-proof.js +6 -131
  36. package/dist/browser-posture-proof.mjs +1 -126
  37. package/dist/browser-posture-proof.mjs.map +1 -1
  38. package/dist/browser-posture.js +36 -5
  39. package/dist/browser-posture.mjs +36 -5
  40. package/dist/browser-posture.mjs.map +1 -1
  41. package/dist/browser.d.mts +0 -282
  42. package/dist/browser.d.mts.map +1 -1
  43. package/dist/browser.d.ts +0 -282
  44. package/dist/browser.d.ts.map +1 -1
  45. package/dist/browser.js +1 -1
  46. package/dist/browser.mjs +1 -1
  47. package/dist/browser.mjs.map +1 -1
  48. package/dist/canonical-signer/index.mjs.map +1 -1
  49. package/dist/consent-handoff.d.mts +0 -3
  50. package/dist/consent-handoff.d.mts.map +1 -1
  51. package/dist/consent-handoff.d.ts +0 -3
  52. package/dist/consent-handoff.d.ts.map +1 -1
  53. package/dist/consent-handoff.mjs.map +1 -1
  54. package/dist/default-sign-in-host.d.mts +10 -0
  55. package/dist/default-sign-in-host.d.mts.map +1 -0
  56. package/dist/default-sign-in-host.d.ts +10 -0
  57. package/dist/default-sign-in-host.d.ts.map +1 -0
  58. package/dist/default-sign-in-host.js +72 -0
  59. package/dist/default-sign-in-host.mjs +66 -0
  60. package/dist/default-sign-in-host.mjs.map +1 -0
  61. package/dist/deploy/index.d.mts +1 -0
  62. package/dist/deploy/index.d.mts.map +1 -1
  63. package/dist/deploy/index.d.ts +1 -0
  64. package/dist/deploy/index.d.ts.map +1 -1
  65. package/dist/deploy/index.js +9 -1
  66. package/dist/deploy/index.mjs +9 -1
  67. package/dist/deploy/index.mjs.map +1 -1
  68. package/dist/errors/index.d.mts +1 -0
  69. package/dist/errors/index.d.mts.map +1 -1
  70. package/dist/errors/index.d.ts +1 -0
  71. package/dist/errors/index.d.ts.map +1 -1
  72. package/dist/errors/index.js +5 -2
  73. package/dist/errors/index.mjs +5 -2
  74. package/dist/errors/index.mjs.map +1 -1
  75. package/dist/{fetcher-CivUCbhL.d.ts → fetcher-CCw4Q95g.d.ts} +2 -2
  76. package/dist/{fetcher-CivUCbhL.d.ts.map → fetcher-CCw4Q95g.d.ts.map} +1 -1
  77. package/dist/{fetcher-cXQsbm6s.d.mts → fetcher-CZfLcbRZ.d.mts} +2 -2
  78. package/dist/{fetcher-cXQsbm6s.d.mts.map → fetcher-CZfLcbRZ.d.mts.map} +1 -1
  79. package/dist/gateway-client-ip.d.mts +0 -2
  80. package/dist/gateway-client-ip.d.mts.map +1 -1
  81. package/dist/gateway-client-ip.d.ts +0 -2
  82. package/dist/gateway-client-ip.d.ts.map +1 -1
  83. package/dist/gateway-client-ip.mjs.map +1 -1
  84. package/dist/host-adapter/index.d.mts +1 -1
  85. package/dist/host-adapter/index.d.ts +1 -1
  86. package/dist/host-adapter/index.js +1 -1
  87. package/dist/host-adapter/index.mjs +1 -1
  88. package/dist/{host-adapter-DHyISsIf.mjs → host-adapter-BKdQHwbi.mjs} +2 -2
  89. package/dist/{host-adapter-DHyISsIf.mjs.map → host-adapter-BKdQHwbi.mjs.map} +1 -1
  90. package/dist/{host-adapter-0F8EpbD6.js → host-adapter-bWftXA9T.js} +1 -1
  91. package/dist/{index-CXbOY7gB.d.ts → index-Cdv_FH0H.d.ts} +3 -3
  92. package/dist/{index-CXbOY7gB.d.ts.map → index-Cdv_FH0H.d.ts.map} +1 -1
  93. package/dist/{index-B3cHxr3O.d.mts → index-DL_dmQBY.d.mts} +3 -3
  94. package/dist/{index-B3cHxr3O.d.mts.map → index-DL_dmQBY.d.mts.map} +1 -1
  95. package/dist/index.d.mts +124 -463
  96. package/dist/index.d.mts.map +1 -1
  97. package/dist/index.d.ts +124 -463
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +52 -468
  100. package/dist/index.mjs +40 -435
  101. package/dist/index.mjs.map +1 -1
  102. package/dist/{kya-http-error-codes-UYb1zpGM.js → kya-http-error-codes-B4rUmUEI.js} +2 -0
  103. package/dist/{kya-http-error-codes-7ewV5RuK.d.ts → kya-http-error-codes-C14E4gi3.d.mts} +2 -1
  104. package/dist/kya-http-error-codes-C14E4gi3.d.mts.map +1 -0
  105. package/dist/{kya-http-error-codes-7ewV5RuK.d.mts → kya-http-error-codes-C14E4gi3.d.ts} +2 -1
  106. package/dist/kya-http-error-codes-C14E4gi3.d.ts.map +1 -0
  107. package/dist/{kya-http-error-codes-C2JiWPsi.mjs → kya-http-error-codes-DSBrxNry.mjs} +3 -1
  108. package/dist/kya-http-error-codes-DSBrxNry.mjs.map +1 -0
  109. package/dist/kya-http.d.mts +3 -3
  110. package/dist/kya-http.d.ts +3 -3
  111. package/dist/kya-http.js +7 -3
  112. package/dist/kya-http.mjs +3 -3
  113. package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
  114. package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
  115. package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
  116. package/dist/{patterns-B2r7M9wR.js → patterns-CiMpbdAF.js} +1 -1
  117. package/dist/{patterns-B7dQoeE3.mjs → patterns-D4OAsNQY.mjs} +2 -2
  118. package/dist/{patterns-B7dQoeE3.mjs.map → patterns-D4OAsNQY.mjs.map} +1 -1
  119. package/dist/patterns.js +1 -1
  120. package/dist/patterns.mjs +1 -1
  121. package/dist/policy/fetcher.d.mts +1 -1
  122. package/dist/policy/fetcher.d.ts +1 -1
  123. package/dist/policy/schemas.d.mts +1 -1
  124. package/dist/policy/schemas.d.ts +1 -1
  125. package/dist/{registered-sid-DVGTSH0L.js → registered-sid-BZfDOfXy.js} +107 -4
  126. package/dist/{registered-sid-26hNxp6t.mjs → registered-sid-CS9V8nPr.mjs} +85 -6
  127. package/dist/registered-sid-CS9V8nPr.mjs.map +1 -0
  128. package/dist/{registered-sid-D6KCaT1E.d.ts → registered-sid-CnWIU_l1.d.mts} +13 -2
  129. package/dist/registered-sid-CnWIU_l1.d.mts.map +1 -0
  130. package/dist/{registered-sid-D6KCaT1E.d.mts → registered-sid-CnWIU_l1.d.ts} +13 -2
  131. package/dist/registered-sid-CnWIU_l1.d.ts.map +1 -0
  132. package/dist/{schemas-02CI7jgm.d.mts → schemas-BhC88D1-.d.mts} +17 -17
  133. package/dist/{schemas-02CI7jgm.d.mts.map → schemas-BhC88D1-.d.mts.map} +1 -1
  134. package/dist/{schemas-C_3C72SR.d.ts → schemas-DZa1ouGs.d.ts} +17 -17
  135. package/dist/{schemas-C_3C72SR.d.ts.map → schemas-DZa1ouGs.d.ts.map} +1 -1
  136. package/dist/signals/index.d.mts.map +1 -1
  137. package/dist/signals/index.d.ts.map +1 -1
  138. package/dist/signals/index.js +4 -0
  139. package/dist/signals/index.mjs +4 -0
  140. package/dist/signals/index.mjs.map +1 -1
  141. package/dist/tool-protection/index.d.mts +12 -0
  142. package/dist/tool-protection/index.d.mts.map +1 -1
  143. package/dist/tool-protection/index.d.ts +12 -0
  144. package/dist/tool-protection/index.d.ts.map +1 -1
  145. package/dist/tool-protection/index.js +46 -0
  146. package/dist/tool-protection/index.mjs +44 -1
  147. package/dist/tool-protection/index.mjs.map +1 -1
  148. package/fixtures/kya-http/error-codes.json +2 -1
  149. package/package.json +19 -3
  150. package/dist/kya-http-error-codes-7ewV5RuK.d.mts.map +0 -1
  151. package/dist/kya-http-error-codes-7ewV5RuK.d.ts.map +0 -1
  152. package/dist/kya-http-error-codes-C2JiWPsi.mjs.map +0 -1
  153. package/dist/registered-sid-26hNxp6t.mjs.map +0 -1
  154. package/dist/registered-sid-D6KCaT1E.d.mts.map +0 -1
  155. package/dist/registered-sid-D6KCaT1E.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- import { a as PolicyUnavailableError, i as PolicyFetcherConfig, n as PolicyCacheAdapter, o as isPolicyUnavailableError, r as PolicyFetcher, t as CachedPolicy } from "../fetcher-CivUCbhL.js";
1
+ import { a as PolicyUnavailableError, i as PolicyFetcherConfig, n as PolicyCacheAdapter, o as isPolicyUnavailableError, r as PolicyFetcher, t as CachedPolicy } from "../fetcher-CCw4Q95g.js";
2
2
  export { CachedPolicy, PolicyCacheAdapter, PolicyFetcher, PolicyFetcherConfig, PolicyUnavailableError, isPolicyUnavailableError };
@@ -1,3 +1,3 @@
1
1
  import { n as normalizeChallengeType, t as isEngineEnforcing } from "../engine-enforcing-DiOclGqf.mjs";
2
- import { A as PolicyMetadataSchema, B as ThresholdConfigSchema, C as InstructPayload, D as PolicyConfig, E as PolicyConditionSchema, F as RuleMetadata, I as RuleMetadataSchema, L as SuggestedAction, M as PolicyRuleSchema, N as RedirectTarget, O as PolicyConfigSchema, P as RedirectTargetSchema, R as SuggestedActionSchema, S as EnforcementModeSchema, T as PolicyCondition, V as safeParsePolicyConfig, _ as DenyListEntry, a as BlockReason, b as EnforcementActionSchema, c as ChallengeParamsSchema, d as ConditionOperator, f as ConditionOperatorSchema, g as DecisionSchema, h as Decision, i as AssuranceTierSchema, j as PolicyRule, k as PolicyMetadata, l as ConditionField, m as ConditionValueSchema, n as AllowListEntrySchema, o as BlockReasonSchema, p as ConditionValue, r as AssuranceTier, s as ChallengeParams, t as AllowListEntry, u as ConditionFieldSchema, v as DenyListEntrySchema, w as InstructPayloadSchema, x as EnforcementMode, y as EnforcementAction, z as ThresholdConfig } from "../schemas-02CI7jgm.mjs";
2
+ import { A as PolicyMetadataSchema, B as ThresholdConfigSchema, C as InstructPayload, D as PolicyConfig, E as PolicyConditionSchema, F as RuleMetadata, I as RuleMetadataSchema, L as SuggestedAction, M as PolicyRuleSchema, N as RedirectTarget, O as PolicyConfigSchema, P as RedirectTargetSchema, R as SuggestedActionSchema, S as EnforcementModeSchema, T as PolicyCondition, V as safeParsePolicyConfig, _ as DenyListEntry, a as BlockReason, b as EnforcementActionSchema, c as ChallengeParamsSchema, d as ConditionOperator, f as ConditionOperatorSchema, g as DecisionSchema, h as Decision, i as AssuranceTierSchema, j as PolicyRule, k as PolicyMetadata, l as ConditionField, m as ConditionValueSchema, n as AllowListEntrySchema, o as BlockReasonSchema, p as ConditionValue, r as AssuranceTier, s as ChallengeParams, t as AllowListEntry, u as ConditionFieldSchema, v as DenyListEntrySchema, w as InstructPayloadSchema, x as EnforcementMode, y as EnforcementAction, z as ThresholdConfig } from "../schemas-BhC88D1-.mjs";
3
3
  export { AllowListEntry, AllowListEntrySchema, AssuranceTier, AssuranceTierSchema, BlockReason, BlockReasonSchema, ChallengeParams, ChallengeParamsSchema, ConditionField, ConditionFieldSchema, ConditionOperator, ConditionOperatorSchema, ConditionValue, ConditionValueSchema, Decision, DecisionSchema, DenyListEntry, DenyListEntrySchema, EnforcementAction, EnforcementActionSchema, EnforcementMode, EnforcementModeSchema, InstructPayload, InstructPayloadSchema, PolicyCondition, PolicyConditionSchema, PolicyConfig, PolicyConfigSchema, PolicyMetadata, PolicyMetadataSchema, PolicyRule, PolicyRuleSchema, RedirectTarget, RedirectTargetSchema, RuleMetadata, RuleMetadataSchema, SuggestedAction, SuggestedActionSchema, ThresholdConfig, ThresholdConfigSchema, isEngineEnforcing, normalizeChallengeType, safeParsePolicyConfig };
@@ -1,3 +1,3 @@
1
1
  import { n as normalizeChallengeType, t as isEngineEnforcing } from "../engine-enforcing-DiOclGqf.js";
2
- import { A as PolicyMetadataSchema, B as ThresholdConfigSchema, C as InstructPayload, D as PolicyConfig, E as PolicyConditionSchema, F as RuleMetadata, I as RuleMetadataSchema, L as SuggestedAction, M as PolicyRuleSchema, N as RedirectTarget, O as PolicyConfigSchema, P as RedirectTargetSchema, R as SuggestedActionSchema, S as EnforcementModeSchema, T as PolicyCondition, V as safeParsePolicyConfig, _ as DenyListEntry, a as BlockReason, b as EnforcementActionSchema, c as ChallengeParamsSchema, d as ConditionOperator, f as ConditionOperatorSchema, g as DecisionSchema, h as Decision, i as AssuranceTierSchema, j as PolicyRule, k as PolicyMetadata, l as ConditionField, m as ConditionValueSchema, n as AllowListEntrySchema, o as BlockReasonSchema, p as ConditionValue, r as AssuranceTier, s as ChallengeParams, t as AllowListEntry, u as ConditionFieldSchema, v as DenyListEntrySchema, w as InstructPayloadSchema, x as EnforcementMode, y as EnforcementAction, z as ThresholdConfig } from "../schemas-C_3C72SR.js";
2
+ import { A as PolicyMetadataSchema, B as ThresholdConfigSchema, C as InstructPayload, D as PolicyConfig, E as PolicyConditionSchema, F as RuleMetadata, I as RuleMetadataSchema, L as SuggestedAction, M as PolicyRuleSchema, N as RedirectTarget, O as PolicyConfigSchema, P as RedirectTargetSchema, R as SuggestedActionSchema, S as EnforcementModeSchema, T as PolicyCondition, V as safeParsePolicyConfig, _ as DenyListEntry, a as BlockReason, b as EnforcementActionSchema, c as ChallengeParamsSchema, d as ConditionOperator, f as ConditionOperatorSchema, g as DecisionSchema, h as Decision, i as AssuranceTierSchema, j as PolicyRule, k as PolicyMetadata, l as ConditionField, m as ConditionValueSchema, n as AllowListEntrySchema, o as BlockReasonSchema, p as ConditionValue, r as AssuranceTier, s as ChallengeParams, t as AllowListEntry, u as ConditionFieldSchema, v as DenyListEntrySchema, w as InstructPayloadSchema, x as EnforcementMode, y as EnforcementAction, z as ThresholdConfig } from "../schemas-DZa1ouGs.js";
3
3
  export { AllowListEntry, AllowListEntrySchema, AssuranceTier, AssuranceTierSchema, BlockReason, BlockReasonSchema, ChallengeParams, ChallengeParamsSchema, ConditionField, ConditionFieldSchema, ConditionOperator, ConditionOperatorSchema, ConditionValue, ConditionValueSchema, Decision, DecisionSchema, DenyListEntry, DenyListEntrySchema, EnforcementAction, EnforcementActionSchema, EnforcementMode, EnforcementModeSchema, InstructPayload, InstructPayloadSchema, PolicyCondition, PolicyConditionSchema, PolicyConfig, PolicyConfigSchema, PolicyMetadata, PolicyMetadataSchema, PolicyRule, PolicyRuleSchema, RedirectTarget, RedirectTargetSchema, RuleMetadata, RuleMetadataSchema, SuggestedAction, SuggestedActionSchema, ThresholdConfig, ThresholdConfigSchema, isEngineEnforcing, normalizeChallengeType, safeParsePolicyConfig };
@@ -101,14 +101,93 @@ function looksLikeVcJwt(token) {
101
101
  /** Same definition as the .NET / Java `IsCredentialPresented`. */
102
102
  function requestPresentedCredential(headers) {
103
103
  if (!headers) return false;
104
- for (const name of ["signature-input", "signature"]) {
105
- const value = headerText(headers, name);
106
- if (value && hasKyaMember(value)) return true;
107
- }
104
+ if (requestPresentsKyaSignature(headers)) return true;
108
105
  if (requestCarriesDelegationProof(headers)) return true;
109
106
  const bearer = headerText(headers, "authorization")?.match(/^bearer\s+(\S+)/i);
110
107
  return bearer !== null && bearer !== void 0 && looksLikeVcJwt(bearer[1]);
111
108
  }
109
+ /**
110
+ * True when `Signature-Input` or `Signature` carries a `kya` member, i.e. the
111
+ * request presents a KYA HTTP Binding (kya-http/2) signature. Same member scan
112
+ * as {@link requestPresentedCredential}; routing only, the engine validates it.
113
+ */
114
+ function requestPresentsKyaSignature(headers) {
115
+ if (!headers) return false;
116
+ return ["signature-input", "signature"].some((name) => {
117
+ const value = headerText(headers, name);
118
+ return value !== void 0 && hasKyaMember(value);
119
+ });
120
+ }
121
+ /**
122
+ * True when the request's framing says it carries a body: a
123
+ * `Transfer-Encoding` header, or a `Content-Length` other than exactly `0`
124
+ * (an empty, blank or malformed length counts as a body, so it fails closed).
125
+ * This is `type-is`'s `hasBody`, except that `Content-Length: 0` is an empty
126
+ * body. A kya-http/2 verifier uses it to tell a request with no body apart
127
+ * from one whose body bytes it never received. HTTP/2 can carry a body with
128
+ * neither header, so a host that can read the body should pass its bytes
129
+ * instead of relying on this.
130
+ */
131
+ function requestDeclaresBody(headers) {
132
+ if (!headers) return false;
133
+ if (headerText(headers, "transfer-encoding") !== void 0) return true;
134
+ const contentLength = headerText(headers, "content-length");
135
+ return contentLength !== void 0 && contentLength !== "0";
136
+ }
137
+
138
+ //#endregion
139
+ //#region src/mcpi/signed-body.ts
140
+ /**
141
+ * The body bound of a kya-http/2 (KYA HTTP Binding) signed request.
142
+ *
143
+ * A kya-http/2 signature binds the body through `Content-Digest`, so a host
144
+ * hands the engine the exact body bytes. Every host bounds them the same way,
145
+ * at the .NET adapters' 1 MiB: a larger signed body is answered 413 and never
146
+ * verified in part. In observe mode it goes on without its bytes, and the
147
+ * refusal it would have been is reported.
148
+ */
149
+ /** Largest kya-http/2 signed body a host hands the engine. */
150
+ const KYA_SIGNED_BODY_MAX_BYTES = 1048576;
151
+ /**
152
+ * Read a clone of `request`'s body, stopping at `maxBytes`, so the original
153
+ * body is still owed, whole, downstream. A request with no body stream reads
154
+ * as empty, unless its framing declares a body (one the host dropped): that is
155
+ * `unreadable`, never an empty body.
156
+ *
157
+ * Streamed with an early stop, not `arrayBuffer()`: a chunked body with no
158
+ * `Content-Length` would otherwise be pulled whole (into both branches of the
159
+ * clone's tee) before its size was ever looked at.
160
+ */
161
+ async function readBodyBounded(request, maxBytes) {
162
+ const declaredLength = Number(request.headers.get("content-length"));
163
+ if (Number.isFinite(declaredLength) && declaredLength > maxBytes) return { failure: "too-large" };
164
+ const stream = request.clone().body;
165
+ if (!stream) return requestDeclaresBody(request.headers) ? { failure: "unreadable" } : { bytes: /* @__PURE__ */ new Uint8Array(0) };
166
+ const reader = stream.getReader();
167
+ const chunks = [];
168
+ let total = 0;
169
+ try {
170
+ for (;;) {
171
+ const { done, value } = await reader.read();
172
+ if (done) break;
173
+ total += value.byteLength;
174
+ if (total > maxBytes) {
175
+ reader.cancel().catch(() => void 0);
176
+ return { failure: "too-large" };
177
+ }
178
+ chunks.push(value);
179
+ }
180
+ } catch {
181
+ return { failure: "unreadable" };
182
+ }
183
+ const bytes = new Uint8Array(total);
184
+ let offset = 0;
185
+ for (const chunk of chunks) {
186
+ bytes.set(chunk, offset);
187
+ offset += chunk.byteLength;
188
+ }
189
+ return { bytes };
190
+ }
112
191
 
113
192
  //#endregion
114
193
  //#region src/mcpi/anonymous-principal.ts
@@ -159,6 +238,12 @@ Object.defineProperty(exports, 'DELEGATION_PROOF_HEADERS', {
159
238
  return DELEGATION_PROOF_HEADERS;
160
239
  }
161
240
  });
241
+ Object.defineProperty(exports, 'KYA_SIGNED_BODY_MAX_BYTES', {
242
+ enumerable: true,
243
+ get: function () {
244
+ return KYA_SIGNED_BODY_MAX_BYTES;
245
+ }
246
+ });
162
247
  Object.defineProperty(exports, 'REGISTERED_SID_MAX_LENGTH', {
163
248
  enumerable: true,
164
249
  get: function () {
@@ -171,15 +256,33 @@ Object.defineProperty(exports, 'SID_ATTRIBUTABLE_RESULT', {
171
256
  return SID_ATTRIBUTABLE_RESULT;
172
257
  }
173
258
  });
259
+ Object.defineProperty(exports, 'readBodyBounded', {
260
+ enumerable: true,
261
+ get: function () {
262
+ return readBodyBounded;
263
+ }
264
+ });
174
265
  Object.defineProperty(exports, 'requestCarriesDelegationProof', {
175
266
  enumerable: true,
176
267
  get: function () {
177
268
  return requestCarriesDelegationProof;
178
269
  }
179
270
  });
271
+ Object.defineProperty(exports, 'requestDeclaresBody', {
272
+ enumerable: true,
273
+ get: function () {
274
+ return requestDeclaresBody;
275
+ }
276
+ });
180
277
  Object.defineProperty(exports, 'requestPresentedCredential', {
181
278
  enumerable: true,
182
279
  get: function () {
183
280
  return requestPresentedCredential;
184
281
  }
282
+ });
283
+ Object.defineProperty(exports, 'requestPresentsKyaSignature', {
284
+ enumerable: true,
285
+ get: function () {
286
+ return requestPresentsKyaSignature;
287
+ }
185
288
  });
@@ -101,14 +101,93 @@ function looksLikeVcJwt(token) {
101
101
  /** Same definition as the .NET / Java `IsCredentialPresented`. */
102
102
  function requestPresentedCredential(headers) {
103
103
  if (!headers) return false;
104
- for (const name of ["signature-input", "signature"]) {
105
- const value = headerText(headers, name);
106
- if (value && hasKyaMember(value)) return true;
107
- }
104
+ if (requestPresentsKyaSignature(headers)) return true;
108
105
  if (requestCarriesDelegationProof(headers)) return true;
109
106
  const bearer = headerText(headers, "authorization")?.match(/^bearer\s+(\S+)/i);
110
107
  return bearer !== null && bearer !== void 0 && looksLikeVcJwt(bearer[1]);
111
108
  }
109
+ /**
110
+ * True when `Signature-Input` or `Signature` carries a `kya` member, i.e. the
111
+ * request presents a KYA HTTP Binding (kya-http/2) signature. Same member scan
112
+ * as {@link requestPresentedCredential}; routing only, the engine validates it.
113
+ */
114
+ function requestPresentsKyaSignature(headers) {
115
+ if (!headers) return false;
116
+ return ["signature-input", "signature"].some((name) => {
117
+ const value = headerText(headers, name);
118
+ return value !== void 0 && hasKyaMember(value);
119
+ });
120
+ }
121
+ /**
122
+ * True when the request's framing says it carries a body: a
123
+ * `Transfer-Encoding` header, or a `Content-Length` other than exactly `0`
124
+ * (an empty, blank or malformed length counts as a body, so it fails closed).
125
+ * This is `type-is`'s `hasBody`, except that `Content-Length: 0` is an empty
126
+ * body. A kya-http/2 verifier uses it to tell a request with no body apart
127
+ * from one whose body bytes it never received. HTTP/2 can carry a body with
128
+ * neither header, so a host that can read the body should pass its bytes
129
+ * instead of relying on this.
130
+ */
131
+ function requestDeclaresBody(headers) {
132
+ if (!headers) return false;
133
+ if (headerText(headers, "transfer-encoding") !== void 0) return true;
134
+ const contentLength = headerText(headers, "content-length");
135
+ return contentLength !== void 0 && contentLength !== "0";
136
+ }
137
+
138
+ //#endregion
139
+ //#region src/mcpi/signed-body.ts
140
+ /**
141
+ * The body bound of a kya-http/2 (KYA HTTP Binding) signed request.
142
+ *
143
+ * A kya-http/2 signature binds the body through `Content-Digest`, so a host
144
+ * hands the engine the exact body bytes. Every host bounds them the same way,
145
+ * at the .NET adapters' 1 MiB: a larger signed body is answered 413 and never
146
+ * verified in part. In observe mode it goes on without its bytes, and the
147
+ * refusal it would have been is reported.
148
+ */
149
+ /** Largest kya-http/2 signed body a host hands the engine. */
150
+ const KYA_SIGNED_BODY_MAX_BYTES = 1048576;
151
+ /**
152
+ * Read a clone of `request`'s body, stopping at `maxBytes`, so the original
153
+ * body is still owed, whole, downstream. A request with no body stream reads
154
+ * as empty, unless its framing declares a body (one the host dropped): that is
155
+ * `unreadable`, never an empty body.
156
+ *
157
+ * Streamed with an early stop, not `arrayBuffer()`: a chunked body with no
158
+ * `Content-Length` would otherwise be pulled whole (into both branches of the
159
+ * clone's tee) before its size was ever looked at.
160
+ */
161
+ async function readBodyBounded(request, maxBytes) {
162
+ const declaredLength = Number(request.headers.get("content-length"));
163
+ if (Number.isFinite(declaredLength) && declaredLength > maxBytes) return { failure: "too-large" };
164
+ const stream = request.clone().body;
165
+ if (!stream) return requestDeclaresBody(request.headers) ? { failure: "unreadable" } : { bytes: /* @__PURE__ */ new Uint8Array(0) };
166
+ const reader = stream.getReader();
167
+ const chunks = [];
168
+ let total = 0;
169
+ try {
170
+ for (;;) {
171
+ const { done, value } = await reader.read();
172
+ if (done) break;
173
+ total += value.byteLength;
174
+ if (total > maxBytes) {
175
+ reader.cancel().catch(() => void 0);
176
+ return { failure: "too-large" };
177
+ }
178
+ chunks.push(value);
179
+ }
180
+ } catch {
181
+ return { failure: "unreadable" };
182
+ }
183
+ const bytes = new Uint8Array(total);
184
+ let offset = 0;
185
+ for (const chunk of chunks) {
186
+ bytes.set(chunk, offset);
187
+ offset += chunk.byteLength;
188
+ }
189
+ return { bytes };
190
+ }
112
191
 
113
192
  //#endregion
114
193
  //#region src/mcpi/anonymous-principal.ts
@@ -147,5 +226,5 @@ const REGISTERED_SID_MAX_LENGTH = 100;
147
226
  const SID_ATTRIBUTABLE_RESULT = "verified";
148
227
 
149
228
  //#endregion
150
- export { requestCarriesDelegationProof as a, DELEGATION_PROOF_HEADERS as i, SID_ATTRIBUTABLE_RESULT as n, requestPresentedCredential as o, ANONYMOUS_PRINCIPAL_DID as r, REGISTERED_SID_MAX_LENGTH as t };
151
- //# sourceMappingURL=registered-sid-26hNxp6t.mjs.map
229
+ export { readBodyBounded as a, requestDeclaresBody as c, KYA_SIGNED_BODY_MAX_BYTES as i, requestPresentedCredential as l, SID_ATTRIBUTABLE_RESULT as n, DELEGATION_PROOF_HEADERS as o, ANONYMOUS_PRINCIPAL_DID as r, requestCarriesDelegationProof as s, REGISTERED_SID_MAX_LENGTH as t, requestPresentsKyaSignature as u };
230
+ //# sourceMappingURL=registered-sid-CS9V8nPr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registered-sid-CS9V8nPr.mjs","names":[],"sources":["../src/mcpi/delegation-headers.ts","../src/mcpi/signed-body.ts","../src/mcpi/anonymous-principal.ts","../src/mcpi/registered-sid.ts"],"sourcesContent":["/**\n * Delegation-proof request detection (P2 / DR-1).\n *\n * The engine's L2 delegation-root pinning (`ContextSpec.trustedDelegationRoots`)\n * is consulted for every credential the engine verifies: the delegation-proof\n * headers below AND an `Authorization: Bearer` VC-JWT. Consumers gate root\n * resolution on `requestPresentedCredential`, so the human / no-credential hot\n * path stays a precise no-op.\n *\n * Keeping the header set here (rather than re-listing the literals at each site)\n * is the whole point: a new delegation transport header is added in one place\n * and every verifier surface agrees.\n */\n\n/**\n * Lowercased delegation-proof header names. `kya-os-delegation-credential` is the\n * canonical KYA-OS transport; `kya-delegation` is the legacy envelope form still\n * accepted via `legacyEnvelopeFallback`.\n */\nexport const DELEGATION_PROOF_HEADERS = ['kya-os-delegation-credential', 'kya-delegation'] as const;\n\n/** A header value is \"present\" when it is a non-empty string (or non-empty list). */\nfunction isPresent(value: unknown): boolean {\n if (Array.isArray(value)) return value.length > 0;\n return typeof value === 'string' && value.length > 0;\n}\n\n/**\n * Does the request carry a KYA-OS delegation-proof header?\n *\n * Accepts either a `Headers` instance (Next.js / fetch — case-insensitive\n * lookup) or a plain header record (raw Node/Express headers, gateway worker's\n * lowercased map). Record keys are matched case-insensitively, so callers do not\n * need to pre-normalize. Returns `false` for `null`/`undefined`.\n */\nexport function requestCarriesDelegationProof(\n headers: Headers | Record<string, unknown> | null | undefined\n): boolean {\n if (!headers) return false;\n\n if (typeof (headers as Headers).get === 'function') {\n const h = headers as Headers;\n return DELEGATION_PROOF_HEADERS.some((name) => isPresent(h.get(name)));\n }\n\n const record = headers as Record<string, unknown>;\n const lowerKeyed = new Map<string, unknown>();\n for (const key of Object.keys(record)) {\n lowerKeyed.set(key.toLowerCase(), record[key]);\n }\n return DELEGATION_PROOF_HEADERS.some((name) => isPresent(lowerKeyed.get(name)));\n}\n\nconst MAX_VC_JWT_PAYLOAD_CHARS = 16 * 1024;\n\nfunction headerText(headers: Headers | Record<string, unknown>, name: string): string | undefined {\n if (typeof (headers as Headers).get === 'function') {\n return (headers as Headers).get(name) ?? undefined;\n }\n for (const [key, value] of Object.entries(headers as Record<string, unknown>)) {\n if (key.toLowerCase() !== name) continue;\n if (Array.isArray(value)) return value.join(', ');\n return typeof value === 'string' ? value : undefined;\n }\n return undefined;\n}\n\nfunction isMemberDelimiter(c: string): boolean {\n return c === '=' || c === ';' || c === ',' || c === ' ' || c === '\\t';\n}\n\n// Quote-aware member scan; the engine owns the authoritative parse.\nfunction hasKyaMember(value: string): boolean {\n let memberStart = true;\n let quoted = false;\n let escaped = false;\n for (let i = 0; i < value.length; i++) {\n const c = value[i];\n if (quoted) {\n if (escaped) escaped = false;\n else if (c === '\\\\') escaped = true;\n else if (c === '\"') quoted = false;\n continue;\n }\n if (memberStart) {\n if (c === ' ' || c === '\\t') continue;\n if (\n value.startsWith('kya', i) &&\n (i + 3 === value.length || isMemberDelimiter(value[i + 3]))\n ) {\n return true;\n }\n memberStart = false;\n }\n if (c === '\"') quoted = true;\n else if (c === ',') memberStart = true;\n }\n return false;\n}\n\nfunction decodeBase64UrlJson(segment: string): unknown {\n const padded = segment.replace(/-/g, '+').replace(/_/g, '/');\n const binary = atob(padded + '='.repeat((4 - (padded.length % 4)) % 4));\n const bytes = Uint8Array.from(binary, (ch) => ch.charCodeAt(0));\n return JSON.parse(new TextDecoder().decode(bytes));\n}\n\nfunction isDelegationCredentialPayload(payload: unknown): boolean {\n if (typeof payload !== 'object' || payload === null) return false;\n if ('vc' in payload) return true;\n const type = (payload as { type?: unknown }).type;\n return Array.isArray(type) && type.includes('DelegationCredential');\n}\n\n// Must equal the orchestrator's delegation routing (`vc` claim OR flat `type`\n// DelegationCredential); an oversized payload counts as presented.\nfunction looksLikeVcJwt(token: string): boolean {\n const parts = token.split('.');\n if (parts.length !== 3 || parts.some((part) => part.length === 0)) return false;\n if (parts[1].length > MAX_VC_JWT_PAYLOAD_CHARS) return true;\n try {\n return isDelegationCredentialPayload(decodeBase64UrlJson(parts[1]));\n } catch {\n return false;\n }\n}\n\n/** Same definition as the .NET / Java `IsCredentialPresented`. */\nexport function requestPresentedCredential(\n headers: Headers | Record<string, unknown> | null | undefined\n): boolean {\n if (!headers) return false;\n if (requestPresentsKyaSignature(headers)) return true;\n if (requestCarriesDelegationProof(headers)) return true;\n const authorization = headerText(headers, 'authorization');\n const bearer = authorization?.match(/^bearer\\s+(\\S+)/i);\n return bearer !== null && bearer !== undefined && looksLikeVcJwt(bearer[1]);\n}\n\n/**\n * True when `Signature-Input` or `Signature` carries a `kya` member, i.e. the\n * request presents a KYA HTTP Binding (kya-http/2) signature. Same member scan\n * as {@link requestPresentedCredential}; routing only, the engine validates it.\n */\nexport function requestPresentsKyaSignature(\n headers: Headers | Record<string, unknown> | null | undefined\n): boolean {\n if (!headers) return false;\n return ['signature-input', 'signature'].some((name) => {\n const value = headerText(headers, name);\n return value !== undefined && hasKyaMember(value);\n });\n}\n\n/**\n * True when the request's framing says it carries a body: a\n * `Transfer-Encoding` header, or a `Content-Length` other than exactly `0`\n * (an empty, blank or malformed length counts as a body, so it fails closed).\n * This is `type-is`'s `hasBody`, except that `Content-Length: 0` is an empty\n * body. A kya-http/2 verifier uses it to tell a request with no body apart\n * from one whose body bytes it never received. HTTP/2 can carry a body with\n * neither header, so a host that can read the body should pass its bytes\n * instead of relying on this.\n */\nexport function requestDeclaresBody(\n headers: Headers | Record<string, unknown> | null | undefined\n): boolean {\n if (!headers) return false;\n if (headerText(headers, 'transfer-encoding') !== undefined) return true;\n const contentLength = headerText(headers, 'content-length');\n // A string compare, not Number(): Number('') and Number(' ') are 0.\n return contentLength !== undefined && contentLength !== '0';\n}\n","/**\n * The body bound of a kya-http/2 (KYA HTTP Binding) signed request.\n *\n * A kya-http/2 signature binds the body through `Content-Digest`, so a host\n * hands the engine the exact body bytes. Every host bounds them the same way,\n * at the .NET adapters' 1 MiB: a larger signed body is answered 413 and never\n * verified in part. In observe mode it goes on without its bytes, and the\n * refusal it would have been is reported.\n */\n\nimport { requestDeclaresBody } from './delegation-headers';\n\n/** Largest kya-http/2 signed body a host hands the engine. */\nexport const KYA_SIGNED_BODY_MAX_BYTES = 1_048_576;\n\n/** A bounded read: the whole body, or why there is none. Never a prefix. */\nexport type BoundedBody = { bytes: Uint8Array } | { failure: 'too-large' | 'unreadable' };\n\n/**\n * Read a clone of `request`'s body, stopping at `maxBytes`, so the original\n * body is still owed, whole, downstream. A request with no body stream reads\n * as empty, unless its framing declares a body (one the host dropped): that is\n * `unreadable`, never an empty body.\n *\n * Streamed with an early stop, not `arrayBuffer()`: a chunked body with no\n * `Content-Length` would otherwise be pulled whole (into both branches of the\n * clone's tee) before its size was ever looked at.\n */\nexport async function readBodyBounded(request: Request, maxBytes: number): Promise<BoundedBody> {\n const declaredLength = Number(request.headers.get('content-length'));\n if (Number.isFinite(declaredLength) && declaredLength > maxBytes) {\n return { failure: 'too-large' };\n }\n const stream = request.clone().body;\n if (!stream) {\n return requestDeclaresBody(request.headers)\n ? { failure: 'unreadable' }\n : { bytes: new Uint8Array(0) };\n }\n const reader = stream.getReader();\n const chunks: Uint8Array[] = [];\n let total = 0;\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n total += value.byteLength;\n if (total > maxBytes) {\n // Not awaited: cancelling one branch of a tee settles only once the\n // other branch (the original body, still owed downstream) is\n // cancelled too, so awaiting here would never return.\n reader.cancel().catch(() => undefined);\n return { failure: 'too-large' };\n }\n chunks.push(value);\n }\n } catch {\n return { failure: 'unreadable' };\n }\n const bytes = new Uint8Array(total);\n let offset = 0;\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.byteLength;\n }\n return { bytes };\n}\n","/**\n * Canonical did:web for the anonymous-principal sentinel (see `./principal.ts`).\n * Kept apart from the client DID derivation, which loads `@noble/hashes`, so\n * request-path code can take it from the `./kya-http` lean entry.\n */\nexport const ANONYMOUS_PRINCIPAL_DID = 'did:web:kya.vouched.id:principals:anonymous';\n","/**\n * The registered session anchor (`sid`) contract between a reporter and\n * Checkpoint ingest. Kept apart from `reported-identity.ts`, which builds Zod\n * schemas when it loads, so the runtime and the `./kya-http` entry can read\n * these values without loading Zod.\n */\n\n/**\n * Max length of a registered session anchor (`sid`) accepted on the wire and\n * enforced again at the customer route. The join partner\n * `bouncer_sessions.id` is `varchar(100)`; `detections.registered_sid` stays\n * `text` (converting a live column to `varchar` would take an ACCESS EXCLUSIVE\n * rewrite of the hottest table), so this constant is the width contract\n * instead of the column type.\n */\nexport const REGISTERED_SID_MAX_LENGTH = 100;\n\n/**\n * The one delegation result that may attribute a `sid` to a session timeline.\n * A rejected presentation carries no engine-emitted sid, and a sid on a\n * `failed` / `not_presented` report is attacker-shaped, so ingest stamps\n * `registered_sid` only for this result and nulls it otherwise (D4 / D15).\n * One member on purpose: Section 13 of the plan records how an explicitly\n * unverified-labeled `failed` could join it later.\n */\nexport const SID_ATTRIBUTABLE_RESULT = 'verified' as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,MAAa,2BAA2B,CAAC,gCAAgC,gBAAgB;;AAGzF,SAAS,UAAU,OAAyB;CAC1C,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,SAAS;CAChD,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS;AACrD;;;;;;;;;AAUA,SAAgB,8BACd,SACS;CACT,IAAI,CAAC,SAAS,OAAO;CAErB,IAAI,OAAQ,QAAoB,QAAQ,YAAY;EAClD,MAAM,IAAI;EACV,OAAO,yBAAyB,MAAM,SAAS,UAAU,EAAE,IAAI,IAAI,CAAC,CAAC;CACvE;CAEA,MAAM,SAAS;CACf,MAAM,6BAAa,IAAI,IAAqB;CAC5C,KAAK,MAAM,OAAO,OAAO,KAAK,MAAM,GAClC,WAAW,IAAI,IAAI,YAAY,GAAG,OAAO,IAAI;CAE/C,OAAO,yBAAyB,MAAM,SAAS,UAAU,WAAW,IAA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C1D;;;;;;;;;;;;;;AC/JA,MAAa,4BAA4B;;;;;;;;;;;AAezC,eAAsB,gBAAgB,SAAkB,UAAwC;CAC9F,MAAM,iBAAiB,OAAO,QAAQ,QAAQ,IAAI,gBAAgB,CAAC;CACnE,IAAI,OAAO,SAAS,cAAc,KAAK,iBAAiB,UACtD,OAAO,EAAE,SAAS,YAAY;CAEhC,MAAM,SAAS,QAAQ,MAAM,CAAC,CAAC;CAC/B,IAAI,CAAC,QACH,OAAO,oBAAoB,QAAQ,OAAO,IACtC,EAAE,SAAS,aAAa,IACxB,EAAE,uBAAO,IAAI,WAAW,CAAC,EAAE;CAEjC,MAAM,SAAS,OAAO,UAAU;CAChC,MAAM,SAAuB,CAAC;CAC9B,IAAI,QAAQ;CACZ,IAAI;EACF,SAAS;GACP,MAAM,EAAE,MAAM,UAAU,MAAM,OAAO,KAAK;GAC1C,IAAI,MAAM;GACV,SAAS,MAAM;GACf,IAAI,QAAQ,UAAU;IAIpB,OAAO,OAAO,CAAC,CAAC,YAAY,MAAS;IACrC,OAAO,EAAE,SAAS,YAAY;GAChC;GACA,OAAO,KAAK,KAAK;EACnB;CACF,QAAQ;EACN,OAAO,EAAE,SAAS,aAAa;CACjC;CACA,MAAM,QAAQ,IAAI,WAAW,KAAK;CAClC,IAAI,SAAS;CACb,KAAK,MAAM,SAAS,QAAQ;EAC1B,MAAM,IAAI,OAAO,MAAM;EACvB,UAAU,MAAM;CAClB;CACA,OAAO,EAAE,MAAM;AACjB;;;;;;;;;AC7DA,MAAa,0BAA0B;;;;;;;;;;;;;;;;;;ACUvC,MAAa,4BAA4B;;;;;;;;;AAUzC,MAAa,0BAA0B"}
@@ -21,6 +21,17 @@ declare function getVerificationRiskLevel(method: VerificationMethod, confidence
21
21
  declare const DELEGATION_PROOF_HEADERS: readonly ["kya-os-delegation-credential", "kya-delegation"];
22
22
  declare function requestCarriesDelegationProof(headers: Headers | Record<string, unknown> | null | undefined): boolean;
23
23
  declare function requestPresentedCredential(headers: Headers | Record<string, unknown> | null | undefined): boolean;
24
+ declare function requestPresentsKyaSignature(headers: Headers | Record<string, unknown> | null | undefined): boolean;
25
+ declare function requestDeclaresBody(headers: Headers | Record<string, unknown> | null | undefined): boolean;
26
+ //#endregion
27
+ //#region src/mcpi/signed-body.d.ts
28
+ declare const KYA_SIGNED_BODY_MAX_BYTES = 1048576;
29
+ type BoundedBody = {
30
+ bytes: Uint8Array;
31
+ } | {
32
+ failure: 'too-large' | 'unreadable';
33
+ };
34
+ declare function readBodyBounded(request: Request, maxBytes: number): Promise<BoundedBody>;
24
35
  //#endregion
25
36
  //#region src/mcpi/anonymous-principal.d.ts
26
37
  declare const ANONYMOUS_PRINCIPAL_DID = "did:web:kya.vouched.id:principals:anonymous";
@@ -29,5 +40,5 @@ declare const ANONYMOUS_PRINCIPAL_DID = "did:web:kya.vouched.id:principals:anony
29
40
  declare const REGISTERED_SID_MAX_LENGTH = 100;
30
41
  declare const SID_ATTRIBUTABLE_RESULT: "verified";
31
42
  //#endregion
32
- export { normalizeWireMethod as _, requestCarriesDelegationProof as a, KYA_OS_WIRE_METHODS as c, getVerificationReliability as d, getVerificationRiskLevel as f, normalizeHandshakeMethod as g, isKyaOsWireMethod as h, DELEGATION_PROOF_HEADERS as i, VerificationMethod as l, isKyaOsHandshakeMethod as m, SID_ATTRIBUTABLE_RESULT as n, requestPresentedCredential as o, isHighConfidenceVerification as p, ANONYMOUS_PRINCIPAL_DID as r, KYA_OS_HANDSHAKE_METHODS as s, REGISTERED_SID_MAX_LENGTH as t, getVerificationMethodDescription as u };
33
- //# sourceMappingURL=registered-sid-D6KCaT1E.d.ts.map
43
+ export { normalizeWireMethod as S, getVerificationRiskLevel as _, KYA_SIGNED_BODY_MAX_BYTES as a, isKyaOsWireMethod as b, requestCarriesDelegationProof as c, requestPresentsKyaSignature as d, KYA_OS_HANDSHAKE_METHODS as f, getVerificationReliability as g, getVerificationMethodDescription as h, BoundedBody as i, requestDeclaresBody as l, VerificationMethod as m, SID_ATTRIBUTABLE_RESULT as n, readBodyBounded as o, KYA_OS_WIRE_METHODS as p, ANONYMOUS_PRINCIPAL_DID as r, DELEGATION_PROOF_HEADERS as s, REGISTERED_SID_MAX_LENGTH as t, requestPresentedCredential as u, isHighConfidenceVerification as v, normalizeHandshakeMethod as x, isKyaOsHandshakeMethod as y };
44
+ //# sourceMappingURL=registered-sid-CnWIU_l1.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registered-sid-CnWIU_l1.d.mts","names":[],"sources":["../src/utils/verification.ts","../src/mcpi/delegation-headers.ts","../src/mcpi/signed-body.ts","../src/mcpi/anonymous-principal.ts","../src/mcpi/registered-sid.ts"],"mappings":";KAIY;cA8BC;WAAA;WAAA;;cAOA;WAAA;WAAA;;iBAQG,uBAAuB;iBAKvB,kBAAkB;iBAsBlB,yBAAyB,qCACvC,OAAO,IACN,WAAW,yBAAyB;iBAavB,oBAAoB,qCAClC,OAAO,IACN,WAAW,oBAAoB;iBAOlB,iCAAiC,QAAQ;iBA2BzC,2BAA2B,QAAQ;iBAwBnC,6BAA6B,QAAQ;iBAQrC,yBACd,QAAQ,oBACR;;;cC9IW;iBAgBG,8BACd,SAAS,UAAU;iBA4FL,2BACd,SAAS,UAAU;iBAeL,4BACd,SAAS,UAAU;iBAmBL,oBACd,SAAS,UAAU;;;cCxJR;KAGD;EAAgB,OAAO;;EAAiB;;iBAY9B,gBAAgB,SAAS,SAAS,mBAAmB,QAAQ;;;cCvBtE;;;cCUA;cAUA"}
@@ -21,6 +21,17 @@ declare function getVerificationRiskLevel(method: VerificationMethod, confidence
21
21
  declare const DELEGATION_PROOF_HEADERS: readonly ["kya-os-delegation-credential", "kya-delegation"];
22
22
  declare function requestCarriesDelegationProof(headers: Headers | Record<string, unknown> | null | undefined): boolean;
23
23
  declare function requestPresentedCredential(headers: Headers | Record<string, unknown> | null | undefined): boolean;
24
+ declare function requestPresentsKyaSignature(headers: Headers | Record<string, unknown> | null | undefined): boolean;
25
+ declare function requestDeclaresBody(headers: Headers | Record<string, unknown> | null | undefined): boolean;
26
+ //#endregion
27
+ //#region src/mcpi/signed-body.d.ts
28
+ declare const KYA_SIGNED_BODY_MAX_BYTES = 1048576;
29
+ type BoundedBody = {
30
+ bytes: Uint8Array;
31
+ } | {
32
+ failure: 'too-large' | 'unreadable';
33
+ };
34
+ declare function readBodyBounded(request: Request, maxBytes: number): Promise<BoundedBody>;
24
35
  //#endregion
25
36
  //#region src/mcpi/anonymous-principal.d.ts
26
37
  declare const ANONYMOUS_PRINCIPAL_DID = "did:web:kya.vouched.id:principals:anonymous";
@@ -29,5 +40,5 @@ declare const ANONYMOUS_PRINCIPAL_DID = "did:web:kya.vouched.id:principals:anony
29
40
  declare const REGISTERED_SID_MAX_LENGTH = 100;
30
41
  declare const SID_ATTRIBUTABLE_RESULT: "verified";
31
42
  //#endregion
32
- export { normalizeWireMethod as _, requestCarriesDelegationProof as a, KYA_OS_WIRE_METHODS as c, getVerificationReliability as d, getVerificationRiskLevel as f, normalizeHandshakeMethod as g, isKyaOsWireMethod as h, DELEGATION_PROOF_HEADERS as i, VerificationMethod as l, isKyaOsHandshakeMethod as m, SID_ATTRIBUTABLE_RESULT as n, requestPresentedCredential as o, isHighConfidenceVerification as p, ANONYMOUS_PRINCIPAL_DID as r, KYA_OS_HANDSHAKE_METHODS as s, REGISTERED_SID_MAX_LENGTH as t, getVerificationMethodDescription as u };
33
- //# sourceMappingURL=registered-sid-D6KCaT1E.d.mts.map
43
+ export { normalizeWireMethod as S, getVerificationRiskLevel as _, KYA_SIGNED_BODY_MAX_BYTES as a, isKyaOsWireMethod as b, requestCarriesDelegationProof as c, requestPresentsKyaSignature as d, KYA_OS_HANDSHAKE_METHODS as f, getVerificationReliability as g, getVerificationMethodDescription as h, BoundedBody as i, requestDeclaresBody as l, VerificationMethod as m, SID_ATTRIBUTABLE_RESULT as n, readBodyBounded as o, KYA_OS_WIRE_METHODS as p, ANONYMOUS_PRINCIPAL_DID as r, DELEGATION_PROOF_HEADERS as s, REGISTERED_SID_MAX_LENGTH as t, requestPresentedCredential as u, isHighConfidenceVerification as v, normalizeHandshakeMethod as x, isKyaOsHandshakeMethod as y };
44
+ //# sourceMappingURL=registered-sid-CnWIU_l1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registered-sid-CnWIU_l1.d.ts","names":[],"sources":["../src/utils/verification.ts","../src/mcpi/delegation-headers.ts","../src/mcpi/signed-body.ts","../src/mcpi/anonymous-principal.ts","../src/mcpi/registered-sid.ts"],"mappings":";KAIY;cA8BC;WAAA;WAAA;;cAOA;WAAA;WAAA;;iBAQG,uBAAuB;iBAKvB,kBAAkB;iBAsBlB,yBAAyB,qCACvC,OAAO,IACN,WAAW,yBAAyB;iBAavB,oBAAoB,qCAClC,OAAO,IACN,WAAW,oBAAoB;iBAOlB,iCAAiC,QAAQ;iBA2BzC,2BAA2B,QAAQ;iBAwBnC,6BAA6B,QAAQ;iBAQrC,yBACd,QAAQ,oBACR;;;cC9IW;iBAgBG,8BACd,SAAS,UAAU;iBA4FL,2BACd,SAAS,UAAU;iBAeL,4BACd,SAAS,UAAU;iBAmBL,oBACd,SAAS,UAAU;;;cCxJR;KAGD;EAAgB,OAAO;;EAAiB;;iBAY9B,gBAAgB,SAAS,SAAS,mBAAmB,QAAQ;;;cCvBtE;;;cCUA;cAUA"}
@@ -250,18 +250,18 @@ declare const AllowListEntrySchema: ZodObject<{
250
250
  addedBy: ZodOptional<ZodString>;
251
251
  }, $strip>;
252
252
  declare const ConditionOperatorSchema: ZodEnum<{
253
+ in: "in";
254
+ matches: "matches";
255
+ endsWith: "endsWith";
256
+ startsWith: "startsWith";
253
257
  equals: "equals";
254
258
  notEquals: "notEquals";
255
259
  contains: "contains";
256
260
  notContains: "notContains";
257
- startsWith: "startsWith";
258
- endsWith: "endsWith";
259
261
  greaterThan: "greaterThan";
260
262
  lessThan: "lessThan";
261
263
  greaterThanOrEquals: "greaterThanOrEquals";
262
264
  lessThanOrEquals: "lessThanOrEquals";
263
- matches: "matches";
264
- in: "in";
265
265
  notIn: "notIn";
266
266
  }>;
267
267
  declare const ConditionFieldSchema: ZodEnum<{
@@ -301,18 +301,18 @@ declare const PolicyConditionSchema: ZodObject<{
301
301
  hasValidDelegation: "hasValidDelegation";
302
302
  }>;
303
303
  operator: ZodEnum<{
304
+ in: "in";
305
+ matches: "matches";
306
+ endsWith: "endsWith";
307
+ startsWith: "startsWith";
304
308
  equals: "equals";
305
309
  notEquals: "notEquals";
306
310
  contains: "contains";
307
311
  notContains: "notContains";
308
- startsWith: "startsWith";
309
- endsWith: "endsWith";
310
312
  greaterThan: "greaterThan";
311
313
  lessThan: "lessThan";
312
314
  greaterThanOrEquals: "greaterThanOrEquals";
313
315
  lessThanOrEquals: "lessThanOrEquals";
314
- matches: "matches";
315
- in: "in";
316
316
  notIn: "notIn";
317
317
  }>;
318
318
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -347,18 +347,18 @@ declare const PolicyRuleSchema: ZodObject<{
347
347
  hasValidDelegation: "hasValidDelegation";
348
348
  }>;
349
349
  operator: ZodEnum<{
350
+ in: "in";
351
+ matches: "matches";
352
+ endsWith: "endsWith";
353
+ startsWith: "startsWith";
350
354
  equals: "equals";
351
355
  notEquals: "notEquals";
352
356
  contains: "contains";
353
357
  notContains: "notContains";
354
- startsWith: "startsWith";
355
- endsWith: "endsWith";
356
358
  greaterThan: "greaterThan";
357
359
  lessThan: "lessThan";
358
360
  greaterThanOrEquals: "greaterThanOrEquals";
359
361
  lessThanOrEquals: "lessThanOrEquals";
360
- matches: "matches";
361
- in: "in";
362
362
  notIn: "notIn";
363
363
  }>;
364
364
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -468,18 +468,18 @@ declare const PolicyConfigSchema: ZodObject<{
468
468
  hasValidDelegation: "hasValidDelegation";
469
469
  }>;
470
470
  operator: ZodEnum<{
471
+ in: "in";
472
+ matches: "matches";
473
+ endsWith: "endsWith";
474
+ startsWith: "startsWith";
471
475
  equals: "equals";
472
476
  notEquals: "notEquals";
473
477
  contains: "contains";
474
478
  notContains: "notContains";
475
- startsWith: "startsWith";
476
- endsWith: "endsWith";
477
479
  greaterThan: "greaterThan";
478
480
  lessThan: "lessThan";
479
481
  greaterThanOrEquals: "greaterThanOrEquals";
480
482
  lessThanOrEquals: "lessThanOrEquals";
481
- matches: "matches";
482
- in: "in";
483
483
  notIn: "notIn";
484
484
  }>;
485
485
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -532,4 +532,4 @@ type PolicyConfig = output<typeof PolicyConfigSchema>;
532
532
  declare function safeParsePolicyConfig(data: unknown): PolicyConfig | null;
533
533
  //#endregion
534
534
  export { PolicyMetadataSchema as A, ThresholdConfigSchema as B, InstructPayload as C, PolicyConfig as D, PolicyConditionSchema as E, RuleMetadata as F, RuleMetadataSchema as I, SuggestedAction as L, PolicyRuleSchema as M, RedirectTarget as N, PolicyConfigSchema as O, RedirectTargetSchema as P, SuggestedActionSchema as R, EnforcementModeSchema as S, PolicyCondition as T, safeParsePolicyConfig as V, DenyListEntry as _, BlockReason as a, EnforcementActionSchema as b, ChallengeParamsSchema as c, ConditionOperator as d, ConditionOperatorSchema as f, DecisionSchema as g, Decision as h, AssuranceTierSchema as i, PolicyRule as j, PolicyMetadata as k, ConditionField as l, ConditionValueSchema as m, AllowListEntrySchema as n, BlockReasonSchema as o, ConditionValue as p, AssuranceTier as r, ChallengeParams as s, AllowListEntry as t, ConditionFieldSchema as u, DenyListEntrySchema as v, InstructPayloadSchema as w, EnforcementMode as x, EnforcementAction as y, ThresholdConfig as z };
535
- //# sourceMappingURL=schemas-02CI7jgm.d.mts.map
535
+ //# sourceMappingURL=schemas-BhC88D1-.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas-02CI7jgm.d.mts","names":[],"sources":["../src/policy/schemas.ts"],"mappings":";;cAiCa,yBA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqB3B;cAMW,sBAAoB;;;;GAI/B;cAEW,oBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsF7B;KAMU,oBAAoB,cAAe;KACnC,kBAAkB,cAAe;KACjC,gBAAgB,cAAe;KAC/B,iBAAiB,cAAe;KAChC,oBAAoB,cAAe;KACnC,iBAAiB,cAAe;KAChC,iBAAiB,cAAe;KAChC,kBAAkB,cAAe;KACjC,eAAe,cAAe;KAC9B,aAAa,cAAe;KAC5B,iBAAiB,cAAe;KAChC,eAAe,cAAe;iBAW1B,sBAAsB,gBAAgB"}
@@ -250,18 +250,18 @@ declare const AllowListEntrySchema: ZodObject<{
250
250
  addedBy: ZodOptional<ZodString>;
251
251
  }, $strip>;
252
252
  declare const ConditionOperatorSchema: ZodEnum<{
253
+ in: "in";
254
+ matches: "matches";
255
+ endsWith: "endsWith";
256
+ startsWith: "startsWith";
253
257
  equals: "equals";
254
258
  notEquals: "notEquals";
255
259
  contains: "contains";
256
260
  notContains: "notContains";
257
- startsWith: "startsWith";
258
- endsWith: "endsWith";
259
261
  greaterThan: "greaterThan";
260
262
  lessThan: "lessThan";
261
263
  greaterThanOrEquals: "greaterThanOrEquals";
262
264
  lessThanOrEquals: "lessThanOrEquals";
263
- matches: "matches";
264
- in: "in";
265
265
  notIn: "notIn";
266
266
  }>;
267
267
  declare const ConditionFieldSchema: ZodEnum<{
@@ -301,18 +301,18 @@ declare const PolicyConditionSchema: ZodObject<{
301
301
  hasValidDelegation: "hasValidDelegation";
302
302
  }>;
303
303
  operator: ZodEnum<{
304
+ in: "in";
305
+ matches: "matches";
306
+ endsWith: "endsWith";
307
+ startsWith: "startsWith";
304
308
  equals: "equals";
305
309
  notEquals: "notEquals";
306
310
  contains: "contains";
307
311
  notContains: "notContains";
308
- startsWith: "startsWith";
309
- endsWith: "endsWith";
310
312
  greaterThan: "greaterThan";
311
313
  lessThan: "lessThan";
312
314
  greaterThanOrEquals: "greaterThanOrEquals";
313
315
  lessThanOrEquals: "lessThanOrEquals";
314
- matches: "matches";
315
- in: "in";
316
316
  notIn: "notIn";
317
317
  }>;
318
318
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -347,18 +347,18 @@ declare const PolicyRuleSchema: ZodObject<{
347
347
  hasValidDelegation: "hasValidDelegation";
348
348
  }>;
349
349
  operator: ZodEnum<{
350
+ in: "in";
351
+ matches: "matches";
352
+ endsWith: "endsWith";
353
+ startsWith: "startsWith";
350
354
  equals: "equals";
351
355
  notEquals: "notEquals";
352
356
  contains: "contains";
353
357
  notContains: "notContains";
354
- startsWith: "startsWith";
355
- endsWith: "endsWith";
356
358
  greaterThan: "greaterThan";
357
359
  lessThan: "lessThan";
358
360
  greaterThanOrEquals: "greaterThanOrEquals";
359
361
  lessThanOrEquals: "lessThanOrEquals";
360
- matches: "matches";
361
- in: "in";
362
362
  notIn: "notIn";
363
363
  }>;
364
364
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -468,18 +468,18 @@ declare const PolicyConfigSchema: ZodObject<{
468
468
  hasValidDelegation: "hasValidDelegation";
469
469
  }>;
470
470
  operator: ZodEnum<{
471
+ in: "in";
472
+ matches: "matches";
473
+ endsWith: "endsWith";
474
+ startsWith: "startsWith";
471
475
  equals: "equals";
472
476
  notEquals: "notEquals";
473
477
  contains: "contains";
474
478
  notContains: "notContains";
475
- startsWith: "startsWith";
476
- endsWith: "endsWith";
477
479
  greaterThan: "greaterThan";
478
480
  lessThan: "lessThan";
479
481
  greaterThanOrEquals: "greaterThanOrEquals";
480
482
  lessThanOrEquals: "lessThanOrEquals";
481
- matches: "matches";
482
- in: "in";
483
483
  notIn: "notIn";
484
484
  }>;
485
485
  value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
@@ -532,4 +532,4 @@ type PolicyConfig = output<typeof PolicyConfigSchema>;
532
532
  declare function safeParsePolicyConfig(data: unknown): PolicyConfig | null;
533
533
  //#endregion
534
534
  export { PolicyMetadataSchema as A, ThresholdConfigSchema as B, InstructPayload as C, PolicyConfig as D, PolicyConditionSchema as E, RuleMetadata as F, RuleMetadataSchema as I, SuggestedAction as L, PolicyRuleSchema as M, RedirectTarget as N, PolicyConfigSchema as O, RedirectTargetSchema as P, SuggestedActionSchema as R, EnforcementModeSchema as S, PolicyCondition as T, safeParsePolicyConfig as V, DenyListEntry as _, BlockReason as a, EnforcementActionSchema as b, ChallengeParamsSchema as c, ConditionOperator as d, ConditionOperatorSchema as f, DecisionSchema as g, Decision as h, AssuranceTierSchema as i, PolicyRule as j, PolicyMetadata as k, ConditionField as l, ConditionValueSchema as m, AllowListEntrySchema as n, BlockReasonSchema as o, ConditionValue as p, AssuranceTier as r, ChallengeParams as s, AllowListEntry as t, ConditionFieldSchema as u, DenyListEntrySchema as v, InstructPayloadSchema as w, EnforcementMode as x, EnforcementAction as y, ThresholdConfig as z };
535
- //# sourceMappingURL=schemas-C_3C72SR.d.ts.map
535
+ //# sourceMappingURL=schemas-DZa1ouGs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas-C_3C72SR.d.ts","names":[],"sources":["../src/policy/schemas.ts"],"mappings":";;cAiCa,yBAAuB;;;;;;;;;cAgBvB,uBAAqB;;;;KAEtB,kBAAkB,cAAe;cAoBhC,mBAAiB,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6C5B;KAEU,cAAc,cAAe;cAS5B,qBAAmB;;;;;;;KASpB,gBAAgB,cAAe;cAQ9B,uBAAqB;;;;;;;;;;;;;;GAsBhC;KAEU,kBAAkB,cAAe;cAIhC,sBAAoB;;;;;GAM/B;KAEU,iBAAiB,cAA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AkB,cAAe;KACjC,gBAAgB,cAAe;KAC/B,iBAAiB,cAAe;KAChC,oBAAoB,cAAe;KACnC,iBAAiB,cAAe;KAChC,iBAAiB,cAAe;KAChC,kBAAkB,cAAe;KACjC,eAAe,cAAe;KAC9B,aAAa,cAAe;KAC5B,iBAAiB,cAAe;KAChC,eAAe,cAAe;iBAW1B,sBAAsB,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/signals/types.ts","../../src/signals/registry.ts","../../src/signals/resolve.ts","../../src/signals/merkle.ts","../../src/signals/session-fingerprint-hash.ts","../../src/signals/device-fingerprint.ts","../../src/signals/validate.ts","../../src/signals/immutability.ts","../../src/signals/docs.ts","../../src/signals/sensitive-attributes.ts"],"mappings":";qBAuBa;KAED,0BAA0B;qBAEzB,0BAA0B;KAU3B;KAQA;KASA;KAEA;EAAkB;;EAAmB;EAAe;;UAS/C;EAEf;EACA;EAEA;EAEA;EACA;EACA;;qBAIW;KAED,wCAAwC;KAMxC;UAgBK;EAEf,aAAa;EACb;EAEA;EAEA;EAEA,iBAAiB;EAEjB;;UAGe;EAEf;EAEA,cAAc;EAEd,gBAAgB;EAChB,MAAM;EACN,aAAa;EACb,SAAS;EACT,MAAM;EACN,OAAO;EAEP;EAEA;EAEA;EACA;EAOA,QAAQ;;qBAIG;qBASA;UASI;EACf;EACA,cAAc;EACd,gBAAgB;EAChB,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA,eAAe;;;;qBCrCJ,iBAAiB;;;wBC3Gd,iBACd,UAAU,oBACV,UAAS,kBACR;wBASa,UACd,UAAU,oBACV,YACA,UAAS,kBACR;wBAKa,mBAAmB,UAAU,qBAAqB;KAItD,iBAAiB,OAAO,aAAa,eAAe;wBAOhD,aAAa,SAAS,qBAAqB;;;KCG/C;EACN;EAAiB;;EACjB;;EACA;EAAe;;UAEJ;EAEf;EAEA,QAAQ;;UAGO;EAEf;EAKA;EACA,QAAQ,eAAe;;UAGR;EAEf,iBAAiB;EAEjB;EAEA,QAAQ,QAAQ,OAAO,aAAa;;wBAiFtB,qBACd,UAAU,oBACV,UAAU,eAAe,gBACzB,kBAAiB,kBAChB;;;wBC7Fa,8BACd,kBAAkB;;;qBCjFP;qBAEA;KAED;UAEK;WACN,MAAM;WACN;WACA;WACA;;qBA2BE;qBAEA;qBAEA;qBA6BA,iCAAiC,oBAAoB;wBAmMlD,0BAA0B;wBAK1B,iCAAiC;wBA4BjC,6BACd,YAAY,SAAS,6CACpB;wBAgBa,4BACd,YAAY,SAAS,6CACpB;wBAWa,yBACd,YAAY,SAAS;;;UCtUN;EACf;EACA;;wBAac,iBAAiB,SAAS,qBAAqB;;;UCpB9C;EACf;EACA;EACA;;UAGe;EACf;EACA,YAAY;;wBAgBE,yBAAyB,QAAQ,mBAAmB;wBA0BpD,yBACd,WAAW,kBACX,MAAM,qBACL;wBA0Ea,eACd,WAAW,kBACX,MAAM,qBACL;;;wBCzEa,yBAAyB,UAAU;;;qBCLtC,0CAA0C;UAGtC;EACf,UAAU;EACV;EAEA;EAOA;;qBAGW,oCAAoC,OAC/C,+BACA;UA8Ge;EACf;EACA,UAAU;EAEV;EAEA;EACA;EACA;;qBAGW,wBAAwB;KAsCzB;UAMK;EACf,MAAM;EAEN,UAAU;EAEV;EACA;EACA;;wBAiCc,iBACd,QAAQ,KAAK,mDACb,UAAS,gCACR;wBAwBa,qBACd,kBACA,yBACC;wBAoBa,sBACd,QAAQ,KAAK,8CACb,UAAS,gCACR;wBAuBa,2BACd,QAAQ,wCACR,iBAAgB,gCACf;wBAsCa,qCACd,QAAQ,mBACP;qBAiBU,yCAAyC;WAC3C;WACA,YAAY;EAET,YAAA,kBAAkB,YAAY;;wBAqB5B,eAAe,YAAY,mBAAmB;wBAa9C,kCAAkC,QAAQ;EACxD;EACA,YAAY;;wBAaE,+BACd,SAAS,oBACT,iBAAgB,gCACf"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/signals/types.ts","../../src/signals/registry.ts","../../src/signals/resolve.ts","../../src/signals/merkle.ts","../../src/signals/session-fingerprint-hash.ts","../../src/signals/device-fingerprint.ts","../../src/signals/validate.ts","../../src/signals/immutability.ts","../../src/signals/docs.ts","../../src/signals/sensitive-attributes.ts"],"mappings":";qBAuBa;KAED,0BAA0B;qBAEzB,0BAA0B;KAU3B;KAQA;KASA;KAEA;EAAkB;;EAAmB;EAAe;;UAS/C;EAEf;EACA;EAEA;EAEA;EACA;EACA;;qBAIW;KAED,wCAAwC;KAMxC;UAgBK;EAEf,aAAa;EACb;EAEA;EAEA;EAEA,iBAAiB;EAEjB;;UAGe;EAEf;EAEA,cAAc;EAEd,gBAAgB;EAChB,MAAM;EACN,aAAa;EACb,SAAS;EACT,MAAM;EACN,OAAO;EAEP;EAEA;EAEA;EACA;EAOA,QAAQ;;qBAIG;qBASA;UASI;EACf;EACA,cAAc;EACd,gBAAgB;EAChB,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA,eAAe;;;;qBCrCJ,iBAAiB;;;wBC3Gd,iBACd,UAAU,oBACV,UAAS,kBACR;wBASa,UACd,UAAU,oBACV,YACA,UAAS,kBACR;wBAKa,mBAAmB,UAAU,qBAAqB;KAItD,iBAAiB,OAAO,aAAa,eAAe;wBAOhD,aAAa,SAAS,qBAAqB;;;KCG/C;EACN;EAAiB;;EACjB;;EACA;EAAe;;UAEJ;EAEf;EAEA,QAAQ;;UAGO;EAEf;EAKA;EACA,QAAQ,eAAe;;UAGR;EAEf,iBAAiB;EAEjB;EAEA,QAAQ,QAAQ,OAAO,aAAa;;wBAiFtB,qBACd,UAAU,oBACV,UAAU,eAAe,gBACzB,kBAAiB,kBAChB;;;wBC7Fa,8BACd,kBAAkB;;;qBCjFP;qBAEA;KAED;UAEK;WACN,MAAM;WACN;WACA;WACA;;qBA2BE;qBAEA;qBAEA;qBA6BA,iCAAiC,oBAAoB;wBAuMlD,0BAA0B;wBAK1B,iCAAiC;wBA4BjC,6BACd,YAAY,SAAS,6CACpB;wBAgBa,4BACd,YAAY,SAAS,6CACpB;wBAWa,yBACd,YAAY,SAAS;;;UC1UN;EACf;EACA;;wBAac,iBAAiB,SAAS,qBAAqB;;;UCpB9C;EACf;EACA;EACA;;UAGe;EACf;EACA,YAAY;;wBAgBE,yBAAyB,QAAQ,mBAAmB;wBA0BpD,yBACd,WAAW,kBACX,MAAM,qBACL;wBA0Ea,eACd,WAAW,kBACX,MAAM,qBACL;;;wBCzEa,yBAAyB,UAAU;;;qBCLtC,0CAA0C;UAGtC;EACf,UAAU;EACV;EAEA;EAOA;;qBAGW,oCAAoC,OAC/C,+BACA;UA8Ge;EACf;EACA,UAAU;EAEV;EAEA;EACA;EACA;;qBAGW,wBAAwB;KAsCzB;UAMK;EACf,MAAM;EAEN,UAAU;EAEV;EACA;EACA;;wBAiCc,iBACd,QAAQ,KAAK,mDACb,UAAS,gCACR;wBAwBa,qBACd,kBACA,yBACC;wBAoBa,sBACd,QAAQ,KAAK,8CACb,UAAS,gCACR;wBAuBa,2BACd,QAAQ,wCACR,iBAAgB,gCACf;wBAsCa,qCACd,QAAQ,mBACP;qBAiBU,yCAAyC;WAC3C;WACA,YAAY;EAET,YAAA,kBAAkB,YAAY;;wBAqB5B,eAAe,YAAY,mBAAmB;wBAa9C,kCAAkC,QAAQ;EACxD;EACA,YAAY;;wBAaE,+BACd,SAAS,oBACT,iBAAgB,gCACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/signals/types.ts","../../src/signals/registry.ts","../../src/signals/resolve.ts","../../src/signals/merkle.ts","../../src/signals/session-fingerprint-hash.ts","../../src/signals/device-fingerprint.ts","../../src/signals/validate.ts","../../src/signals/immutability.ts","../../src/signals/docs.ts","../../src/signals/sensitive-attributes.ts"],"mappings":";qBAuBa;KAED,0BAA0B;qBAEzB,0BAA0B;KAU3B;KAQA;KASA;KAEA;EAAkB;;EAAmB;EAAe;;UAS/C;EAEf;EACA;EAEA;EAEA;EACA;EACA;;qBAIW;KA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C,0CAA0C;UAGtC;EACf,UAAU;EACV;EAEA;EAOA;;qBAGW,oCAAoC,OAC/C,+BACA;UA8Ge;EACf;EACA,UAAU;EAEV;EAEA;EACA;EACA;;qBAGW,wBAAwB;KAsCzB;UAMK;EACf,MAAM;EAEN,UAAU;EAEV;EACA;EACA;;wBAiCc,iBACd,QAAQ,KAAK,mDACb,UAAS,gCACR;wBAwBa,qBACd,kBACA,yBACC;wBAoBa,sBACd,QAAQ,KAAK,8CACb,UAAS,gCACR;wBAuBa,2BACd,QAAQ,wCACR,iBAAgB,gCACf;wBAsCa,qCACd,QAAQ,mBACP;qBAiBU,yCAAyC;WAC3C;WACA,YAAY;EAET,YAAA,kBAAkB,YAAY;;wBAqB5B,eAAe,YAAY,mBAAmB;wBAa9C,kCAAkC,QAAQ;EACxD;EACA,YAAY;;wBAaE,+BACd,SAAS,oBACT,iBAAgB,gCACf"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/signals/types.ts","../../src/signals/registry.ts","../../src/signals/resolve.ts","../../src/signals/merkle.ts","../../src/signals/session-fingerprint-hash.ts","../../src/signals/device-fingerprint.ts","../../src/signals/validate.ts","../../src/signals/immutability.ts","../../src/signals/docs.ts","../../src/signals/sensitive-attributes.ts"],"mappings":";qBAuBa;KAED,0BAA0B;qBAEzB,0BAA0B;KAU3B;KAQA;KASA;KAEA;EAAkB;;EAAmB;EAAe;;UAS/C;EAEf;EACA;EAEA;EAEA;EACA;EACA;;qBAIW;KAED,wCAAwC;KAMxC;UAgBK;EAEf,aAAa;EACb;EAEA;EAEA;EAEA,iBAAiB;EAEjB;;UAGe;EAEf;EAEA,cAAc;EAEd,gBAAgB;EAChB,MAAM;EACN,aAAa;EACb,SAAS;EACT,MAAM;EACN,OAAO;EAEP;EAEA;EAEA;EACA;EAOA,QAAQ;;qBAIG;qBASA;UASI;EACf;EACA,cAAc;EACd,gBAAgB;EAChB,SAAS;EACT,MAAM;EACN,OAAO;EACP;EACA,eAAe;;;;qBCrC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