@kya-os/agentshield-nextjs 0.2.6 → 0.2.7
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/package.json +4 -4
- package/wasm/agentshield_wasm.d.ts +33 -6
- package/wasm/agentshield_wasm.js +626 -516
- package/wasm/agentshield_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/agentshield-nextjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Next.js middleware for AgentShield AI agent detection",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nextjs",
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
},
|
|
137
137
|
"sideEffects": false,
|
|
138
138
|
"dependencies": {
|
|
139
|
-
"@kya-os/agentshield": "
|
|
140
|
-
"@kya-os/agentshield-shared": "
|
|
141
|
-
"@kya-os/agentshield-wasm-runtime": "
|
|
139
|
+
"@kya-os/agentshield": "^0.1.40",
|
|
140
|
+
"@kya-os/agentshield-shared": "^0.2.2",
|
|
141
|
+
"@kya-os/agentshield-wasm-runtime": "^0.1.4",
|
|
142
142
|
"@noble/ed25519": "^2.2.3",
|
|
143
143
|
"@noble/hashes": "^2.0.1"
|
|
144
144
|
}
|
|
@@ -12,18 +12,27 @@ export function detect_agent(metadata: JsRequestMetadata): JsDetectionResult;
|
|
|
12
12
|
* Get the version of the AgentShield library
|
|
13
13
|
*/
|
|
14
14
|
export function version(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get the version of the AgentShield library
|
|
17
|
+
*/
|
|
18
|
+
export function get_version(): string;
|
|
19
|
+
/**
|
|
20
|
+
* Get build information
|
|
21
|
+
*/
|
|
22
|
+
export function get_build_info(): string;
|
|
15
23
|
/**
|
|
16
24
|
* JavaScript-compatible detection result
|
|
17
25
|
*/
|
|
18
26
|
export class JsDetectionResult {
|
|
19
27
|
private constructor();
|
|
20
28
|
free(): void;
|
|
29
|
+
[Symbol.dispose](): void;
|
|
21
30
|
/**
|
|
22
31
|
* Whether the request was identified as coming from an agent
|
|
23
32
|
*/
|
|
24
33
|
is_agent: boolean;
|
|
25
34
|
/**
|
|
26
|
-
* Confidence score (0
|
|
35
|
+
* Confidence score (0-100 scale)
|
|
27
36
|
*/
|
|
28
37
|
confidence: number;
|
|
29
38
|
/**
|
|
@@ -48,10 +57,11 @@ export class JsDetectionResult {
|
|
|
48
57
|
*/
|
|
49
58
|
export class JsRequestMetadata {
|
|
50
59
|
free(): void;
|
|
60
|
+
[Symbol.dispose](): void;
|
|
51
61
|
/**
|
|
52
62
|
* Constructor for JsRequestMetadata
|
|
53
63
|
*/
|
|
54
|
-
constructor(user_agent: string | null | undefined, ip_address: string | null | undefined, headers: string, timestamp: string);
|
|
64
|
+
constructor(user_agent: string | null | undefined, ip_address: string | null | undefined, headers: string, timestamp: string, url?: string | null, method?: string | null, client_fingerprint?: string | null);
|
|
55
65
|
/**
|
|
56
66
|
* Get the user agent
|
|
57
67
|
*/
|
|
@@ -68,6 +78,18 @@ export class JsRequestMetadata {
|
|
|
68
78
|
* Get the timestamp
|
|
69
79
|
*/
|
|
70
80
|
readonly timestamp: string;
|
|
81
|
+
/**
|
|
82
|
+
* Get the URL
|
|
83
|
+
*/
|
|
84
|
+
readonly url: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Get the method
|
|
87
|
+
*/
|
|
88
|
+
readonly method: string | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Get the client fingerprint
|
|
91
|
+
*/
|
|
92
|
+
readonly client_fingerprint: string | undefined;
|
|
71
93
|
}
|
|
72
94
|
|
|
73
95
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -84,17 +106,22 @@ export interface InitOutput {
|
|
|
84
106
|
readonly jsdetectionresult_risk_level: (a: number, b: number) => void;
|
|
85
107
|
readonly jsdetectionresult_timestamp: (a: number, b: number) => void;
|
|
86
108
|
readonly __wbg_jsrequestmetadata_free: (a: number, b: number) => void;
|
|
87
|
-
readonly jsrequestmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
109
|
+
readonly jsrequestmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => number;
|
|
88
110
|
readonly jsrequestmetadata_user_agent: (a: number, b: number) => void;
|
|
89
111
|
readonly jsrequestmetadata_ip_address: (a: number, b: number) => void;
|
|
90
112
|
readonly jsrequestmetadata_headers: (a: number, b: number) => void;
|
|
91
113
|
readonly jsrequestmetadata_timestamp: (a: number, b: number) => void;
|
|
114
|
+
readonly jsrequestmetadata_url: (a: number, b: number) => void;
|
|
115
|
+
readonly jsrequestmetadata_method: (a: number, b: number) => void;
|
|
116
|
+
readonly jsrequestmetadata_client_fingerprint: (a: number, b: number) => void;
|
|
92
117
|
readonly init: () => void;
|
|
93
118
|
readonly detect_agent: (a: number, b: number) => void;
|
|
119
|
+
readonly get_version: (a: number) => void;
|
|
120
|
+
readonly get_build_info: (a: number) => void;
|
|
94
121
|
readonly version: (a: number) => void;
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
readonly
|
|
122
|
+
readonly __wbindgen_export: (a: number, b: number, c: number) => void;
|
|
123
|
+
readonly __wbindgen_export2: (a: number, b: number) => number;
|
|
124
|
+
readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
|
|
98
125
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
99
126
|
readonly __wbindgen_start: () => void;
|
|
100
127
|
}
|