@kya-os/checkpoint-shared 1.7.0 → 1.9.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/CHANGELOG.md +159 -9
- package/README.md +24 -7
- package/dist/agent-catalog.d.mts +12 -0
- package/dist/agent-catalog.d.mts.map +1 -0
- package/dist/agent-catalog.d.ts +12 -0
- package/dist/agent-catalog.d.ts.map +1 -0
- package/dist/agent-catalog.js +105 -0
- package/dist/agent-catalog.mjs +105 -0
- package/dist/agent-catalog.mjs.map +1 -0
- package/dist/beacon-nonce/index.d.mts +1 -0
- package/dist/beacon-nonce/index.d.mts.map +1 -1
- package/dist/beacon-nonce/index.d.ts +1 -0
- package/dist/beacon-nonce/index.d.ts.map +1 -1
- package/dist/beacon-nonce/index.js +9 -3
- package/dist/beacon-nonce/index.mjs +9 -4
- package/dist/beacon-nonce/index.mjs.map +1 -1
- package/dist/beacon-types/index.d.mts +41 -1
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +41 -1
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +153 -4
- package/dist/beacon-types/index.mjs +139 -4
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/{browser-posture-BLhw-MON.d.mts → browser-posture-5fPrsxx7.d.mts} +6 -6
- package/dist/{browser-posture-BLhw-MON.d.mts.map → browser-posture-5fPrsxx7.d.mts.map} +1 -1
- package/dist/{browser-posture-B8YiPa5c.d.ts → browser-posture-CCR1kh5e.d.ts} +6 -6
- package/dist/{browser-posture-B8YiPa5c.d.ts.map → browser-posture-CCR1kh5e.d.ts.map} +1 -1
- package/dist/browser-posture-cookie.js +1 -1
- package/dist/browser-posture-cookie.mjs +1 -1
- package/dist/browser-posture-cookie.mjs.map +1 -1
- package/dist/browser-posture-proof-verifier-DvsOmFrM.js +202 -0
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs +180 -0
- package/dist/browser-posture-proof-verifier-I0HP2Ics.mjs.map +1 -0
- package/dist/browser-posture-proof-verifier.d.mts +25 -0
- package/dist/browser-posture-proof-verifier.d.mts.map +1 -0
- package/dist/browser-posture-proof-verifier.d.ts +25 -0
- package/dist/browser-posture-proof-verifier.d.ts.map +1 -0
- package/dist/browser-posture-proof-verifier.js +7 -0
- package/dist/browser-posture-proof-verifier.mjs +3 -0
- package/dist/browser-posture-proof.d.mts +4 -5
- package/dist/browser-posture-proof.d.mts.map +1 -1
- package/dist/browser-posture-proof.d.ts +4 -5
- package/dist/browser-posture-proof.d.ts.map +1 -1
- package/dist/browser-posture-proof.js +10 -79
- package/dist/browser-posture-proof.mjs +6 -77
- package/dist/browser-posture-proof.mjs.map +1 -1
- package/dist/browser-posture.d.mts +1 -1
- package/dist/browser-posture.d.ts +1 -1
- package/dist/browser-posture.js +6 -5
- package/dist/browser-posture.mjs +4 -3
- package/dist/browser-posture.mjs.map +1 -1
- package/dist/browser.d.mts +25 -286
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +25 -286
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/browser.mjs.map +1 -1
- package/dist/canonical-signer/index.js +30 -28
- package/dist/canonical-signer/index.mjs +31 -1
- package/dist/canonical-signer/index.mjs.map +1 -1
- package/dist/clearance.d.mts +1 -1
- package/dist/clearance.d.ts +1 -1
- package/dist/clearance.js +2 -2
- package/dist/clearance.mjs +2 -2
- package/dist/client-ip-B7w-uHfS.d.mts +55 -0
- package/dist/client-ip-B7w-uHfS.d.mts.map +1 -0
- package/dist/client-ip-B7w-uHfS.d.ts +55 -0
- package/dist/client-ip-B7w-uHfS.d.ts.map +1 -0
- package/dist/{client-ip-CW6pRyLf.js → client-ip-B8wFzJ5f.js} +117 -7
- package/dist/{client-ip-B2Xeo-GK.mjs → client-ip-DIJyr6px.mjs} +113 -9
- package/dist/client-ip-DIJyr6px.mjs.map +1 -0
- package/dist/client-ip.d.mts +2 -2
- package/dist/client-ip.d.ts +2 -2
- package/dist/client-ip.js +3 -2
- package/dist/client-ip.mjs +2 -2
- package/dist/consent-handoff.d.mts +0 -3
- package/dist/consent-handoff.d.mts.map +1 -1
- package/dist/consent-handoff.d.ts +0 -3
- package/dist/consent-handoff.d.ts.map +1 -1
- package/dist/consent-handoff.mjs.map +1 -1
- package/dist/default-sign-in-host.d.mts +10 -0
- package/dist/default-sign-in-host.d.mts.map +1 -0
- package/dist/default-sign-in-host.d.ts +10 -0
- package/dist/default-sign-in-host.d.ts.map +1 -0
- package/dist/default-sign-in-host.js +72 -0
- package/dist/default-sign-in-host.mjs +66 -0
- package/dist/default-sign-in-host.mjs.map +1 -0
- package/dist/detection-reason-mapping-B9RSkOs8.js +277 -0
- package/dist/detection-reason-mapping-BGymWIPl.mjs +249 -0
- package/dist/detection-reason-mapping-BGymWIPl.mjs.map +1 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.mts +52 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.mts.map +1 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.ts +52 -0
- package/dist/detection-reason-mapping-CQexNvR7.d.ts.map +1 -0
- package/dist/engine-enforcing-AYEcgNsb.js +39 -0
- package/dist/engine-enforcing-B5eNfCpG.mjs +29 -0
- package/dist/engine-enforcing-B5eNfCpG.mjs.map +1 -0
- package/dist/engine-enforcing-DiOclGqf.d.mts +11 -0
- package/dist/engine-enforcing-DiOclGqf.d.mts.map +1 -0
- package/dist/engine-enforcing-DiOclGqf.d.ts +11 -0
- package/dist/engine-enforcing-DiOclGqf.d.ts.map +1 -0
- package/dist/engine-info.d.mts +2 -0
- package/dist/engine-info.d.ts +2 -0
- package/dist/engine-info.js +4 -0
- package/dist/engine-info.mjs +3 -0
- package/dist/errors/index.d.mts +6 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +28 -6
- package/dist/errors/index.mjs +28 -6
- package/dist/errors/index.mjs.map +1 -1
- package/dist/{external-B7WI9FyQ.d.ts → external-m3Kmafwj.d.mts} +2 -2
- package/dist/{external-B7WI9FyQ.d.mts.map → external-m3Kmafwj.d.mts.map} +1 -1
- package/dist/{external-B7WI9FyQ.d.mts → external-m3Kmafwj.d.ts} +2 -2
- package/dist/{external-B7WI9FyQ.d.ts.map → external-m3Kmafwj.d.ts.map} +1 -1
- package/dist/fetcher-C8qvwdnA.d.ts +44 -0
- package/dist/fetcher-C8qvwdnA.d.ts.map +1 -0
- package/dist/fetcher-D2vjr7jB.d.mts +44 -0
- package/dist/fetcher-D2vjr7jB.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.mts +1 -3
- package/dist/gateway-client-ip.d.mts.map +1 -1
- package/dist/gateway-client-ip.d.ts +1 -3
- package/dist/gateway-client-ip.d.ts.map +1 -1
- package/dist/gateway-client-ip.js +2 -2
- package/dist/gateway-client-ip.mjs +2 -2
- package/dist/gateway-client-ip.mjs.map +1 -1
- package/dist/host-adapter/index.d.mts +2 -2
- package/dist/host-adapter/index.d.ts +2 -2
- package/dist/host-adapter/index.js +2 -1
- package/dist/host-adapter/index.mjs +2 -2
- package/dist/{host-adapter-C-4IxmqM.mjs → host-adapter-BKdQHwbi.mjs} +56 -3
- package/dist/{host-adapter-C-4IxmqM.mjs.map → host-adapter-BKdQHwbi.mjs.map} +1 -1
- package/dist/{host-adapter-CwW9YB0U.js → host-adapter-bWftXA9T.js} +60 -1
- package/dist/index-DnFsmr_o.d.ts +156 -0
- package/dist/index-DnFsmr_o.d.ts.map +1 -0
- package/dist/index-rvw5Bz-r.d.mts +156 -0
- package/dist/index-rvw5Bz-r.d.mts.map +1 -0
- package/dist/index.d.mts +6681 -11335
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6681 -11335
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2322 -6900
- package/dist/index.mjs +2236 -6574
- package/dist/index.mjs.map +1 -1
- package/dist/{kya-http-error-codes-UYb1zpGM.js → kya-http-error-codes-B4rUmUEI.js} +2 -0
- package/dist/{kya-http-error-codes-7ewV5RuK.d.ts → kya-http-error-codes-C14E4gi3.d.mts} +2 -1
- package/dist/kya-http-error-codes-C14E4gi3.d.mts.map +1 -0
- package/dist/{kya-http-error-codes-7ewV5RuK.d.mts → kya-http-error-codes-C14E4gi3.d.ts} +2 -1
- package/dist/kya-http-error-codes-C14E4gi3.d.ts.map +1 -0
- package/dist/{kya-http-error-codes-C2JiWPsi.mjs → kya-http-error-codes-DSBrxNry.mjs} +3 -1
- package/dist/kya-http-error-codes-DSBrxNry.mjs.map +1 -0
- package/dist/kya-http.d.mts +3 -3
- package/dist/kya-http.d.ts +3 -3
- package/dist/kya-http.js +10 -2
- package/dist/kya-http.mjs +4 -3
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -1
- package/dist/mcpi/status-list/index.d.mts +72 -0
- package/dist/mcpi/status-list/index.d.mts.map +1 -0
- package/dist/mcpi/status-list/index.d.ts +72 -0
- package/dist/mcpi/status-list/index.d.ts.map +1 -0
- package/dist/mcpi/status-list/index.js +703 -0
- package/dist/mcpi/status-list/index.mjs +684 -0
- package/dist/mcpi/status-list/index.mjs.map +1 -0
- package/dist/patterns-Bp40cwh2.d.mts +110 -0
- package/dist/patterns-Bp40cwh2.d.mts.map +1 -0
- package/dist/patterns-Bp40cwh2.d.ts +110 -0
- package/dist/patterns-Bp40cwh2.d.ts.map +1 -0
- package/dist/patterns-CiMpbdAF.js +243 -0
- package/dist/patterns-D4OAsNQY.mjs +173 -0
- package/dist/patterns-D4OAsNQY.mjs.map +1 -0
- package/dist/patterns.d.mts +2 -0
- package/dist/patterns.d.ts +2 -0
- package/dist/patterns.js +15 -0
- package/dist/patterns.mjs +3 -0
- package/dist/policy/enforcement.d.mts +3 -2
- package/dist/policy/enforcement.d.ts +3 -2
- package/dist/policy/enforcement.js +8 -2
- package/dist/policy/enforcement.mjs +3 -2
- package/dist/policy/fetcher.d.mts +2 -0
- package/dist/policy/fetcher.d.ts +2 -0
- package/dist/policy/fetcher.js +240 -0
- package/dist/policy/fetcher.mjs +238 -0
- package/dist/policy/fetcher.mjs.map +1 -0
- package/dist/policy/schemas.d.mts +3 -0
- package/dist/policy/schemas.d.ts +3 -0
- package/dist/policy/schemas.js +27 -0
- package/dist/policy/schemas.mjs +4 -0
- package/dist/{posture-origins-Ba83O0cD.mjs → posture-origins-Ci6k4Zh1.js} +24 -173
- package/dist/{posture-origins-CdVOdiMT.js → posture-origins-DGyS4Vuk.mjs} +2 -267
- package/dist/posture-origins-DGyS4Vuk.mjs.map +1 -0
- package/dist/{project-verification-key-BccT12tQ.js → project-verification-key-B-L3D2nC.js} +1 -1
- package/dist/{project-verification-key-66N4edKn.mjs → project-verification-key-CWXdu3-n.mjs} +2 -2
- package/dist/{project-verification-key-66N4edKn.mjs.map → project-verification-key-CWXdu3-n.mjs.map} +1 -1
- package/dist/provider-registry.d.mts +2 -0
- package/dist/provider-registry.d.ts +2 -0
- package/dist/provider-registry.js +51 -0
- package/dist/provider-registry.mjs +3 -0
- package/dist/reason-codes.d.mts +2 -0
- package/dist/reason-codes.d.ts +2 -0
- package/dist/reason-codes.js +8 -0
- package/dist/reason-codes.mjs +3 -0
- package/dist/{registered-sid-hUl-bvM5.mjs → registered-sid-26hNxp6t.mjs} +11 -2
- package/dist/registered-sid-26hNxp6t.mjs.map +1 -0
- package/dist/registered-sid-D6KCaT1E.d.mts +33 -0
- package/dist/registered-sid-D6KCaT1E.d.mts.map +1 -0
- package/dist/registered-sid-D6KCaT1E.d.ts +33 -0
- package/dist/registered-sid-D6KCaT1E.d.ts.map +1 -0
- package/dist/{registered-sid-eLCNZvIF.js → registered-sid-DVGTSH0L.js} +15 -0
- package/dist/ruleset-hash-Cmv8MSO5.js +34 -0
- package/dist/ruleset-hash-IRN5eI9H.d.mts +5 -0
- package/dist/ruleset-hash-IRN5eI9H.d.mts.map +1 -0
- package/dist/ruleset-hash-IRN5eI9H.d.ts +5 -0
- package/dist/ruleset-hash-IRN5eI9H.d.ts.map +1 -0
- package/dist/ruleset-hash-QQIaLuPi.mjs +30 -0
- package/dist/ruleset-hash-QQIaLuPi.mjs.map +1 -0
- package/dist/{schemas-YhagYDx_.js → schemas-BlScS1it.js} +0 -20
- package/dist/{index-HaqfPtaL.d.ts → schemas-CGKHzcMV.d.ts} +23 -195
- package/dist/schemas-CGKHzcMV.d.ts.map +1 -0
- package/dist/schemas-Cm4C4Z5G.js +703 -0
- package/dist/schemas-DPIT8usF.mjs +525 -0
- package/dist/schemas-DPIT8usF.mjs.map +1 -0
- package/dist/{schemas-7qodsG-Z.mjs → schemas-IHAhH3gV.mjs} +2 -16
- package/dist/schemas-IHAhH3gV.mjs.map +1 -0
- package/dist/{index-B7rTovHa.d.mts → schemas-m-GqyfyO.d.mts} +23 -195
- package/dist/schemas-m-GqyfyO.d.mts.map +1 -0
- package/dist/{step-up-COlmWJN8.mjs → step-up-BK0oBi11.mjs} +91 -41
- package/dist/step-up-BK0oBi11.mjs.map +1 -0
- package/dist/{step-up-C2d8C20x.js → step-up-Bp8RAQwv.js} +117 -55
- package/dist/{step-up-BjP--hG-.d.mts → step-up-Bz12gYKT.d.mts} +28 -12
- package/dist/step-up-Bz12gYKT.d.mts.map +1 -0
- package/dist/{step-up-BjP--hG-.d.ts → step-up-Bz12gYKT.d.ts} +28 -12
- package/dist/step-up-Bz12gYKT.d.ts.map +1 -0
- package/dist/test-fixtures/index.d.mts +4 -4
- package/dist/test-fixtures/index.d.mts.map +1 -1
- package/dist/test-fixtures/index.d.ts +4 -4
- package/dist/test-fixtures/index.d.ts.map +1 -1
- package/dist/test-fixtures/index.js +4 -4
- package/dist/test-fixtures/index.mjs +4 -4
- package/dist/test-fixtures/index.mjs.map +1 -1
- package/dist/tool-protection/index.d.mts +12 -0
- package/dist/tool-protection/index.d.mts.map +1 -1
- package/dist/tool-protection/index.d.ts +12 -0
- package/dist/tool-protection/index.d.ts.map +1 -1
- package/dist/tool-protection/index.js +46 -0
- package/dist/tool-protection/index.mjs +44 -1
- package/dist/tool-protection/index.mjs.map +1 -1
- package/dist/verification-BAw9N8Pt.js +181 -0
- package/dist/verification-Cvvv86TT.mjs +123 -0
- package/dist/verification-Cvvv86TT.mjs.map +1 -0
- package/fixtures/client-ip-resolution.n01.json +101 -0
- package/fixtures/kya-http/error-codes.json +2 -1
- package/fixtures/reviewer-grant-revocation.v1.json +53 -81
- package/package.json +55 -4
- package/dist/client-ip-B2Xeo-GK.mjs.map +0 -1
- package/dist/client-ip-DFamiNoz.d.mts +0 -34
- package/dist/client-ip-DFamiNoz.d.mts.map +0 -1
- package/dist/client-ip-DFamiNoz.d.ts +0 -34
- package/dist/client-ip-DFamiNoz.d.ts.map +0 -1
- package/dist/index-B7rTovHa.d.mts.map +0 -1
- package/dist/index-HaqfPtaL.d.ts.map +0 -1
- package/dist/kya-http-error-codes-7ewV5RuK.d.mts.map +0 -1
- package/dist/kya-http-error-codes-7ewV5RuK.d.ts.map +0 -1
- package/dist/kya-http-error-codes-C2JiWPsi.mjs.map +0 -1
- package/dist/posture-origins-Ba83O0cD.mjs.map +0 -1
- package/dist/registered-sid-D3g-gZQF.d.mts +0 -11
- package/dist/registered-sid-D3g-gZQF.d.mts.map +0 -1
- package/dist/registered-sid-D3g-gZQF.d.ts +0 -11
- package/dist/registered-sid-D3g-gZQF.d.ts.map +0 -1
- package/dist/registered-sid-hUl-bvM5.mjs.map +0 -1
- package/dist/schemas-7qodsG-Z.mjs.map +0 -1
- package/dist/step-up-BjP--hG-.d.mts.map +0 -1
- package/dist/step-up-BjP--hG-.d.ts.map +0 -1
- package/dist/step-up-COlmWJN8.mjs.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/core/ruleset-hash.ts
|
|
2
|
+
/**
|
|
3
|
+
* The accepted shapes of `EngineInfo.rulesetHash`, the one definition the
|
|
4
|
+
* dashboard's ingest schema and the SDK detection reporter both test against.
|
|
5
|
+
* No Zod and no imports, so request-path code can load it through the
|
|
6
|
+
* `./engine-info` lean entry.
|
|
7
|
+
*
|
|
8
|
+
* 1. structured per-tier, what `kya-os-engine` emits
|
|
9
|
+
* (`api.rs` `build_engine_info`):
|
|
10
|
+
* `sha256:t1:<slot>:t2:<slot>:t3:<slot>:t4:<slot>`, each slot a 64-hex
|
|
11
|
+
* digest or the literal `unset` or `disabled`.
|
|
12
|
+
* 2. host-synthesized, what the runtime reports when the engine could not
|
|
13
|
+
* run (`hostSynthesizedEngineInfo` in checkpoint-wasm-runtime):
|
|
14
|
+
* `sha256:host-synthesized`.
|
|
15
|
+
* 3. flat `sha256:<64-hex>`, kept for back-compat and a future bundle digest.
|
|
16
|
+
*
|
|
17
|
+
* Anchored to the `sha256:` scheme, so bare hex or an injected value is
|
|
18
|
+
* rejected at the boundary.
|
|
19
|
+
*
|
|
20
|
+
* The engine owns the structured format. Its own test
|
|
21
|
+
* (`ruleset_hash_matches_structured_per_tier_format` in `api.rs`) and the
|
|
22
|
+
* runtime's smoke canary (`engine.smoke.test.ts`) pin the engine side; a
|
|
23
|
+
* change to the tiers changes this regex in the same PR.
|
|
24
|
+
*/
|
|
25
|
+
const TIER_SLOT = String.raw`(?:unset|disabled|[a-f0-9]{64})`;
|
|
26
|
+
const RULESET_HASH_REGEX = new RegExp(String.raw`^sha256:(?:[a-f0-9]{64}|host-synthesized|t1:${TIER_SLOT}:t2:${TIER_SLOT}:t3:${TIER_SLOT}:t4:${TIER_SLOT})$`);
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
Object.defineProperty(exports, 'RULESET_HASH_REGEX', {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return RULESET_HASH_REGEX;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset-hash-IRN5eI9H.d.mts","names":[],"sources":["../src/core/ruleset-hash.ts"],"mappings":";cAyBa,oBAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset-hash-IRN5eI9H.d.ts","names":[],"sources":["../src/core/ruleset-hash.ts"],"mappings":";cAyBa,oBAAkB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/core/ruleset-hash.ts
|
|
2
|
+
/**
|
|
3
|
+
* The accepted shapes of `EngineInfo.rulesetHash`, the one definition the
|
|
4
|
+
* dashboard's ingest schema and the SDK detection reporter both test against.
|
|
5
|
+
* No Zod and no imports, so request-path code can load it through the
|
|
6
|
+
* `./engine-info` lean entry.
|
|
7
|
+
*
|
|
8
|
+
* 1. structured per-tier, what `kya-os-engine` emits
|
|
9
|
+
* (`api.rs` `build_engine_info`):
|
|
10
|
+
* `sha256:t1:<slot>:t2:<slot>:t3:<slot>:t4:<slot>`, each slot a 64-hex
|
|
11
|
+
* digest or the literal `unset` or `disabled`.
|
|
12
|
+
* 2. host-synthesized, what the runtime reports when the engine could not
|
|
13
|
+
* run (`hostSynthesizedEngineInfo` in checkpoint-wasm-runtime):
|
|
14
|
+
* `sha256:host-synthesized`.
|
|
15
|
+
* 3. flat `sha256:<64-hex>`, kept for back-compat and a future bundle digest.
|
|
16
|
+
*
|
|
17
|
+
* Anchored to the `sha256:` scheme, so bare hex or an injected value is
|
|
18
|
+
* rejected at the boundary.
|
|
19
|
+
*
|
|
20
|
+
* The engine owns the structured format. Its own test
|
|
21
|
+
* (`ruleset_hash_matches_structured_per_tier_format` in `api.rs`) and the
|
|
22
|
+
* runtime's smoke canary (`engine.smoke.test.ts`) pin the engine side; a
|
|
23
|
+
* change to the tiers changes this regex in the same PR.
|
|
24
|
+
*/
|
|
25
|
+
const TIER_SLOT = String.raw`(?:unset|disabled|[a-f0-9]{64})`;
|
|
26
|
+
const RULESET_HASH_REGEX = new RegExp(String.raw`^sha256:(?:[a-f0-9]{64}|host-synthesized|t1:${TIER_SLOT}:t2:${TIER_SLOT}:t3:${TIER_SLOT}:t4:${TIER_SLOT})$`);
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { RULESET_HASH_REGEX as t };
|
|
30
|
+
//# sourceMappingURL=ruleset-hash-QQIaLuPi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ruleset-hash-QQIaLuPi.mjs","names":[],"sources":["../src/core/ruleset-hash.ts"],"sourcesContent":["/**\n * The accepted shapes of `EngineInfo.rulesetHash`, the one definition the\n * dashboard's ingest schema and the SDK detection reporter both test against.\n * No Zod and no imports, so request-path code can load it through the\n * `./engine-info` lean entry.\n *\n * 1. structured per-tier, what `kya-os-engine` emits\n * (`api.rs` `build_engine_info`):\n * `sha256:t1:<slot>:t2:<slot>:t3:<slot>:t4:<slot>`, each slot a 64-hex\n * digest or the literal `unset` or `disabled`.\n * 2. host-synthesized, what the runtime reports when the engine could not\n * run (`hostSynthesizedEngineInfo` in checkpoint-wasm-runtime):\n * `sha256:host-synthesized`.\n * 3. flat `sha256:<64-hex>`, kept for back-compat and a future bundle digest.\n *\n * Anchored to the `sha256:` scheme, so bare hex or an injected value is\n * rejected at the boundary.\n *\n * The engine owns the structured format. Its own test\n * (`ruleset_hash_matches_structured_per_tier_format` in `api.rs`) and the\n * runtime's smoke canary (`engine.smoke.test.ts`) pin the engine side; a\n * change to the tiers changes this regex in the same PR.\n */\nconst TIER_SLOT = String.raw`(?:unset|disabled|[a-f0-9]{64})`;\n\nexport const RULESET_HASH_REGEX = new RegExp(\n String.raw`^sha256:(?:[a-f0-9]{64}|host-synthesized|t1:${TIER_SLOT}:t2:${TIER_SLOT}:t3:${TIER_SLOT}:t4:${TIER_SLOT})$`\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAM,YAAY,OAAO,GAAG;AAE5B,MAAa,qBAAqB,IAAI,OACpC,OAAO,GAAG,+CAA+C,UAAU,MAAM,UAAU,MAAM,UAAU,MAAM,UAAU,GACrH"}
|
|
@@ -3643,17 +3643,6 @@ function _array(Class, element, params) {
|
|
|
3643
3643
|
});
|
|
3644
3644
|
}
|
|
3645
3645
|
// @__NO_SIDE_EFFECTS__
|
|
3646
|
-
function _custom(Class, fn, _params) {
|
|
3647
|
-
const norm = normalizeParams(_params);
|
|
3648
|
-
norm.abort ?? (norm.abort = true);
|
|
3649
|
-
return new Class({
|
|
3650
|
-
type: "custom",
|
|
3651
|
-
check: "custom",
|
|
3652
|
-
fn,
|
|
3653
|
-
...norm
|
|
3654
|
-
});
|
|
3655
|
-
}
|
|
3656
|
-
// @__NO_SIDE_EFFECTS__
|
|
3657
3646
|
function _refine(Class, fn, _params) {
|
|
3658
3647
|
return new Class({
|
|
3659
3648
|
type: "custom",
|
|
@@ -5523,9 +5512,6 @@ const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
|
|
|
5523
5512
|
ZodType.init(inst, def);
|
|
5524
5513
|
inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
|
|
5525
5514
|
});
|
|
5526
|
-
function custom(fn, _params) {
|
|
5527
|
-
return _custom(ZodCustom, fn ?? (() => true), _params);
|
|
5528
|
-
}
|
|
5529
5515
|
function refine(fn, _params = {}) {
|
|
5530
5516
|
return _refine(ZodCustom, fn, _params);
|
|
5531
5517
|
}
|
|
@@ -5638,12 +5624,6 @@ Object.defineProperty(exports, 'boolean', {
|
|
|
5638
5624
|
return boolean;
|
|
5639
5625
|
}
|
|
5640
5626
|
});
|
|
5641
|
-
Object.defineProperty(exports, 'custom', {
|
|
5642
|
-
enumerable: true,
|
|
5643
|
-
get: function () {
|
|
5644
|
-
return custom;
|
|
5645
|
-
}
|
|
5646
|
-
});
|
|
5647
5627
|
Object.defineProperty(exports, 'date', {
|
|
5648
5628
|
enumerable: true,
|
|
5649
5629
|
get: function () {
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as KYA_HTTP_ERROR } from "./kya-http-error-codes-7ewV5RuK.js";
|
|
3
|
-
//#region src/host-adapter/verdict-cookie.d.ts
|
|
4
|
-
interface RenderedResponseLike {
|
|
5
|
-
status: number | null;
|
|
6
|
-
headers: Record<string, string>;
|
|
7
|
-
}
|
|
8
|
-
declare const VERDICT_COOKIE_NAME = "__checkpoint_verdict";
|
|
9
|
-
type Verdict = 'allowed' | 'denied' | 'redirected';
|
|
10
|
-
declare function deriveVerdict(rendered: RenderedResponseLike): Verdict;
|
|
11
|
-
declare function encodeVerdictCookie(rendered: RenderedResponseLike): string;
|
|
12
|
-
//#endregion
|
|
13
|
-
//#region src/host-adapter/content-negotiation.d.ts
|
|
14
|
-
declare function acceptsHtml(input: Headers | Record<string, string | string[] | undefined> | string | undefined): boolean;
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/host-adapter/decision-mapping.d.ts
|
|
17
|
-
declare const BLOCKED_PATH = "/blocked";
|
|
18
|
-
type ResponseShape = 'pass-through' | 'redirect' | 'html-block' | 'json-block';
|
|
19
|
-
declare function classifyResponseShape(rendered: RenderedResponseLike, clientAcceptsHtml: boolean): ResponseShape;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/host-adapter/fetcher-envelope.d.ts
|
|
22
|
-
type FetcherHeaderInput = Headers | Record<string, string | string[] | undefined> | undefined;
|
|
23
|
-
declare const ACCEPT_CHALLENGE_HEADER = "kya-accept-challenge";
|
|
24
|
-
declare function serveBodyReadable200(headers: FetcherHeaderInput, detectionClass: unknown, isAgent: boolean): boolean;
|
|
25
|
-
type ChallengeEnvelopeMode = 'spec-401' | 'negotiated' | 'always-200';
|
|
26
|
-
declare function selectBodyReadable200(mode: ChallengeEnvelopeMode, headers: FetcherHeaderInput, detectionClass: unknown, isAgent: boolean): boolean;
|
|
27
|
-
//#endregion
|
|
1
|
+
import { A as ZodString, B as $strip, C as ZodNullable, E as ZodOptional, I as output, N as ZodUnion, O as ZodPrefault, T as ZodObject, g as ZodEnum, h as ZodDiscriminatedUnion, l as ZodArray, m as ZodDefault, t as external_d_exports, u as ZodBoolean, w as ZodNumber, x as ZodLiteral } from "./external-m3Kmafwj.js";
|
|
28
2
|
//#region src/policy/schemas.d.ts
|
|
29
3
|
declare const EnforcementActionSchema: ZodEnum<{
|
|
30
4
|
permit: "permit";
|
|
@@ -35,17 +9,11 @@ declare const EnforcementActionSchema: ZodEnum<{
|
|
|
35
9
|
log: "log";
|
|
36
10
|
instruct: "instruct";
|
|
37
11
|
}>;
|
|
38
|
-
declare const StrictEnforcementActionSchema: ZodEnum<{
|
|
39
|
-
permit: "permit";
|
|
40
|
-
block: "block";
|
|
41
|
-
redirect: "redirect";
|
|
42
|
-
challenge: "challenge";
|
|
43
|
-
instruct: "instruct";
|
|
44
|
-
}>;
|
|
45
12
|
declare const EnforcementModeSchema: ZodEnum<{
|
|
46
13
|
enforce: "enforce";
|
|
47
14
|
observe: "observe";
|
|
48
15
|
}>;
|
|
16
|
+
type EnforcementMode = output<typeof EnforcementModeSchema>;
|
|
49
17
|
declare const BlockReasonSchema: ZodDiscriminatedUnion<[ZodObject<{
|
|
50
18
|
kind: ZodLiteral<"Revoked">;
|
|
51
19
|
}, $strip>, ZodObject<{
|
|
@@ -105,7 +73,6 @@ declare const ChallengeParamsSchema: ZodObject<{
|
|
|
105
73
|
challengeType: ZodOptional<ZodString>;
|
|
106
74
|
}, $strip>;
|
|
107
75
|
type ChallengeParams = output<typeof ChallengeParamsSchema>;
|
|
108
|
-
declare function normalizeChallengeType(challengeType: string | undefined): 'delegation' | 'browser_integrity' | 'human_step_up';
|
|
109
76
|
declare const RedirectTargetSchema: ZodObject<{
|
|
110
77
|
url: ZodString;
|
|
111
78
|
reason: ZodString;
|
|
@@ -284,22 +251,22 @@ declare const AllowListEntrySchema: ZodObject<{
|
|
|
284
251
|
}, $strip>;
|
|
285
252
|
declare const ConditionOperatorSchema: ZodEnum<{
|
|
286
253
|
in: "in";
|
|
254
|
+
matches: "matches";
|
|
255
|
+
endsWith: "endsWith";
|
|
256
|
+
startsWith: "startsWith";
|
|
287
257
|
equals: "equals";
|
|
288
258
|
notEquals: "notEquals";
|
|
289
259
|
contains: "contains";
|
|
290
260
|
notContains: "notContains";
|
|
291
|
-
startsWith: "startsWith";
|
|
292
|
-
endsWith: "endsWith";
|
|
293
261
|
greaterThan: "greaterThan";
|
|
294
262
|
lessThan: "lessThan";
|
|
295
263
|
greaterThanOrEquals: "greaterThanOrEquals";
|
|
296
264
|
lessThanOrEquals: "lessThanOrEquals";
|
|
297
|
-
matches: "matches";
|
|
298
265
|
notIn: "notIn";
|
|
299
266
|
}>;
|
|
300
267
|
declare const ConditionFieldSchema: ZodEnum<{
|
|
301
|
-
path: "path";
|
|
302
268
|
origin: "origin";
|
|
269
|
+
path: "path";
|
|
303
270
|
confidence: "confidence";
|
|
304
271
|
clientDid: "clientDid";
|
|
305
272
|
agentDid: "agentDid";
|
|
@@ -317,8 +284,8 @@ declare const ConditionFieldSchema: ZodEnum<{
|
|
|
317
284
|
declare const ConditionValueSchema: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
|
|
318
285
|
declare const PolicyConditionSchema: ZodObject<{
|
|
319
286
|
field: ZodEnum<{
|
|
320
|
-
path: "path";
|
|
321
287
|
origin: "origin";
|
|
288
|
+
path: "path";
|
|
322
289
|
confidence: "confidence";
|
|
323
290
|
clientDid: "clientDid";
|
|
324
291
|
agentDid: "agentDid";
|
|
@@ -335,17 +302,17 @@ declare const PolicyConditionSchema: ZodObject<{
|
|
|
335
302
|
}>;
|
|
336
303
|
operator: ZodEnum<{
|
|
337
304
|
in: "in";
|
|
305
|
+
matches: "matches";
|
|
306
|
+
endsWith: "endsWith";
|
|
307
|
+
startsWith: "startsWith";
|
|
338
308
|
equals: "equals";
|
|
339
309
|
notEquals: "notEquals";
|
|
340
310
|
contains: "contains";
|
|
341
311
|
notContains: "notContains";
|
|
342
|
-
startsWith: "startsWith";
|
|
343
|
-
endsWith: "endsWith";
|
|
344
312
|
greaterThan: "greaterThan";
|
|
345
313
|
lessThan: "lessThan";
|
|
346
314
|
greaterThanOrEquals: "greaterThanOrEquals";
|
|
347
315
|
lessThanOrEquals: "lessThanOrEquals";
|
|
348
|
-
matches: "matches";
|
|
349
316
|
notIn: "notIn";
|
|
350
317
|
}>;
|
|
351
318
|
value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
|
|
@@ -363,8 +330,8 @@ declare const PolicyRuleSchema: ZodObject<{
|
|
|
363
330
|
priority: ZodDefault<ZodNumber>;
|
|
364
331
|
conditions: ZodArray<ZodObject<{
|
|
365
332
|
field: ZodEnum<{
|
|
366
|
-
path: "path";
|
|
367
333
|
origin: "origin";
|
|
334
|
+
path: "path";
|
|
368
335
|
confidence: "confidence";
|
|
369
336
|
clientDid: "clientDid";
|
|
370
337
|
agentDid: "agentDid";
|
|
@@ -381,17 +348,17 @@ declare const PolicyRuleSchema: ZodObject<{
|
|
|
381
348
|
}>;
|
|
382
349
|
operator: ZodEnum<{
|
|
383
350
|
in: "in";
|
|
351
|
+
matches: "matches";
|
|
352
|
+
endsWith: "endsWith";
|
|
353
|
+
startsWith: "startsWith";
|
|
384
354
|
equals: "equals";
|
|
385
355
|
notEquals: "notEquals";
|
|
386
356
|
contains: "contains";
|
|
387
357
|
notContains: "notContains";
|
|
388
|
-
startsWith: "startsWith";
|
|
389
|
-
endsWith: "endsWith";
|
|
390
358
|
greaterThan: "greaterThan";
|
|
391
359
|
lessThan: "lessThan";
|
|
392
360
|
greaterThanOrEquals: "greaterThanOrEquals";
|
|
393
361
|
lessThanOrEquals: "lessThanOrEquals";
|
|
394
|
-
matches: "matches";
|
|
395
362
|
notIn: "notIn";
|
|
396
363
|
}>;
|
|
397
364
|
value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
|
|
@@ -484,8 +451,8 @@ declare const PolicyConfigSchema: ZodObject<{
|
|
|
484
451
|
priority: ZodDefault<ZodNumber>;
|
|
485
452
|
conditions: ZodArray<ZodObject<{
|
|
486
453
|
field: ZodEnum<{
|
|
487
|
-
path: "path";
|
|
488
454
|
origin: "origin";
|
|
455
|
+
path: "path";
|
|
489
456
|
confidence: "confidence";
|
|
490
457
|
clientDid: "clientDid";
|
|
491
458
|
agentDid: "agentDid";
|
|
@@ -502,17 +469,17 @@ declare const PolicyConfigSchema: ZodObject<{
|
|
|
502
469
|
}>;
|
|
503
470
|
operator: ZodEnum<{
|
|
504
471
|
in: "in";
|
|
472
|
+
matches: "matches";
|
|
473
|
+
endsWith: "endsWith";
|
|
474
|
+
startsWith: "startsWith";
|
|
505
475
|
equals: "equals";
|
|
506
476
|
notEquals: "notEquals";
|
|
507
477
|
contains: "contains";
|
|
508
478
|
notContains: "notContains";
|
|
509
|
-
startsWith: "startsWith";
|
|
510
|
-
endsWith: "endsWith";
|
|
511
479
|
greaterThan: "greaterThan";
|
|
512
480
|
lessThan: "lessThan";
|
|
513
481
|
greaterThanOrEquals: "greaterThanOrEquals";
|
|
514
482
|
lessThanOrEquals: "lessThanOrEquals";
|
|
515
|
-
matches: "matches";
|
|
516
483
|
notIn: "notIn";
|
|
517
484
|
}>;
|
|
518
485
|
value: ZodUnion<readonly [ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString>]>;
|
|
@@ -550,158 +517,19 @@ declare const PolicyConfigSchema: ZodObject<{
|
|
|
550
517
|
trustedDelegationRoots: ZodOptional<ZodArray<ZodString>>;
|
|
551
518
|
authorizationServerIssuer: ZodOptional<ZodString>;
|
|
552
519
|
}, $strip>;
|
|
553
|
-
|
|
554
|
-
agentType: ZodOptional<ZodString>;
|
|
555
|
-
agentName: ZodOptional<ZodString>;
|
|
556
|
-
agentVendor: ZodOptional<ZodString>;
|
|
557
|
-
clientDid: ZodOptional<ZodString>;
|
|
558
|
-
agentDid: ZodOptional<ZodString>;
|
|
559
|
-
confidence: ZodOptional<ZodNumber>;
|
|
560
|
-
reputationScore: ZodOptional<ZodNumber>;
|
|
561
|
-
riskLevel: ZodOptional<ZodString>;
|
|
562
|
-
path: ZodOptional<ZodString>;
|
|
563
|
-
method: ZodOptional<ZodString>;
|
|
564
|
-
origin: ZodOptional<ZodString>;
|
|
565
|
-
userAgent: ZodOptional<ZodString>;
|
|
566
|
-
signatureVerified: ZodDefault<ZodBoolean>;
|
|
567
|
-
isAuthenticated: ZodDefault<ZodBoolean>;
|
|
568
|
-
hasValidDelegation: ZodDefault<ZodBoolean>;
|
|
569
|
-
}, $strip>;
|
|
570
|
-
declare const PolicyMatchTypeSchema: ZodEnum<{
|
|
571
|
-
default: "default";
|
|
572
|
-
threshold: "threshold";
|
|
573
|
-
"allow-list": "allow-list";
|
|
574
|
-
"deny-list": "deny-list";
|
|
575
|
-
rule: "rule";
|
|
576
|
-
}>;
|
|
577
|
-
declare const PolicyEvaluationResultSchema: ZodObject<{
|
|
578
|
-
action: ZodEnum<{
|
|
579
|
-
permit: "permit";
|
|
580
|
-
allow: "allow";
|
|
581
|
-
block: "block";
|
|
582
|
-
redirect: "redirect";
|
|
583
|
-
challenge: "challenge";
|
|
584
|
-
log: "log";
|
|
585
|
-
instruct: "instruct";
|
|
586
|
-
}>;
|
|
587
|
-
reason: ZodString;
|
|
588
|
-
ruleId: ZodOptional<ZodString>;
|
|
589
|
-
ruleName: ZodOptional<ZodString>;
|
|
590
|
-
redirectUrl: ZodOptional<ZodString>;
|
|
591
|
-
message: ZodOptional<ZodString>;
|
|
592
|
-
matchType: ZodEnum<{
|
|
593
|
-
default: "default";
|
|
594
|
-
threshold: "threshold";
|
|
595
|
-
"allow-list": "allow-list";
|
|
596
|
-
"deny-list": "deny-list";
|
|
597
|
-
rule: "rule";
|
|
598
|
-
}>;
|
|
599
|
-
}, $strip>;
|
|
520
|
+
type EnforcementAction = output<typeof EnforcementActionSchema>;
|
|
600
521
|
type ThresholdConfig = output<typeof ThresholdConfigSchema>;
|
|
601
522
|
type DenyListEntry = output<typeof DenyListEntrySchema>;
|
|
602
523
|
type AllowListEntry = output<typeof AllowListEntrySchema>;
|
|
524
|
+
type ConditionOperator = output<typeof ConditionOperatorSchema>;
|
|
525
|
+
type ConditionField = output<typeof ConditionFieldSchema>;
|
|
603
526
|
type ConditionValue = output<typeof ConditionValueSchema>;
|
|
604
527
|
type PolicyCondition = output<typeof PolicyConditionSchema>;
|
|
605
528
|
type RuleMetadata = output<typeof RuleMetadataSchema>;
|
|
606
529
|
type PolicyRule = output<typeof PolicyRuleSchema>;
|
|
607
530
|
type PolicyMetadata = output<typeof PolicyMetadataSchema>;
|
|
608
531
|
type PolicyConfig = output<typeof PolicyConfigSchema>;
|
|
609
|
-
type PolicyEvaluationContext = output<typeof PolicyEvaluationContextSchema>;
|
|
610
|
-
type PolicyEvaluationResult = output<typeof PolicyEvaluationResultSchema>;
|
|
611
|
-
declare function parsePolicyConfig(data: unknown): PolicyConfig;
|
|
612
532
|
declare function safeParsePolicyConfig(data: unknown): PolicyConfig | null;
|
|
613
|
-
declare function parseEvaluationContext(data: unknown): PolicyEvaluationContext;
|
|
614
|
-
//#endregion
|
|
615
|
-
//#region src/host-adapter/challenge-wire.d.ts
|
|
616
|
-
type HeaderEntry = readonly [name: string, value: string];
|
|
617
|
-
type ChallengeWireKind = 'delegation' | 'approval_quorum';
|
|
618
|
-
interface ChallengeWireInputBase {
|
|
619
|
-
realm: string;
|
|
620
|
-
sid: string;
|
|
621
|
-
consentUri: string;
|
|
622
|
-
pickupUri: string;
|
|
623
|
-
requiredScopes?: readonly string[];
|
|
624
|
-
pollIntervalS?: number;
|
|
625
|
-
challengeProof: unknown;
|
|
626
|
-
minAssurance?: AssuranceTier;
|
|
627
|
-
}
|
|
628
|
-
interface DelegationChallengeWireInput extends ChallengeWireInputBase {
|
|
629
|
-
kind?: 'delegation';
|
|
630
|
-
resourceMetadataUri: string;
|
|
631
|
-
}
|
|
632
|
-
interface ApprovalQuorumChallengeWireInput extends ChallengeWireInputBase {
|
|
633
|
-
kind: 'approval_quorum';
|
|
634
|
-
quorum: number;
|
|
635
|
-
actionNonce: string;
|
|
636
|
-
}
|
|
637
|
-
type ChallengeWireInput = DelegationChallengeWireInput | ApprovalQuorumChallengeWireInput;
|
|
638
|
-
interface CommonChallengeKyaos {
|
|
639
|
-
sid: string;
|
|
640
|
-
consent_uri: string;
|
|
641
|
-
pickup_uri: string;
|
|
642
|
-
required_scopes?: string[];
|
|
643
|
-
min_assurance?: AssuranceTier;
|
|
644
|
-
poll_interval_s: number;
|
|
645
|
-
challenge_proof: unknown;
|
|
646
|
-
}
|
|
647
|
-
interface DelegationChallengeKyaos extends CommonChallengeKyaos {
|
|
648
|
-
action: {
|
|
649
|
-
type: 'delegation';
|
|
650
|
-
consent_uri: string;
|
|
651
|
-
pickup_uri: string;
|
|
652
|
-
poll_interval_s: number;
|
|
653
|
-
pin: {
|
|
654
|
-
header: 'X-KYA-Pickup-Token';
|
|
655
|
-
};
|
|
656
|
-
retry: {
|
|
657
|
-
header: 'Authorization';
|
|
658
|
-
scheme: 'Bearer';
|
|
659
|
-
value_from: 'delegation';
|
|
660
|
-
};
|
|
661
|
-
};
|
|
662
|
-
}
|
|
663
|
-
interface ApprovalQuorumChallengeKyaos extends CommonChallengeKyaos {
|
|
664
|
-
kind: 'approval_quorum';
|
|
665
|
-
quorum: number;
|
|
666
|
-
action_nonce: string;
|
|
667
|
-
}
|
|
668
|
-
interface DelegationChallengeBody {
|
|
669
|
-
error: typeof KYA_HTTP_ERROR.AUTHORIZATION_REQUIRED;
|
|
670
|
-
kyaos: DelegationChallengeKyaos | ApprovalQuorumChallengeKyaos;
|
|
671
|
-
instructions: string;
|
|
672
|
-
}
|
|
673
|
-
interface DelegationChallengeEnvelope {
|
|
674
|
-
status: 401 | 200;
|
|
675
|
-
headers: HeaderEntry[];
|
|
676
|
-
body: DelegationChallengeBody;
|
|
677
|
-
}
|
|
678
|
-
type DelegationChallengeEnvelopeMode = 'spec-401' | 'fetcher-200';
|
|
679
|
-
type ChallengeWireErrorCode = 'invalid-realm' | 'invalid-sid' | 'invalid-uri' | 'invalid-scope' | 'invalid-assurance' | 'invalid-interval' | 'invalid-proof' | 'invalid-kind' | 'invalid-quorum' | 'invalid-action-nonce' | 'unsupported-envelope';
|
|
680
|
-
declare class ChallengeWireError extends TypeError {
|
|
681
|
-
readonly code: ChallengeWireErrorCode;
|
|
682
|
-
constructor(code: ChallengeWireErrorCode, message: string);
|
|
683
|
-
}
|
|
684
|
-
declare function generateDelegationSid(): string;
|
|
685
|
-
declare function deriveDelegationPickupUri(consentUri: string, sid: string): string;
|
|
686
|
-
declare function buildDelegationChallengeHeader(input: ChallengeWireInput): string;
|
|
687
|
-
declare function buildDelegationBearerHeader(realm: string): string;
|
|
688
|
-
declare function buildDelegationInstructions(consentUri: string, pickupUri: string, pollIntervalS: number): string;
|
|
689
|
-
declare function buildDelegationChallengeBody(input: ChallengeWireInput): DelegationChallengeBody;
|
|
690
|
-
declare function buildDelegationChallengeEnvelope(input: ChallengeWireInput, mode?: DelegationChallengeEnvelopeMode): DelegationChallengeEnvelope;
|
|
691
|
-
declare const buildChallengeWire: typeof buildDelegationChallengeEnvelope;
|
|
692
|
-
//#endregion
|
|
693
|
-
//#region src/host-adapter/challenge-context.d.ts
|
|
694
|
-
declare const DEFAULT_CHALLENGE_CONTEXT_TIMEOUT_MS = 3000;
|
|
695
|
-
type ChallengeContextFailure = 'timeout' | 'resolver-error' | 'invalid-context';
|
|
696
|
-
interface ChallengeContextFailureEvent {
|
|
697
|
-
reason: ChallengeContextFailure;
|
|
698
|
-
message: string;
|
|
699
|
-
}
|
|
700
|
-
interface ResolveChallengeContextOptions {
|
|
701
|
-
timeoutMs?: number;
|
|
702
|
-
onFailure?: (event: ChallengeContextFailureEvent) => void;
|
|
703
|
-
}
|
|
704
|
-
declare function resolveChallengeContext<TContext>(resolver: ((context: TContext) => ChallengeWireInput | undefined | Promise<ChallengeWireInput | undefined>) | undefined, context: TContext, options?: ResolveChallengeContextOptions): Promise<ChallengeWireInput | undefined>;
|
|
705
533
|
//#endregion
|
|
706
|
-
export {
|
|
707
|
-
//# sourceMappingURL=
|
|
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-CGKHzcMV.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas-CGKHzcMV.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,cAAe;cAE/B,uBAAqB,uBAAA;;;;;;;;;;;;;;GAShC;KAEU,kBAAkB,cAAe;cAEhC,uBAAqB;;;;;;;;;;;;;;;;;;;GAMhC;KAEU,kBAAkB,cAAe;cAUhC,gBAAc,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASzB;KAEU,WAAW,cAAe;cAMzB,uBAAqB;;;;;;;;;;;;;;;;;;;;;;;GAiBhC;cAMW,qBAAmB;;;;;;;;;;GAmB9B;cAEW,sBAAoB;;;;;;;;GAe/B;cAMW,yBAAuB;;;;;;;;;;;;;;;cAgBvB,sBAAoB;;;;;;;;;;;;;;;;;cAsBpB,sBAAoB,mBAAA,WAAA,WAAA,YAAA,SAAA;cAOpB,uBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAShC;cAMW,oBAAkB;;;;GAI7B;cAEW,kBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|