@kya-os/checkpoint-shared 1.5.1 → 1.6.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 +217 -0
- package/dist/beacon-nonce/index.d.mts +36 -0
- package/dist/beacon-nonce/index.d.mts.map +1 -0
- package/dist/beacon-nonce/index.d.ts +36 -0
- package/dist/beacon-nonce/index.d.ts.map +1 -0
- package/dist/beacon-nonce/index.js +305 -0
- package/dist/beacon-nonce/index.mjs +294 -0
- package/dist/beacon-nonce/index.mjs.map +1 -0
- package/dist/beacon-types/index.d.mts +40 -0
- package/dist/beacon-types/index.d.mts.map +1 -1
- package/dist/beacon-types/index.d.ts +40 -0
- package/dist/beacon-types/index.d.ts.map +1 -1
- package/dist/beacon-types/index.js +53 -5
- package/dist/beacon-types/index.mjs +49 -6
- package/dist/beacon-types/index.mjs.map +1 -1
- package/dist/browser-posture-BuChqmH5.d.mts +169 -0
- package/dist/browser-posture-BuChqmH5.d.mts.map +1 -0
- package/dist/browser-posture-DIaVLuW3.d.ts +169 -0
- package/dist/browser-posture-DIaVLuW3.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +4 -2
- package/dist/browser-posture-cookie.d.mts.map +1 -0
- package/dist/browser-posture-cookie.d.ts +4 -2
- package/dist/browser-posture-cookie.d.ts.map +1 -0
- package/dist/browser-posture-cookie.mjs.map +1 -1
- package/dist/browser-posture-proof.d.mts +18 -0
- package/dist/browser-posture-proof.d.mts.map +1 -0
- package/dist/browser-posture-proof.d.ts +18 -0
- package/dist/browser-posture-proof.d.ts.map +1 -0
- package/dist/browser-posture-proof.js +66 -0
- package/dist/browser-posture-proof.mjs +63 -0
- package/dist/browser-posture-proof.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +59 -2
- package/dist/browser-posture-report.d.mts.map +1 -1
- package/dist/browser-posture-report.d.ts +59 -2
- package/dist/browser-posture-report.d.ts.map +1 -1
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +1 -1
- package/dist/browser-posture-report.mjs.map +1 -1
- package/dist/browser-posture.d.mts +2 -85
- package/dist/browser-posture.d.ts +2 -85
- package/dist/browser-posture.js +207 -45
- package/dist/browser-posture.mjs +195 -45
- package/dist/browser-posture.mjs.map +1 -1
- package/dist/browser.d.mts +0 -8
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.d.ts +0 -8
- 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/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-HOfe6ucV.mjs → client-ip-B2Xeo-GK.mjs} +2 -2
- package/dist/{client-ip-HOfe6ucV.mjs.map → client-ip-B2Xeo-GK.mjs.map} +1 -1
- package/dist/{client-ip-1y2iXAYW.js → client-ip-CW6pRyLf.js} +1 -1
- package/dist/consent-handoff.d.mts +41 -0
- package/dist/consent-handoff.d.mts.map +1 -0
- package/dist/consent-handoff.d.ts +41 -0
- package/dist/consent-handoff.d.ts.map +1 -0
- package/dist/consent-handoff.js +1 -0
- package/dist/consent-handoff.mjs +2 -0
- package/dist/consent-handoff.mjs.map +1 -0
- package/dist/errors/index.d.mts +155 -0
- package/dist/errors/index.d.mts.map +1 -1
- package/dist/errors/index.d.ts +155 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +513 -9
- package/dist/errors/index.mjs +513 -10
- package/dist/errors/index.mjs.map +1 -1
- package/dist/{external-jr_S4iSS.d.ts → external-B7WI9FyQ.d.mts} +2 -2
- package/dist/{external-jr_S4iSS.d.mts.map → external-B7WI9FyQ.d.mts.map} +1 -1
- package/dist/{external-jr_S4iSS.d.mts → external-B7WI9FyQ.d.ts} +2 -2
- package/dist/{external-jr_S4iSS.d.ts.map → external-B7WI9FyQ.d.ts.map} +1 -1
- package/dist/gateway-client-ip.d.mts +1 -1
- package/dist/gateway-client-ip.d.ts +1 -1
- package/dist/gateway-client-ip.js +2 -2
- package/dist/gateway-client-ip.mjs +2 -2
- package/dist/index.d.mts +6375 -1532
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +6375 -1532
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5629 -697
- package/dist/index.mjs +5341 -683
- package/dist/index.mjs.map +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +1 -1
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -1
- package/dist/mcpi/approval-grant/index.d.ts +1 -1
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -1
- package/dist/mcpi/approval-grant/index.js +58 -49
- package/dist/mcpi/approval-grant/index.mjs +58 -49
- package/dist/mcpi/approval-grant/index.mjs.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.mts +3 -2
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -1
- package/dist/mcpi/dashboard-config/index.d.ts +3 -2
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -1
- package/dist/posture-origins/index.d.mts +41 -0
- package/dist/posture-origins/index.d.mts.map +1 -0
- package/dist/posture-origins/index.d.ts +41 -0
- package/dist/posture-origins/index.d.ts.map +1 -0
- package/dist/posture-origins/index.js +441 -0
- package/dist/posture-origins/index.mjs +430 -0
- package/dist/posture-origins/index.mjs.map +1 -0
- package/dist/posture-origins-LFkX80oF.js +627 -0
- package/dist/posture-origins-Pn-ii-Pp.mjs +533 -0
- package/dist/posture-origins-Pn-ii-Pp.mjs.map +1 -0
- package/dist/{project-verification-key-CgSVX9_m.mjs → project-verification-key-66N4edKn.mjs} +2 -2
- package/dist/{project-verification-key-CgSVX9_m.mjs.map → project-verification-key-66N4edKn.mjs.map} +1 -1
- package/dist/{project-verification-key-C3L5rd8a.js → project-verification-key-BccT12tQ.js} +1 -1
- package/dist/rules.json +0 -1
- package/dist/{schemas-DxY-dk9y.mjs → schemas-7qodsG-Z.mjs} +49 -2
- package/dist/schemas-7qodsG-Z.mjs.map +1 -0
- package/dist/{schemas-BmjNLAE7.js → schemas-YhagYDx_.js} +59 -0
- package/dist/signals/index.d.mts +75 -55
- package/dist/signals/index.d.mts.map +1 -1
- package/dist/signals/index.d.ts +75 -55
- package/dist/signals/index.d.ts.map +1 -1
- package/dist/signals/index.js +246 -2
- package/dist/signals/index.mjs +236 -3
- package/dist/signals/index.mjs.map +1 -1
- package/fixtures/browser-integrity/captured-java-0.2.1-missing-score.json +10 -0
- package/fixtures/browser-integrity/null-score.json +11 -0
- package/fixtures/browser-integrity/numeric-score.json +11 -0
- package/fixtures/browser-posture-claims.json +168 -0
- package/fixtures/browser-posture-headers.json +6 -0
- package/fixtures/cli-registration.v2.json +115 -0
- package/fixtures/detection/reason-codes.json +1 -1
- package/fixtures/kya-http/README.md +34 -25
- package/fixtures/kya-http/consent-handoff.codes.json +34 -0
- package/fixtures/kya-http/protected-resource-metadata.full.json +14 -5
- package/fixtures/kya-http/protected-resource-metadata.invalid-issuer.json +51 -0
- package/fixtures/kya-http/protected-resource-metadata.no-issuer.json +32 -0
- package/fixtures/reviewer-grant-revocation.v1.json +285 -0
- package/fixtures/workbench/a2a-signed-request.v1.json +255 -0
- package/fixtures/workbench/artifact-bindings.v1.json +1003 -0
- package/fixtures/workbench/delegation-management.v1.json +507 -0
- package/fixtures/workbench/didcomm-task-source.v1.json +191 -0
- package/fixtures/workbench/graph-interfaces.v1.json +1887 -0
- package/fixtures/workbench/identity-provisioning.v1.json +643 -0
- package/fixtures/workbench/linear-installation.v1.json +484 -0
- package/fixtures/workbench/management-session.v1.json +716 -0
- package/fixtures/workbench/model-credentials.v1.json +630 -0
- package/fixtures/workbench/source-claim-pooled.v1.json +50 -0
- package/fixtures/workbench/task-grant.v1.json +695 -0
- package/fixtures/workbench/task-status-projection.v1.json +591 -0
- package/fixtures/workbench/workload-enrollment.v1.json +580 -0
- package/package.json +24 -5
- package/src/data/compiled/merged-rules.json +2 -9
- package/src/data/default-rules.json +0 -1
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +0 -5
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +0 -1
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +0 -5
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +0 -1
- package/dist/browser-posture.d.mts.map +0 -1
- package/dist/browser-posture.d.ts.map +0 -1
- package/dist/patterns-CkRVOdtV.js +0 -243
- package/dist/patterns-DzkGy_qk.mjs +0 -173
- package/dist/patterns-DzkGy_qk.mjs.map +0 -1
- package/dist/schemas-DxY-dk9y.mjs.map +0 -1
- package/fixtures/kya-http/protected-resource-metadata.global.json +0 -28
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/browser-posture.d.ts
|
|
2
|
+
//#region src/browser-posture-schema.d.ts
|
|
4
3
|
declare const BrowserPostureSchema: z.ZodObject<{
|
|
5
4
|
v: z.ZodLiteral<1>;
|
|
6
5
|
project_id: z.ZodString;
|
|
@@ -17,12 +16,25 @@ declare const BrowserPostureSchema: z.ZodObject<{
|
|
|
17
16
|
reasons: z.ZodArray<z.ZodString>;
|
|
18
17
|
automation_disclosed: z.ZodDefault<z.ZodBoolean>;
|
|
19
18
|
automation_corroborated: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
detection: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
class: z.ZodEnum<{
|
|
21
|
+
ai_agent: "ai_agent";
|
|
22
|
+
bot: "bot";
|
|
23
|
+
}>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
confidence: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
cnf: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
jkt: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
20
30
|
iat: z.ZodNumber;
|
|
21
31
|
exp: z.ZodNumber;
|
|
22
32
|
}, z.core.$strip>;
|
|
23
33
|
type BrowserPosture = z.infer<typeof BrowserPostureSchema>;
|
|
24
34
|
//#endregion
|
|
25
35
|
//#region src/browser-posture-report.d.ts
|
|
36
|
+
export declare const POSTURE_VERIFICATION_STATUSES: readonly ["verified", "absent", "rejected"];
|
|
37
|
+
export type PostureVerificationStatus = (typeof POSTURE_VERIFICATION_STATUSES)[number];
|
|
26
38
|
export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
27
39
|
projectId: z.ZodString;
|
|
28
40
|
sessionId: z.ZodGUID;
|
|
@@ -38,6 +50,51 @@ export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
|
38
50
|
expiresAt: z.ZodNumber;
|
|
39
51
|
source: z.ZodLiteral<"verified-posture">;
|
|
40
52
|
}, z.core.$strip>;
|
|
53
|
+
export declare const BROWSER_POSTURE_REJECTION_REASONS: readonly ["malformed", "unknown-key", "bad-signature", "invalid-claims", "project-mismatch", "origin-mismatch", "audience-mismatch", "expired", "not-yet-valid", "binding-mismatch", "session-missing"];
|
|
54
|
+
export type BrowserPostureRejectionReason = (typeof BROWSER_POSTURE_REJECTION_REASONS)[number];
|
|
55
|
+
export declare const BrowserPostureOutcomeSchema: z.ZodObject<{
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
verified: "verified";
|
|
58
|
+
absent: "absent";
|
|
59
|
+
rejected: "rejected";
|
|
60
|
+
}>;
|
|
61
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
malformed: "malformed";
|
|
63
|
+
"unknown-key": "unknown-key";
|
|
64
|
+
"bad-signature": "bad-signature";
|
|
65
|
+
"invalid-claims": "invalid-claims";
|
|
66
|
+
"project-mismatch": "project-mismatch";
|
|
67
|
+
"origin-mismatch": "origin-mismatch";
|
|
68
|
+
"audience-mismatch": "audience-mismatch";
|
|
69
|
+
expired: "expired";
|
|
70
|
+
"not-yet-valid": "not-yet-valid";
|
|
71
|
+
"binding-mismatch": "binding-mismatch";
|
|
72
|
+
"session-missing": "session-missing";
|
|
73
|
+
}>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type BrowserPostureOutcome = z.infer<typeof BrowserPostureOutcomeSchema>;
|
|
76
|
+
export declare const BROWSER_POSTURE_REASON_PATTERN: RegExp;
|
|
77
|
+
export declare const BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES = 50;
|
|
78
|
+
export declare const BROWSER_POSTURE_REJECTION_COUNT_MAX = 1000000;
|
|
79
|
+
export declare const BrowserPostureRejectionsSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<{
|
|
80
|
+
[k: string]: number;
|
|
81
|
+
}, Record<string, unknown>>>;
|
|
82
|
+
export type BrowserPostureRejections = z.infer<typeof BrowserPostureRejectionsSchema>;
|
|
83
|
+
export declare const BrowserPostureReportIngestSchema: z.ZodObject<{
|
|
84
|
+
projectId: z.ZodString;
|
|
85
|
+
sessionId: z.ZodGUID;
|
|
86
|
+
verdict: z.ZodEnum<{
|
|
87
|
+
human: "human";
|
|
88
|
+
"agent-driven": "agent-driven";
|
|
89
|
+
insufficient: "insufficient";
|
|
90
|
+
}>;
|
|
91
|
+
scorerVersion: z.ZodNumber;
|
|
92
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
93
|
+
issuedAt: z.ZodNumber;
|
|
94
|
+
expiresAt: z.ZodNumber;
|
|
95
|
+
source: z.ZodLiteral<"verified-posture">;
|
|
96
|
+
score: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
41
98
|
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
42
99
|
projectId: string;
|
|
43
100
|
sessionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-posture-report.d.mts","names":[],"sources":["../src/browser-posture.ts","../src/browser-posture-report.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-posture-report.d.mts","names":[],"sources":["../src/browser-posture-schema.ts","../src/browser-posture-report.ts"],"mappings":";;cAEa,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2C/B,EAAA,KAAA;KAGU,iBAAiB,EAAE,aAAa;;;qBC7C/B;YACD,oCAAoC;qBAGnC,4BAA0B,EAAA;;;;;;;;;;;;;;GAWrC,EAAA,KAAA;qBAEW;YAaD,wCAAwC;qBAEvC,6BAA2B,EAAA;;;;;;;;;;;;;;;;;;;GAQpC,EAAA,KAAA;YACQ,wBAAwB,EAAE,aAAa;qBAEtC,gCAA8B;qBAC9B;qBACA;qBAEA,gCAA8B,EAAA,QAAA,EAAA,UAAA,EAAA,WAAA,EAAA,aAAA,EAAA;;GAkBxC;YACS,2BAA2B,EAAE,aAAa;qBAEzC,kCAAgC,EAAA;;;;;;;;;;;;;;GAE3C,EAAA,KAAA;wBAEc,qBAAqB,SAAS"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
//#region src/browser-posture.d.ts
|
|
2
|
+
//#region src/browser-posture-schema.d.ts
|
|
4
3
|
declare const BrowserPostureSchema: z.ZodObject<{
|
|
5
4
|
v: z.ZodLiteral<1>;
|
|
6
5
|
project_id: z.ZodString;
|
|
@@ -17,12 +16,25 @@ declare const BrowserPostureSchema: z.ZodObject<{
|
|
|
17
16
|
reasons: z.ZodArray<z.ZodString>;
|
|
18
17
|
automation_disclosed: z.ZodDefault<z.ZodBoolean>;
|
|
19
18
|
automation_corroborated: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
detection: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
class: z.ZodEnum<{
|
|
21
|
+
ai_agent: "ai_agent";
|
|
22
|
+
bot: "bot";
|
|
23
|
+
}>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
confidence: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
cnf: z.ZodOptional<z.ZodObject<{
|
|
28
|
+
jkt: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
20
30
|
iat: z.ZodNumber;
|
|
21
31
|
exp: z.ZodNumber;
|
|
22
32
|
}, z.core.$strip>;
|
|
23
33
|
type BrowserPosture = z.infer<typeof BrowserPostureSchema>;
|
|
24
34
|
//#endregion
|
|
25
35
|
//#region src/browser-posture-report.d.ts
|
|
36
|
+
export declare const POSTURE_VERIFICATION_STATUSES: readonly ["verified", "absent", "rejected"];
|
|
37
|
+
export type PostureVerificationStatus = (typeof POSTURE_VERIFICATION_STATUSES)[number];
|
|
26
38
|
export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
27
39
|
projectId: z.ZodString;
|
|
28
40
|
sessionId: z.ZodGUID;
|
|
@@ -38,6 +50,51 @@ export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
|
38
50
|
expiresAt: z.ZodNumber;
|
|
39
51
|
source: z.ZodLiteral<"verified-posture">;
|
|
40
52
|
}, z.core.$strip>;
|
|
53
|
+
export declare const BROWSER_POSTURE_REJECTION_REASONS: readonly ["malformed", "unknown-key", "bad-signature", "invalid-claims", "project-mismatch", "origin-mismatch", "audience-mismatch", "expired", "not-yet-valid", "binding-mismatch", "session-missing"];
|
|
54
|
+
export type BrowserPostureRejectionReason = (typeof BROWSER_POSTURE_REJECTION_REASONS)[number];
|
|
55
|
+
export declare const BrowserPostureOutcomeSchema: z.ZodObject<{
|
|
56
|
+
status: z.ZodEnum<{
|
|
57
|
+
verified: "verified";
|
|
58
|
+
absent: "absent";
|
|
59
|
+
rejected: "rejected";
|
|
60
|
+
}>;
|
|
61
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
62
|
+
malformed: "malformed";
|
|
63
|
+
"unknown-key": "unknown-key";
|
|
64
|
+
"bad-signature": "bad-signature";
|
|
65
|
+
"invalid-claims": "invalid-claims";
|
|
66
|
+
"project-mismatch": "project-mismatch";
|
|
67
|
+
"origin-mismatch": "origin-mismatch";
|
|
68
|
+
"audience-mismatch": "audience-mismatch";
|
|
69
|
+
expired: "expired";
|
|
70
|
+
"not-yet-valid": "not-yet-valid";
|
|
71
|
+
"binding-mismatch": "binding-mismatch";
|
|
72
|
+
"session-missing": "session-missing";
|
|
73
|
+
}>>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type BrowserPostureOutcome = z.infer<typeof BrowserPostureOutcomeSchema>;
|
|
76
|
+
export declare const BROWSER_POSTURE_REASON_PATTERN: RegExp;
|
|
77
|
+
export declare const BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES = 50;
|
|
78
|
+
export declare const BROWSER_POSTURE_REJECTION_COUNT_MAX = 1000000;
|
|
79
|
+
export declare const BrowserPostureRejectionsSchema: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodTransform<{
|
|
80
|
+
[k: string]: number;
|
|
81
|
+
}, Record<string, unknown>>>;
|
|
82
|
+
export type BrowserPostureRejections = z.infer<typeof BrowserPostureRejectionsSchema>;
|
|
83
|
+
export declare const BrowserPostureReportIngestSchema: z.ZodObject<{
|
|
84
|
+
projectId: z.ZodString;
|
|
85
|
+
sessionId: z.ZodGUID;
|
|
86
|
+
verdict: z.ZodEnum<{
|
|
87
|
+
human: "human";
|
|
88
|
+
"agent-driven": "agent-driven";
|
|
89
|
+
insufficient: "insufficient";
|
|
90
|
+
}>;
|
|
91
|
+
scorerVersion: z.ZodNumber;
|
|
92
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
93
|
+
issuedAt: z.ZodNumber;
|
|
94
|
+
expiresAt: z.ZodNumber;
|
|
95
|
+
source: z.ZodLiteral<"verified-posture">;
|
|
96
|
+
score: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
41
98
|
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
42
99
|
projectId: string;
|
|
43
100
|
sessionId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-posture-report.d.ts","names":[],"sources":["../src/browser-posture.ts","../src/browser-posture-report.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-posture-report.d.ts","names":[],"sources":["../src/browser-posture-schema.ts","../src/browser-posture-report.ts"],"mappings":";;cAEa,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2C/B,EAAA,KAAA;KAGU,iBAAiB,EAAE,aAAa;;;qBC7C/B;YACD,oCAAoC;qBAGnC,4BAA0B,EAAA;;;;;;;;;;;;;;GAWrC,EAAA,KAAA;qBAEW;YAaD,wCAAwC;qBAEvC,6BAA2B,EAAA;;;;;;;;;;;;;;;;;;;GAQpC,EAAA,KAAA;YACQ,wBAAwB,EAAE,aAAa;qBAEtC,gCAA8B;qBAC9B;qBACA;qBAEA,gCAA8B,EAAA,QAAA,EAAA,UAAA,EAAA,WAAA,EAAA,aAAA,EAAA;;GAkBxC;YACS,2BAA2B,EAAE,aAAa;qBAEzC,kCAAgC,EAAA;;;;;;;;;;;;;;GAE3C,EAAA,KAAA;wBAEc,qBAAqB,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("zod");const t=e.z.object({projectId:e.z.string().min(1).max(128),sessionId:e.z.guid(),verdict:e.z.enum([`human`,`agent-driven`,`insufficient`]),score:e.z.number().min(0).max(1).nullable(),scorerVersion:e.z.number().int().positive(),reasons:e.z.array(e.z.string().max(160)).max(8),issuedAt:e.z.number().int().nonnegative(),expiresAt:e.z.number().int().positive(),source:e.z.literal(`verified-posture`)});function
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("zod");const t=[`verified`,`absent`,`rejected`],n=e.z.object({projectId:e.z.string().min(1).max(128),sessionId:e.z.guid(),verdict:e.z.enum([`human`,`agent-driven`,`insufficient`]),score:e.z.number().min(0).max(1).nullable(),scorerVersion:e.z.number().int().positive(),reasons:e.z.array(e.z.string().max(160)).max(8),issuedAt:e.z.number().int().nonnegative(),expiresAt:e.z.number().int().positive(),source:e.z.literal(`verified-posture`)}),r=[`malformed`,`unknown-key`,`bad-signature`,`invalid-claims`,`project-mismatch`,`origin-mismatch`,`audience-mismatch`,`expired`,`not-yet-valid`,`binding-mismatch`,`session-missing`],i=e.z.object({status:e.z.enum(t),reason:e.z.enum(r).optional()}).refine(e=>e.status===`rejected`==(e.reason!==void 0),{message:`reason is required if and only if status is rejected`,path:[`reason`]}),a=/^[a-z][a-z-]{0,31}$/,o=1e6,s=e.z.record(e.z.string(),e.z.unknown()).transform(e=>Object.fromEntries(Object.entries(e).filter(e=>a.test(e[0])&&typeof e[1]==`number`&&Number.isInteger(e[1])&&e[1]>0).slice(0,50).map(([e,t])=>[e,Math.min(t,o)]))),c=n.extend({score:n.shape.score.default(null)});function l(e){return{projectId:e.project_id,sessionId:e.session_id,verdict:e.verdict,score:e.score,scorerVersion:e.scorer_version,reasons:e.reasons,issuedAt:e.iat,expiresAt:e.exp,source:`verified-posture`}}exports.BROWSER_POSTURE_REASON_PATTERN=a,exports.BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES=50,exports.BROWSER_POSTURE_REJECTION_COUNT_MAX=o,exports.BROWSER_POSTURE_REJECTION_REASONS=r,exports.BrowserPostureOutcomeSchema=i,exports.BrowserPostureRejectionsSchema=s,exports.BrowserPostureReportIngestSchema=c,exports.BrowserPostureReportSchema=n,exports.POSTURE_VERIFICATION_STATUSES=t,exports.browserPostureReport=l;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{z as e}from"zod";const t=e.object({projectId:e.string().min(1).max(128),sessionId:e.guid(),verdict:e.enum([`human`,`agent-driven`,`insufficient`]),score:e.number().min(0).max(1).nullable(),scorerVersion:e.number().int().positive(),reasons:e.array(e.string().max(160)).max(8),issuedAt:e.number().int().nonnegative(),expiresAt:e.number().int().positive(),source:e.literal(`verified-posture`)});function
|
|
1
|
+
import{z as e}from"zod";const t=[`verified`,`absent`,`rejected`],n=e.object({projectId:e.string().min(1).max(128),sessionId:e.guid(),verdict:e.enum([`human`,`agent-driven`,`insufficient`]),score:e.number().min(0).max(1).nullable(),scorerVersion:e.number().int().positive(),reasons:e.array(e.string().max(160)).max(8),issuedAt:e.number().int().nonnegative(),expiresAt:e.number().int().positive(),source:e.literal(`verified-posture`)}),r=[`malformed`,`unknown-key`,`bad-signature`,`invalid-claims`,`project-mismatch`,`origin-mismatch`,`audience-mismatch`,`expired`,`not-yet-valid`,`binding-mismatch`,`session-missing`],i=e.object({status:e.enum(t),reason:e.enum(r).optional()}).refine(e=>e.status===`rejected`==(e.reason!==void 0),{message:`reason is required if and only if status is rejected`,path:[`reason`]}),a=/^[a-z][a-z-]{0,31}$/,o=50,s=1e6,c=e.record(e.string(),e.unknown()).transform(e=>Object.fromEntries(Object.entries(e).filter(e=>a.test(e[0])&&typeof e[1]==`number`&&Number.isInteger(e[1])&&e[1]>0).slice(0,50).map(([e,t])=>[e,Math.min(t,s)]))),l=n.extend({score:n.shape.score.default(null)});function u(e){return{projectId:e.project_id,sessionId:e.session_id,verdict:e.verdict,score:e.score,scorerVersion:e.scorer_version,reasons:e.reasons,issuedAt:e.iat,expiresAt:e.exp,source:`verified-posture`}}export{a as BROWSER_POSTURE_REASON_PATTERN,o as BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES,s as BROWSER_POSTURE_REJECTION_COUNT_MAX,r as BROWSER_POSTURE_REJECTION_REASONS,i as BrowserPostureOutcomeSchema,c as BrowserPostureRejectionsSchema,l as BrowserPostureReportIngestSchema,n as BrowserPostureReportSchema,t as POSTURE_VERIFICATION_STATUSES,u as browserPostureReport};
|
|
2
2
|
//# sourceMappingURL=browser-posture-report.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-posture-report.mjs","names":[],"sources":["../src/browser-posture-report.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { BrowserPosture } from './browser-posture';\n\n/** Audit projection: no token, cookie binding, raw counters, or credential fields. */\nexport const BrowserPostureReportSchema = z.object({\n projectId: z.string().min(1).max(128),\n // Match the signed posture's MD5-derived consolidated session IDs.\n sessionId: z.guid(),\n verdict: z.enum(['human', 'agent-driven', 'insufficient']),\n score: z.number().min(0).max(1).nullable(),\n scorerVersion: z.number().int().positive(),\n reasons: z.array(z.string().max(160)).max(8),\n issuedAt: z.number().int().nonnegative(),\n expiresAt: z.number().int().positive(),\n source: z.literal('verified-posture'),\n});\nexport function browserPostureReport(posture: BrowserPosture) {\n return {\n projectId: posture.project_id,\n sessionId: posture.session_id,\n verdict: posture.verdict,\n score: posture.score,\n scorerVersion: posture.scorer_version,\n reasons: posture.reasons,\n issuedAt: posture.iat,\n expiresAt: posture.exp,\n source: 'verified-posture' as const,\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"browser-posture-report.mjs","names":[],"sources":["../src/browser-posture-report.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { BrowserPosture } from './browser-posture-schema';\n\nexport const POSTURE_VERIFICATION_STATUSES = ['verified', 'absent', 'rejected'] as const;\nexport type PostureVerificationStatus = (typeof POSTURE_VERIFICATION_STATUSES)[number];\n\n/** Audit projection: no token, cookie binding, raw counters, or credential fields. */\nexport const BrowserPostureReportSchema = z.object({\n projectId: z.string().min(1).max(128),\n // Match the signed posture's MD5-derived consolidated session IDs.\n sessionId: z.guid(),\n verdict: z.enum(['human', 'agent-driven', 'insufficient']),\n score: z.number().min(0).max(1).nullable(),\n scorerVersion: z.number().int().positive(),\n reasons: z.array(z.string().max(160)).max(8),\n issuedAt: z.number().int().nonnegative(),\n expiresAt: z.number().int().positive(),\n source: z.literal('verified-posture'),\n});\n\nexport const BROWSER_POSTURE_REJECTION_REASONS = [\n 'malformed',\n 'unknown-key',\n 'bad-signature',\n 'invalid-claims',\n 'project-mismatch',\n 'origin-mismatch',\n 'audience-mismatch',\n 'expired',\n 'not-yet-valid',\n 'binding-mismatch',\n 'session-missing',\n] as const;\nexport type BrowserPostureRejectionReason = (typeof BROWSER_POSTURE_REJECTION_REASONS)[number];\n\nexport const BrowserPostureOutcomeSchema = z\n .object({\n status: z.enum(POSTURE_VERIFICATION_STATUSES),\n reason: z.enum(BROWSER_POSTURE_REJECTION_REASONS).optional(),\n })\n .refine((outcome) => (outcome.status === 'rejected') === (outcome.reason !== undefined), {\n message: 'reason is required if and only if status is rejected',\n path: ['reason'],\n });\nexport type BrowserPostureOutcome = z.infer<typeof BrowserPostureOutcomeSchema>;\n\nexport const BROWSER_POSTURE_REASON_PATTERN = /^[a-z][a-z-]{0,31}$/;\nexport const BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES = 50;\nexport const BROWSER_POSTURE_REJECTION_COUNT_MAX = 1_000_000;\n\nexport const BrowserPostureRejectionsSchema = z\n .record(z.string(), z.unknown())\n .transform((counts) =>\n Object.fromEntries(\n Object.entries(counts)\n .filter(\n (entry): entry is [string, number] =>\n BROWSER_POSTURE_REASON_PATTERN.test(entry[0]) &&\n typeof entry[1] === 'number' &&\n Number.isInteger(entry[1]) &&\n entry[1] > 0\n )\n .slice(0, BROWSER_POSTURE_REJECTIONS_MAX_ENTRIES)\n .map(([reason, count]): [string, number] => [\n reason,\n Math.min(count, BROWSER_POSTURE_REJECTION_COUNT_MAX),\n ])\n )\n );\nexport type BrowserPostureRejections = z.infer<typeof BrowserPostureRejectionsSchema>;\n\nexport const BrowserPostureReportIngestSchema = BrowserPostureReportSchema.extend({\n score: BrowserPostureReportSchema.shape.score.default(null),\n});\n\nexport function browserPostureReport(posture: BrowserPosture) {\n return {\n projectId: posture.project_id,\n sessionId: posture.session_id,\n verdict: posture.verdict,\n score: posture.score,\n scorerVersion: posture.scorer_version,\n reasons: posture.reasons,\n issuedAt: posture.iat,\n expiresAt: posture.exp,\n source: 'verified-posture' as const,\n };\n}\n"],"mappings":"wBAGA,MAAa,EAAgC,CAAC,WAAY,SAAU,UAAU,EAIjE,EAA6B,EAAE,OAAO,CACjD,UAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,EAEpC,UAAW,EAAE,KAAK,EAClB,QAAS,EAAE,KAAK,CAAC,QAAS,eAAgB,cAAc,CAAC,EACzD,MAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACzC,cAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EACzC,QAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAC3C,SAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EACvC,UAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EACrC,OAAQ,EAAE,QAAQ,kBAAkB,CACtC,CAAC,EAEY,EAAoC,CAC/C,YACA,cACA,gBACA,iBACA,mBACA,kBACA,oBACA,UACA,gBACA,mBACA,iBACF,EAGa,EAA8B,EACxC,OAAO,CACN,OAAQ,EAAE,KAAK,CAA6B,EAC5C,OAAQ,EAAE,KAAK,CAAiC,CAAC,CAAC,SAAS,CAC7D,CAAC,CAAC,CACD,OAAQ,GAAa,EAAQ,SAAW,aAAiB,EAAQ,SAAW,IAAA,IAAY,CACvF,QAAS,uDACT,KAAM,CAAC,QAAQ,CACjB,CAAC,EAGU,EAAiC,sBACjC,EAAyC,GACzC,EAAsC,IAEtC,EAAiC,EAC3C,OAAO,EAAE,OAAO,EAAG,EAAE,QAAQ,CAAC,CAAC,CAC/B,UAAW,GACV,OAAO,YACL,OAAO,QAAQ,CAAM,CAAC,CACnB,OACE,GACC,EAA+B,KAAK,EAAM,EAAE,GAC5C,OAAO,EAAM,IAAO,UACpB,OAAO,UAAU,EAAM,EAAE,GACzB,EAAM,GAAK,CACf,CAAC,CACA,MAAM,EAAA,EAAyC,CAAC,CAChD,KAAK,CAAC,EAAQ,KAA6B,CAC1C,EACA,KAAK,IAAI,EAAO,CAAmC,CACrD,CAAC,CACL,CACF,EAGW,EAAmC,EAA2B,OAAO,CAChF,MAAO,EAA2B,MAAM,MAAM,QAAQ,IAAI,CAC5D,CAAC,EAED,SAAgB,EAAqB,EAAyB,CAC5D,MAAO,CACL,UAAW,EAAQ,WACnB,UAAW,EAAQ,WACnB,QAAS,EAAQ,QACjB,MAAO,EAAQ,MACf,cAAe,EAAQ,eACvB,QAAS,EAAQ,QACjB,SAAU,EAAQ,IAClB,UAAW,EAAQ,IACnB,OAAQ,kBACV,CACF"}
|
|
@@ -1,85 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
|
|
3
|
-
//#region src/browser-posture-cookie.d.ts
|
|
4
|
-
export declare function postureCookieName(projectId: string): string;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/beacon-types/index.d.ts
|
|
7
|
-
export declare const POSTURE_TTL_SECONDS = 120;
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/browser-posture-report.d.ts
|
|
10
|
-
export declare const BrowserPostureReportSchema: ZodObject<{
|
|
11
|
-
projectId: ZodString;
|
|
12
|
-
sessionId: ZodGUID;
|
|
13
|
-
verdict: ZodEnum<{
|
|
14
|
-
"agent-driven": "agent-driven";
|
|
15
|
-
human: "human";
|
|
16
|
-
insufficient: "insufficient";
|
|
17
|
-
}>;
|
|
18
|
-
score: ZodNullable<ZodNumber>;
|
|
19
|
-
scorerVersion: ZodNumber;
|
|
20
|
-
reasons: ZodArray<ZodString>;
|
|
21
|
-
issuedAt: ZodNumber;
|
|
22
|
-
expiresAt: ZodNumber;
|
|
23
|
-
source: ZodLiteral<"verified-posture">;
|
|
24
|
-
}, $strip>;
|
|
25
|
-
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
26
|
-
projectId: string;
|
|
27
|
-
sessionId: string;
|
|
28
|
-
verdict: "agent-driven" | "human" | "insufficient";
|
|
29
|
-
score: number | null;
|
|
30
|
-
scorerVersion: number;
|
|
31
|
-
reasons: string[];
|
|
32
|
-
issuedAt: number;
|
|
33
|
-
expiresAt: number;
|
|
34
|
-
source: "verified-posture";
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/browser-posture.d.ts
|
|
38
|
-
export declare const UNSIGNED_BROWSER_AGENT: {
|
|
39
|
-
readonly agentType: "Browser agent (unsigned)";
|
|
40
|
-
readonly detectionClass: "ai_agent";
|
|
41
|
-
readonly verificationMethod: "behavioral";
|
|
42
|
-
};
|
|
43
|
-
export declare const behavioralConfidence: (score: number | null) => number;
|
|
44
|
-
export declare const POSTURE_ISSUER = "checkpoint:browser-posture:v1";
|
|
45
|
-
export declare const POSTURE_TYPE = "checkpoint-posture+jwt";
|
|
46
|
-
export declare const BrowserPostureSchema: ZodObject<{
|
|
47
|
-
v: ZodLiteral<1>;
|
|
48
|
-
project_id: ZodString;
|
|
49
|
-
origin: ZodString;
|
|
50
|
-
session_id: ZodGUID;
|
|
51
|
-
binding: ZodString;
|
|
52
|
-
verdict: ZodEnum<{
|
|
53
|
-
"agent-driven": "agent-driven";
|
|
54
|
-
human: "human";
|
|
55
|
-
insufficient: "insufficient";
|
|
56
|
-
}>;
|
|
57
|
-
score: ZodNullable<ZodNumber>;
|
|
58
|
-
scorer_version: ZodNumber;
|
|
59
|
-
reasons: ZodArray<ZodString>;
|
|
60
|
-
automation_disclosed: ZodDefault<ZodBoolean>;
|
|
61
|
-
automation_corroborated: ZodDefault<ZodBoolean>;
|
|
62
|
-
iat: ZodNumber;
|
|
63
|
-
exp: ZodNumber;
|
|
64
|
-
}, $strip>;
|
|
65
|
-
export type BrowserPosture = output<typeof BrowserPostureSchema>;
|
|
66
|
-
export interface BrowserPostureConfig {
|
|
67
|
-
publicKey: JWK$1;
|
|
68
|
-
keyId: string;
|
|
69
|
-
origin: string;
|
|
70
|
-
sessionCookieName?: string;
|
|
71
|
-
protectedRoutes?: Array<{
|
|
72
|
-
path: string;
|
|
73
|
-
scopes: string[];
|
|
74
|
-
}>;
|
|
75
|
-
}
|
|
76
|
-
export declare function readPostureCookie(header: string | null | undefined, name: string): string | undefined;
|
|
77
|
-
export declare function postureSessionBinding(sessionId: string): Promise<string>;
|
|
78
|
-
export declare function signBrowserPosture(posture: BrowserPosture, privateKey: JWK$1, keyId: string): Promise<string>;
|
|
79
|
-
export declare function verifyBrowserPosture(token: string | undefined, config: BrowserPostureConfig, projectId: string, browserSessionId: string | undefined, now?: number): Promise<BrowserPosture | undefined>;
|
|
80
|
-
export declare function postureFromCookies(header: string | null | undefined, config: BrowserPostureConfig, projectId: string): Promise<BrowserPosture | undefined>;
|
|
81
|
-
export declare function postureRequiredScopes(config: BrowserPostureConfig, path: string): string[] | undefined;
|
|
82
|
-
export declare function validateBrowserPostureConfig(config: BrowserPostureConfig, projectId: string | undefined): void;
|
|
83
|
-
//#endregion
|
|
84
|
-
export type { JWK };
|
|
85
|
-
//# sourceMappingURL=browser-posture.d.mts.map
|
|
1
|
+
import { A as POSTURE_VERIFICATION_STATUSES, C as verifyBrowserPosture, D as BrowserPostureRejectionReason, E as BrowserPostureOutcomeSchema, F as POSTURE_TTL_SECONDS, I as postureCookieName, M as browserPostureReport, N as BrowserPosture, O as BrowserPostureReportIngestSchema, P as BrowserPostureSchema, S as validateBrowserPostureConfig, T as BrowserPostureOutcome, _ as postureRequiredScopes, a as POSTURE_SESSION_HEADER, b as readPostureCookie, c as PostureVerification, d as inspectBrowserPosture, f as postureFromCookies, g as postureRequestFromHeaders, h as postureOutcomeReport, i as POSTURE_ISSUER, j as PostureVerificationStatus, k as BrowserPostureReportSchema, l as UNSIGNED_BROWSER_AGENT, m as postureOutcomeFromRequest, n as JWK, o as POSTURE_TYPE, p as postureFromRequest, r as POSTURE_HEADER, s as PostureRequest, t as BrowserPostureConfig, u as behavioralConfidence, v as postureSessionBinding, w as BROWSER_POSTURE_REJECTION_REASONS, x as signBrowserPosture, y as postureUpgrade } from "./browser-posture-BuChqmH5.mjs";
|
|
2
|
+
export { BROWSER_POSTURE_REJECTION_REASONS, type BrowserPosture, BrowserPostureConfig, type BrowserPostureOutcome, BrowserPostureOutcomeSchema, type BrowserPostureRejectionReason, BrowserPostureReportIngestSchema, BrowserPostureReportSchema, BrowserPostureSchema, type JWK, POSTURE_HEADER, POSTURE_ISSUER, POSTURE_SESSION_HEADER, POSTURE_TTL_SECONDS, POSTURE_TYPE, POSTURE_VERIFICATION_STATUSES, PostureRequest, PostureVerification, type PostureVerificationStatus, UNSIGNED_BROWSER_AGENT, behavioralConfidence, browserPostureReport, inspectBrowserPosture, postureCookieName, postureFromCookies, postureFromRequest, postureOutcomeFromRequest, postureOutcomeReport, postureRequestFromHeaders, postureRequiredScopes, postureSessionBinding, postureUpgrade, readPostureCookie, signBrowserPosture, validateBrowserPostureConfig, verifyBrowserPosture };
|
|
@@ -1,85 +1,2 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
|
|
3
|
-
//#region src/browser-posture-cookie.d.ts
|
|
4
|
-
export declare function postureCookieName(projectId: string): string;
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/beacon-types/index.d.ts
|
|
7
|
-
export declare const POSTURE_TTL_SECONDS = 120;
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/browser-posture-report.d.ts
|
|
10
|
-
export declare const BrowserPostureReportSchema: ZodObject<{
|
|
11
|
-
projectId: ZodString;
|
|
12
|
-
sessionId: ZodGUID;
|
|
13
|
-
verdict: ZodEnum<{
|
|
14
|
-
"agent-driven": "agent-driven";
|
|
15
|
-
human: "human";
|
|
16
|
-
insufficient: "insufficient";
|
|
17
|
-
}>;
|
|
18
|
-
score: ZodNullable<ZodNumber>;
|
|
19
|
-
scorerVersion: ZodNumber;
|
|
20
|
-
reasons: ZodArray<ZodString>;
|
|
21
|
-
issuedAt: ZodNumber;
|
|
22
|
-
expiresAt: ZodNumber;
|
|
23
|
-
source: ZodLiteral<"verified-posture">;
|
|
24
|
-
}, $strip>;
|
|
25
|
-
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
26
|
-
projectId: string;
|
|
27
|
-
sessionId: string;
|
|
28
|
-
verdict: "agent-driven" | "human" | "insufficient";
|
|
29
|
-
score: number | null;
|
|
30
|
-
scorerVersion: number;
|
|
31
|
-
reasons: string[];
|
|
32
|
-
issuedAt: number;
|
|
33
|
-
expiresAt: number;
|
|
34
|
-
source: "verified-posture";
|
|
35
|
-
};
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/browser-posture.d.ts
|
|
38
|
-
export declare const UNSIGNED_BROWSER_AGENT: {
|
|
39
|
-
readonly agentType: "Browser agent (unsigned)";
|
|
40
|
-
readonly detectionClass: "ai_agent";
|
|
41
|
-
readonly verificationMethod: "behavioral";
|
|
42
|
-
};
|
|
43
|
-
export declare const behavioralConfidence: (score: number | null) => number;
|
|
44
|
-
export declare const POSTURE_ISSUER = "checkpoint:browser-posture:v1";
|
|
45
|
-
export declare const POSTURE_TYPE = "checkpoint-posture+jwt";
|
|
46
|
-
export declare const BrowserPostureSchema: ZodObject<{
|
|
47
|
-
v: ZodLiteral<1>;
|
|
48
|
-
project_id: ZodString;
|
|
49
|
-
origin: ZodString;
|
|
50
|
-
session_id: ZodGUID;
|
|
51
|
-
binding: ZodString;
|
|
52
|
-
verdict: ZodEnum<{
|
|
53
|
-
"agent-driven": "agent-driven";
|
|
54
|
-
human: "human";
|
|
55
|
-
insufficient: "insufficient";
|
|
56
|
-
}>;
|
|
57
|
-
score: ZodNullable<ZodNumber>;
|
|
58
|
-
scorer_version: ZodNumber;
|
|
59
|
-
reasons: ZodArray<ZodString>;
|
|
60
|
-
automation_disclosed: ZodDefault<ZodBoolean>;
|
|
61
|
-
automation_corroborated: ZodDefault<ZodBoolean>;
|
|
62
|
-
iat: ZodNumber;
|
|
63
|
-
exp: ZodNumber;
|
|
64
|
-
}, $strip>;
|
|
65
|
-
export type BrowserPosture = output<typeof BrowserPostureSchema>;
|
|
66
|
-
export interface BrowserPostureConfig {
|
|
67
|
-
publicKey: JWK$1;
|
|
68
|
-
keyId: string;
|
|
69
|
-
origin: string;
|
|
70
|
-
sessionCookieName?: string;
|
|
71
|
-
protectedRoutes?: Array<{
|
|
72
|
-
path: string;
|
|
73
|
-
scopes: string[];
|
|
74
|
-
}>;
|
|
75
|
-
}
|
|
76
|
-
export declare function readPostureCookie(header: string | null | undefined, name: string): string | undefined;
|
|
77
|
-
export declare function postureSessionBinding(sessionId: string): Promise<string>;
|
|
78
|
-
export declare function signBrowserPosture(posture: BrowserPosture, privateKey: JWK$1, keyId: string): Promise<string>;
|
|
79
|
-
export declare function verifyBrowserPosture(token: string | undefined, config: BrowserPostureConfig, projectId: string, browserSessionId: string | undefined, now?: number): Promise<BrowserPosture | undefined>;
|
|
80
|
-
export declare function postureFromCookies(header: string | null | undefined, config: BrowserPostureConfig, projectId: string): Promise<BrowserPosture | undefined>;
|
|
81
|
-
export declare function postureRequiredScopes(config: BrowserPostureConfig, path: string): string[] | undefined;
|
|
82
|
-
export declare function validateBrowserPostureConfig(config: BrowserPostureConfig, projectId: string | undefined): void;
|
|
83
|
-
//#endregion
|
|
84
|
-
export type { JWK };
|
|
85
|
-
//# sourceMappingURL=browser-posture.d.ts.map
|
|
1
|
+
import { A as POSTURE_VERIFICATION_STATUSES, C as verifyBrowserPosture, D as BrowserPostureRejectionReason, E as BrowserPostureOutcomeSchema, F as POSTURE_TTL_SECONDS, I as postureCookieName, M as browserPostureReport, N as BrowserPosture, O as BrowserPostureReportIngestSchema, P as BrowserPostureSchema, S as validateBrowserPostureConfig, T as BrowserPostureOutcome, _ as postureRequiredScopes, a as POSTURE_SESSION_HEADER, b as readPostureCookie, c as PostureVerification, d as inspectBrowserPosture, f as postureFromCookies, g as postureRequestFromHeaders, h as postureOutcomeReport, i as POSTURE_ISSUER, j as PostureVerificationStatus, k as BrowserPostureReportSchema, l as UNSIGNED_BROWSER_AGENT, m as postureOutcomeFromRequest, n as JWK, o as POSTURE_TYPE, p as postureFromRequest, r as POSTURE_HEADER, s as PostureRequest, t as BrowserPostureConfig, u as behavioralConfidence, v as postureSessionBinding, w as BROWSER_POSTURE_REJECTION_REASONS, x as signBrowserPosture, y as postureUpgrade } from "./browser-posture-DIaVLuW3.js";
|
|
2
|
+
export { BROWSER_POSTURE_REJECTION_REASONS, type BrowserPosture, BrowserPostureConfig, type BrowserPostureOutcome, BrowserPostureOutcomeSchema, type BrowserPostureRejectionReason, BrowserPostureReportIngestSchema, BrowserPostureReportSchema, BrowserPostureSchema, type JWK, POSTURE_HEADER, POSTURE_ISSUER, POSTURE_SESSION_HEADER, POSTURE_TTL_SECONDS, POSTURE_TYPE, POSTURE_VERIFICATION_STATUSES, PostureRequest, PostureVerification, type PostureVerificationStatus, UNSIGNED_BROWSER_AGENT, behavioralConfidence, browserPostureReport, inspectBrowserPosture, postureCookieName, postureFromCookies, postureFromRequest, postureOutcomeFromRequest, postureOutcomeReport, postureRequestFromHeaders, postureRequiredScopes, postureSessionBinding, postureUpgrade, readPostureCookie, signBrowserPosture, validateBrowserPostureConfig, verifyBrowserPosture };
|