@kya-os/checkpoint-shared 1.3.1 → 1.5.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 +127 -2
- package/dist/beacon-types/index.d.mts +441 -432
- package/dist/beacon-types/index.d.mts.map +1 -0
- package/dist/beacon-types/index.d.ts +441 -432
- package/dist/beacon-types/index.d.ts.map +1 -0
- package/dist/beacon-types/index.js +198 -182
- package/dist/beacon-types/index.mjs +197 -179
- package/dist/beacon-types/index.mjs.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.mts.map +1 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts +5 -0
- package/dist/browser-posture-cookie-Dmq9Brf_.d.ts.map +1 -0
- package/dist/browser-posture-cookie.d.mts +2 -0
- package/dist/browser-posture-cookie.d.ts +2 -0
- package/dist/browser-posture-cookie.js +1 -0
- package/dist/browser-posture-cookie.mjs +2 -0
- package/dist/browser-posture-cookie.mjs.map +1 -0
- package/dist/browser-posture-report.d.mts +50 -82
- package/dist/browser-posture-report.d.mts.map +1 -0
- package/dist/browser-posture-report.d.ts +50 -82
- package/dist/browser-posture-report.d.ts.map +1 -0
- package/dist/browser-posture-report.js +1 -1
- package/dist/browser-posture-report.mjs +2 -1
- package/dist/browser-posture-report.mjs.map +1 -0
- package/dist/browser-posture.d.mts +80 -111
- package/dist/browser-posture.d.mts.map +1 -0
- package/dist/browser-posture.d.ts +80 -111
- package/dist/browser-posture.d.ts.map +1 -0
- package/dist/browser-posture.js +143 -4164
- package/dist/browser-posture.mjs +142 -4161
- package/dist/browser-posture.mjs.map +1 -0
- package/dist/browser.d.mts +323 -316
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.d.ts +323 -316
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +2 -1
- package/dist/browser.mjs.map +1 -0
- package/dist/canonical-signer/index.d.mts +38 -33
- package/dist/canonical-signer/index.d.mts.map +1 -0
- package/dist/canonical-signer/index.d.ts +38 -33
- package/dist/canonical-signer/index.d.ts.map +1 -0
- package/dist/canonical-signer/index.js +411 -181
- package/dist/canonical-signer/index.mjs +383 -175
- package/dist/canonical-signer/index.mjs.map +1 -0
- package/dist/clearance.d.mts +30 -0
- package/dist/clearance.d.mts.map +1 -0
- package/dist/clearance.d.ts +30 -0
- package/dist/clearance.d.ts.map +1 -0
- package/dist/clearance.js +120 -0
- package/dist/clearance.mjs +112 -0
- package/dist/clearance.mjs.map +1 -0
- package/dist/client-ip-1y2iXAYW.js +237 -0
- package/dist/client-ip-HOfe6ucV.mjs +215 -0
- package/dist/client-ip-HOfe6ucV.mjs.map +1 -0
- package/dist/deploy/index.d.mts +375 -810
- package/dist/deploy/index.d.mts.map +1 -0
- package/dist/deploy/index.d.ts +375 -810
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +505 -413
- package/dist/deploy/index.mjs +504 -410
- package/dist/deploy/index.mjs.map +1 -0
- package/dist/errors/index.d.mts +101 -101
- package/dist/errors/index.d.mts.map +1 -0
- package/dist/errors/index.d.ts +101 -101
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +341 -314
- package/dist/errors/index.mjs +340 -311
- package/dist/errors/index.mjs.map +1 -0
- package/dist/external-jr_S4iSS.d.mts +4187 -0
- package/dist/external-jr_S4iSS.d.mts.map +1 -0
- package/dist/external-jr_S4iSS.d.ts +4187 -0
- package/dist/external-jr_S4iSS.d.ts.map +1 -0
- package/dist/gateway/index.d.mts +154 -550
- package/dist/gateway/index.d.mts.map +1 -0
- package/dist/gateway/index.d.ts +154 -550
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/gateway/index.js +117 -81
- package/dist/gateway/index.mjs +116 -78
- package/dist/gateway/index.mjs.map +1 -0
- package/dist/gateway-client-ip.d.mts +59 -0
- package/dist/gateway-client-ip.d.mts.map +1 -0
- package/dist/gateway-client-ip.d.ts +59 -0
- package/dist/gateway-client-ip.d.ts.map +1 -0
- package/dist/gateway-client-ip.js +149 -0
- package/dist/gateway-client-ip.mjs +139 -0
- package/dist/gateway-client-ip.mjs.map +1 -0
- package/dist/index.d.mts +15523 -38968
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +15523 -38968
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14950 -16029
- package/dist/index.mjs +14846 -15955
- package/dist/index.mjs.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.mts +45 -44
- package/dist/mcpi/agentshield-api/index.d.mts.map +1 -0
- package/dist/mcpi/agentshield-api/index.d.ts +45 -44
- package/dist/mcpi/agentshield-api/index.d.ts.map +1 -0
- package/dist/mcpi/agentshield-api/index.js +0 -2
- package/dist/mcpi/agentshield-api/index.mjs +1 -1
- package/dist/mcpi/approval-grant/index.d.mts +63 -61
- package/dist/mcpi/approval-grant/index.d.mts.map +1 -0
- package/dist/mcpi/approval-grant/index.d.ts +63 -61
- package/dist/mcpi/approval-grant/index.d.ts.map +1 -0
- package/dist/mcpi/approval-grant/index.js +220 -140
- package/dist/mcpi/approval-grant/index.mjs +219 -137
- package/dist/mcpi/approval-grant/index.mjs.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.mts +2395 -13915
- package/dist/mcpi/dashboard-config/index.d.mts.map +1 -0
- package/dist/mcpi/dashboard-config/index.d.ts +2395 -13915
- package/dist/mcpi/dashboard-config/index.d.ts.map +1 -0
- package/dist/mcpi/dashboard-config/index.js +605 -458
- package/dist/mcpi/dashboard-config/index.mjs +604 -455
- package/dist/mcpi/dashboard-config/index.mjs.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.mts +10 -8
- package/dist/mcpi/multibase-ed25519.d.mts.map +1 -0
- package/dist/mcpi/multibase-ed25519.d.ts +10 -8
- package/dist/mcpi/multibase-ed25519.d.ts.map +1 -0
- package/dist/mcpi/multibase-ed25519.js +182 -106
- package/dist/mcpi/multibase-ed25519.mjs +181 -103
- package/dist/mcpi/multibase-ed25519.mjs.map +1 -0
- package/dist/patterns-CkRVOdtV.js +243 -0
- package/dist/patterns-DzkGy_qk.mjs +173 -0
- package/dist/patterns-DzkGy_qk.mjs.map +1 -0
- package/dist/project-verification-key-C3L5rd8a.js +41 -0
- package/dist/project-verification-key-CgSVX9_m.mjs +37 -0
- package/dist/project-verification-key-CgSVX9_m.mjs.map +1 -0
- package/dist/rolldown-runtime-iY2fYEqi.mjs +19 -0
- package/dist/schemas-BmjNLAE7.js +5677 -0
- package/dist/schemas-DxY-dk9y.mjs +5511 -0
- package/dist/schemas-DxY-dk9y.mjs.map +1 -0
- package/dist/signals/index.d.mts +125 -115
- package/dist/signals/index.d.mts.map +1 -0
- package/dist/signals/index.d.ts +125 -115
- package/dist/signals/index.d.ts.map +1 -0
- package/dist/signals/index.js +1693 -1536
- package/dist/signals/index.mjs +1692 -1533
- package/dist/signals/index.mjs.map +1 -0
- package/dist/test-fixtures/index.d.mts +124 -119
- package/dist/test-fixtures/index.d.mts.map +1 -0
- package/dist/test-fixtures/index.d.ts +124 -119
- package/dist/test-fixtures/index.d.ts.map +1 -0
- package/dist/test-fixtures/index.js +460 -228
- package/dist/test-fixtures/index.mjs +459 -225
- package/dist/test-fixtures/index.mjs.map +1 -0
- package/dist/tool-protection/index.d.mts +368 -1067
- package/dist/tool-protection/index.d.mts.map +1 -0
- package/dist/tool-protection/index.d.ts +368 -1067
- package/dist/tool-protection/index.d.ts.map +1 -0
- package/dist/tool-protection/index.js +366 -285
- package/dist/tool-protection/index.mjs +365 -282
- package/dist/tool-protection/index.mjs.map +1 -0
- package/fixtures/bot-signal-resolution.json +142 -0
- package/fixtures/browser-posture-claims.json +421 -0
- package/fixtures/browser-posture-headers.json +46 -0
- package/fixtures/detection/reason-codes.json +10 -1
- package/fixtures/kya-http/challenge.delegation.fetcher-200.json +9 -3
- package/fixtures/kya-http/challenge.delegation.full.json +9 -3
- package/fixtures/kya-http/challenge.delegation.minimal.json +9 -3
- package/fixtures/kya-http/error-codes.json +7 -2
- package/package.json +21 -7
|
@@ -1,85 +1,53 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import "jose";
|
|
3
|
+
//#region src/browser-posture.d.ts
|
|
3
4
|
declare const BrowserPostureSchema: z.ZodObject<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
session_id: string;
|
|
23
|
-
binding: string;
|
|
24
|
-
scorer_version: number;
|
|
25
|
-
iat: number;
|
|
26
|
-
exp: number;
|
|
27
|
-
}, {
|
|
28
|
-
verdict: "human" | "agent-driven" | "insufficient";
|
|
29
|
-
score: number | null;
|
|
30
|
-
reasons: string[];
|
|
31
|
-
v: 1;
|
|
32
|
-
project_id: string;
|
|
33
|
-
origin: string;
|
|
34
|
-
session_id: string;
|
|
35
|
-
binding: string;
|
|
36
|
-
scorer_version: number;
|
|
37
|
-
iat: number;
|
|
38
|
-
exp: number;
|
|
39
|
-
}>;
|
|
5
|
+
v: z.ZodLiteral<1>;
|
|
6
|
+
project_id: z.ZodString;
|
|
7
|
+
origin: z.ZodString;
|
|
8
|
+
session_id: z.ZodGUID;
|
|
9
|
+
binding: z.ZodString;
|
|
10
|
+
verdict: z.ZodEnum<{
|
|
11
|
+
human: "human";
|
|
12
|
+
"agent-driven": "agent-driven";
|
|
13
|
+
insufficient: "insufficient";
|
|
14
|
+
}>;
|
|
15
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
scorer_version: z.ZodNumber;
|
|
17
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
18
|
+
automation_disclosed: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
automation_corroborated: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
iat: z.ZodNumber;
|
|
21
|
+
exp: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
40
23
|
type BrowserPosture = z.infer<typeof BrowserPostureSchema>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
reasons: string[];
|
|
69
|
-
issuedAt: number;
|
|
70
|
-
expiresAt: number;
|
|
71
|
-
source: "verified-posture";
|
|
72
|
-
}>;
|
|
73
|
-
declare function browserPostureReport(posture: BrowserPosture): {
|
|
74
|
-
projectId: string;
|
|
75
|
-
sessionId: string;
|
|
76
|
-
verdict: "human" | "agent-driven" | "insufficient";
|
|
77
|
-
score: number | null;
|
|
78
|
-
scorerVersion: number;
|
|
79
|
-
reasons: string[];
|
|
80
|
-
issuedAt: number;
|
|
81
|
-
expiresAt: number;
|
|
82
|
-
source: "verified-posture";
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/browser-posture-report.d.ts
|
|
26
|
+
export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
27
|
+
projectId: z.ZodString;
|
|
28
|
+
sessionId: z.ZodGUID;
|
|
29
|
+
verdict: z.ZodEnum<{
|
|
30
|
+
human: "human";
|
|
31
|
+
"agent-driven": "agent-driven";
|
|
32
|
+
insufficient: "insufficient";
|
|
33
|
+
}>;
|
|
34
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
scorerVersion: z.ZodNumber;
|
|
36
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
37
|
+
issuedAt: z.ZodNumber;
|
|
38
|
+
expiresAt: z.ZodNumber;
|
|
39
|
+
source: z.ZodLiteral<"verified-posture">;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
42
|
+
projectId: string;
|
|
43
|
+
sessionId: string;
|
|
44
|
+
verdict: "human" | "agent-driven" | "insufficient";
|
|
45
|
+
score: number | null;
|
|
46
|
+
scorerVersion: number;
|
|
47
|
+
reasons: string[];
|
|
48
|
+
issuedAt: number;
|
|
49
|
+
expiresAt: number;
|
|
50
|
+
source: "verified-posture";
|
|
83
51
|
};
|
|
84
|
-
|
|
85
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//# sourceMappingURL=browser-posture-report.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-posture-report.d.mts","names":[],"sources":["../src/browser-posture.ts","../src/browser-posture-report.ts"],"mappings":";;;cAsBa,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;GAoB/B,EAAA,KAAA;KAGU,iBAAiB,EAAE,aAAa;;;qBCzC/B,4BAA0B,EAAA;;;;;;;;;;;;;;GAWrC,EAAA,KAAA;wBACc,qBAAqB,SAAS"}
|
|
@@ -1,85 +1,53 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import "jose";
|
|
3
|
+
//#region src/browser-posture.d.ts
|
|
3
4
|
declare const BrowserPostureSchema: z.ZodObject<{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
session_id: string;
|
|
23
|
-
binding: string;
|
|
24
|
-
scorer_version: number;
|
|
25
|
-
iat: number;
|
|
26
|
-
exp: number;
|
|
27
|
-
}, {
|
|
28
|
-
verdict: "human" | "agent-driven" | "insufficient";
|
|
29
|
-
score: number | null;
|
|
30
|
-
reasons: string[];
|
|
31
|
-
v: 1;
|
|
32
|
-
project_id: string;
|
|
33
|
-
origin: string;
|
|
34
|
-
session_id: string;
|
|
35
|
-
binding: string;
|
|
36
|
-
scorer_version: number;
|
|
37
|
-
iat: number;
|
|
38
|
-
exp: number;
|
|
39
|
-
}>;
|
|
5
|
+
v: z.ZodLiteral<1>;
|
|
6
|
+
project_id: z.ZodString;
|
|
7
|
+
origin: z.ZodString;
|
|
8
|
+
session_id: z.ZodGUID;
|
|
9
|
+
binding: z.ZodString;
|
|
10
|
+
verdict: z.ZodEnum<{
|
|
11
|
+
human: "human";
|
|
12
|
+
"agent-driven": "agent-driven";
|
|
13
|
+
insufficient: "insufficient";
|
|
14
|
+
}>;
|
|
15
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
scorer_version: z.ZodNumber;
|
|
17
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
18
|
+
automation_disclosed: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
automation_corroborated: z.ZodDefault<z.ZodBoolean>;
|
|
20
|
+
iat: z.ZodNumber;
|
|
21
|
+
exp: z.ZodNumber;
|
|
22
|
+
}, z.core.$strip>;
|
|
40
23
|
type BrowserPosture = z.infer<typeof BrowserPostureSchema>;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
reasons: string[];
|
|
69
|
-
issuedAt: number;
|
|
70
|
-
expiresAt: number;
|
|
71
|
-
source: "verified-posture";
|
|
72
|
-
}>;
|
|
73
|
-
declare function browserPostureReport(posture: BrowserPosture): {
|
|
74
|
-
projectId: string;
|
|
75
|
-
sessionId: string;
|
|
76
|
-
verdict: "human" | "agent-driven" | "insufficient";
|
|
77
|
-
score: number | null;
|
|
78
|
-
scorerVersion: number;
|
|
79
|
-
reasons: string[];
|
|
80
|
-
issuedAt: number;
|
|
81
|
-
expiresAt: number;
|
|
82
|
-
source: "verified-posture";
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/browser-posture-report.d.ts
|
|
26
|
+
export declare const BrowserPostureReportSchema: z.ZodObject<{
|
|
27
|
+
projectId: z.ZodString;
|
|
28
|
+
sessionId: z.ZodGUID;
|
|
29
|
+
verdict: z.ZodEnum<{
|
|
30
|
+
human: "human";
|
|
31
|
+
"agent-driven": "agent-driven";
|
|
32
|
+
insufficient: "insufficient";
|
|
33
|
+
}>;
|
|
34
|
+
score: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
scorerVersion: z.ZodNumber;
|
|
36
|
+
reasons: z.ZodArray<z.ZodString>;
|
|
37
|
+
issuedAt: z.ZodNumber;
|
|
38
|
+
expiresAt: z.ZodNumber;
|
|
39
|
+
source: z.ZodLiteral<"verified-posture">;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
42
|
+
projectId: string;
|
|
43
|
+
sessionId: string;
|
|
44
|
+
verdict: "human" | "agent-driven" | "insufficient";
|
|
45
|
+
score: number | null;
|
|
46
|
+
scorerVersion: number;
|
|
47
|
+
reasons: string[];
|
|
48
|
+
issuedAt: number;
|
|
49
|
+
expiresAt: number;
|
|
50
|
+
source: "verified-posture";
|
|
83
51
|
};
|
|
84
|
-
|
|
85
|
-
|
|
52
|
+
//#endregion
|
|
53
|
+
//# sourceMappingURL=browser-posture-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-posture-report.d.ts","names":[],"sources":["../src/browser-posture.ts","../src/browser-posture-report.ts"],"mappings":";;;cAsBa,sBAAoB,EAAA;;;;;;;;;;;;;;;;;;GAoB/B,EAAA,KAAA;KAGU,iBAAiB,EAAE,aAAa;;;qBCzC/B,4BAA0B,EAAA;;;;;;;;;;;;;;GAWrC,EAAA,KAAA;wBACc,qBAAqB,SAAS"}
|
|
@@ -1 +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 n(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.BrowserPostureReportSchema=t,exports.browserPostureReport=n;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
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 n(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{t as BrowserPostureReportSchema,n as browserPostureReport};
|
|
2
|
+
//# sourceMappingURL=browser-posture-report.mjs.map
|
|
@@ -0,0 +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":"wBAIA,MAAa,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,EACD,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,114 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
issuedAt: number;
|
|
33
|
-
expiresAt: number;
|
|
34
|
-
source: "verified-posture";
|
|
35
|
-
}>;
|
|
36
|
-
declare function browserPostureReport(posture: BrowserPosture): {
|
|
37
|
-
projectId: string;
|
|
38
|
-
sessionId: string;
|
|
39
|
-
verdict: "agent-driven" | "human" | "insufficient";
|
|
40
|
-
score: number | null;
|
|
41
|
-
scorerVersion: number;
|
|
42
|
-
reasons: string[];
|
|
43
|
-
issuedAt: number;
|
|
44
|
-
expiresAt: number;
|
|
45
|
-
source: "verified-posture";
|
|
1
|
+
import { C as ZodObject, O as ZodString, P as output, R as $strip, S as ZodNumber, b as ZodLiteral, g as ZodGUID, h as ZodEnum, l as ZodArray, p as ZodDefault, t as external_d_exports, u as ZodBoolean, x as ZodNullable } from "./external-jr_S4iSS.mjs";
|
|
2
|
+
import { JWK, JWK as JWK$1 } from "jose";
|
|
3
|
+
//#region src/browser-posture-cookie.d.ts
|
|
4
|
+
export declare function postureCookieName(projectId: string): string;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/browser-posture-report.d.ts
|
|
7
|
+
export declare const BrowserPostureReportSchema: ZodObject<{
|
|
8
|
+
projectId: ZodString;
|
|
9
|
+
sessionId: ZodGUID;
|
|
10
|
+
verdict: ZodEnum<{
|
|
11
|
+
"agent-driven": "agent-driven";
|
|
12
|
+
human: "human";
|
|
13
|
+
insufficient: "insufficient";
|
|
14
|
+
}>;
|
|
15
|
+
score: ZodNullable<ZodNumber>;
|
|
16
|
+
scorerVersion: ZodNumber;
|
|
17
|
+
reasons: ZodArray<ZodString>;
|
|
18
|
+
issuedAt: ZodNumber;
|
|
19
|
+
expiresAt: ZodNumber;
|
|
20
|
+
source: ZodLiteral<"verified-posture">;
|
|
21
|
+
}, $strip>;
|
|
22
|
+
export declare function browserPostureReport(posture: BrowserPosture): {
|
|
23
|
+
projectId: string;
|
|
24
|
+
sessionId: string;
|
|
25
|
+
verdict: "agent-driven" | "human" | "insufficient";
|
|
26
|
+
score: number | null;
|
|
27
|
+
scorerVersion: number;
|
|
28
|
+
reasons: string[];
|
|
29
|
+
issuedAt: number;
|
|
30
|
+
expiresAt: number;
|
|
31
|
+
source: "verified-posture";
|
|
46
32
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/browser-posture.d.ts
|
|
35
|
+
export declare const UNSIGNED_BROWSER_AGENT: {
|
|
36
|
+
readonly agentType: "Browser agent (unsigned)";
|
|
37
|
+
readonly detectionClass: "ai_agent";
|
|
38
|
+
readonly verificationMethod: "behavioral";
|
|
52
39
|
};
|
|
53
|
-
declare const behavioralConfidence: (score: number | null) => number;
|
|
54
|
-
declare const POSTURE_TTL_SECONDS = 120;
|
|
55
|
-
declare const POSTURE_ISSUER = "checkpoint:browser-posture:v1";
|
|
56
|
-
declare const POSTURE_TYPE = "checkpoint-posture+jwt";
|
|
57
|
-
declare const BrowserPostureSchema:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
binding: string;
|
|
87
|
-
verdict: "agent-driven" | "human" | "insufficient";
|
|
88
|
-
score: number | null;
|
|
89
|
-
scorer_version: number;
|
|
90
|
-
reasons: string[];
|
|
91
|
-
iat: number;
|
|
92
|
-
exp: number;
|
|
93
|
-
}>;
|
|
94
|
-
type BrowserPosture = z.infer<typeof BrowserPostureSchema>;
|
|
95
|
-
interface BrowserPostureConfig {
|
|
96
|
-
publicKey: JWK;
|
|
97
|
-
keyId: string;
|
|
98
|
-
origin: string;
|
|
99
|
-
sessionCookieName?: string;
|
|
100
|
-
protectedRoutes?: Array<{
|
|
101
|
-
path: string;
|
|
102
|
-
scopes: string[];
|
|
103
|
-
}>;
|
|
40
|
+
export declare const behavioralConfidence: (score: number | null) => number;
|
|
41
|
+
export declare const POSTURE_TTL_SECONDS = 120;
|
|
42
|
+
export declare const POSTURE_ISSUER = "checkpoint:browser-posture:v1";
|
|
43
|
+
export declare const POSTURE_TYPE = "checkpoint-posture+jwt";
|
|
44
|
+
export declare const BrowserPostureSchema: ZodObject<{
|
|
45
|
+
v: ZodLiteral<1>;
|
|
46
|
+
project_id: ZodString;
|
|
47
|
+
origin: ZodString;
|
|
48
|
+
session_id: ZodGUID;
|
|
49
|
+
binding: ZodString;
|
|
50
|
+
verdict: ZodEnum<{
|
|
51
|
+
"agent-driven": "agent-driven";
|
|
52
|
+
human: "human";
|
|
53
|
+
insufficient: "insufficient";
|
|
54
|
+
}>;
|
|
55
|
+
score: ZodNullable<ZodNumber>;
|
|
56
|
+
scorer_version: ZodNumber;
|
|
57
|
+
reasons: ZodArray<ZodString>;
|
|
58
|
+
automation_disclosed: ZodDefault<ZodBoolean>;
|
|
59
|
+
automation_corroborated: ZodDefault<ZodBoolean>;
|
|
60
|
+
iat: ZodNumber;
|
|
61
|
+
exp: ZodNumber;
|
|
62
|
+
}, $strip>;
|
|
63
|
+
export type BrowserPosture = output<typeof BrowserPostureSchema>;
|
|
64
|
+
export interface BrowserPostureConfig {
|
|
65
|
+
publicKey: JWK$1;
|
|
66
|
+
keyId: string;
|
|
67
|
+
origin: string;
|
|
68
|
+
sessionCookieName?: string;
|
|
69
|
+
protectedRoutes?: Array<{
|
|
70
|
+
path: string;
|
|
71
|
+
scopes: string[];
|
|
72
|
+
}>;
|
|
104
73
|
}
|
|
105
|
-
declare function
|
|
106
|
-
declare function
|
|
107
|
-
declare function
|
|
108
|
-
declare function
|
|
109
|
-
declare function
|
|
110
|
-
declare function
|
|
111
|
-
declare function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
74
|
+
export declare function readPostureCookie(header: string | null | undefined, name: string): string | undefined;
|
|
75
|
+
export declare function postureSessionBinding(sessionId: string): Promise<string>;
|
|
76
|
+
export declare function signBrowserPosture(posture: BrowserPosture, privateKey: JWK$1, keyId: string): Promise<string>;
|
|
77
|
+
export declare function verifyBrowserPosture(token: string | undefined, config: BrowserPostureConfig, projectId: string, browserSessionId: string | undefined, now?: number): Promise<BrowserPosture | undefined>;
|
|
78
|
+
export declare function postureFromCookies(header: string | null | undefined, config: BrowserPostureConfig, projectId: string): Promise<BrowserPosture | undefined>;
|
|
79
|
+
export declare function postureRequiredScopes(config: BrowserPostureConfig, path: string): string[] | undefined;
|
|
80
|
+
export declare function validateBrowserPostureConfig(config: BrowserPostureConfig, projectId: string | undefined): void;
|
|
81
|
+
//#endregion
|
|
82
|
+
export type { JWK };
|
|
83
|
+
//# sourceMappingURL=browser-posture.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser-posture.d.mts","names":[],"sources":["../src/browser-posture-cookie.ts","../src/browser-posture-report.ts","../src/browser-posture.ts"],"mappings":";;;wBAgBgB,kBAAkB;;;qBCZrB,4BAA0B;;;;;;;;;;;;;;GAWrC;wBACc,qBAAqB,SAAS;;;;;;;;;;;;;qBCRjC;;;;;qBAKA,uBAAwB;qBAGxB;qBACA;qBAGA;qBAEA,sBAAoB;;;;;;;;;;;;;;;;;;GAoB/B;YAGU,iBAAiB,cAAe;iBAC3B;EAEf,WAAW;EACX;EAEA;EACA;EAEA,kBAAkB;IAAQ;IAAc;;;wBAI1B,kBACd,mCACA;wBAcoB,sBAAsB,oBAAoB;wBAc1C,mBACpB,SAAS,gBACT,YAAY,OACZ,gBACC;wBAqBmB,qBACpB,2BACA,QAAQ,sBACR,mBACA,sCACA,eACC,QAAQ;wBAgDW,mBACpB,mCACA,QAAQ,sBACR,oBACC,QAAQ;wBAUK,sBACd,QAAQ,sBACR;wBAmBc,6BACd,QAAQ,sBACR"}
|