@rad-security/mcp-server 0.0.23 → 0.0.25
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/README.md +9 -0
- package/dist/client.js +29 -10
- package/dist/client.js.map +1 -1
- package/dist/index.js +775 -397
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +2 -0
- package/dist/logger.js +72 -0
- package/dist/logger.js.map +1 -0
- package/dist/operations/dashboards.d.ts +86 -0
- package/dist/operations/dashboards.js +80 -0
- package/dist/operations/dashboards.js.map +1 -0
- package/dist/operations/findings.d.ts +2 -2
- package/dist/operations/radql.d.ts +203 -0
- package/dist/operations/radql.js +609 -0
- package/dist/operations/radql.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { RadSecurityClient } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Schema for listing available data types (discovery)
|
|
5
|
+
*/
|
|
6
|
+
export declare const RadQLListDataTypesSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
/**
|
|
8
|
+
* Schema for getting metadata about a specific data type (schema discovery)
|
|
9
|
+
*/
|
|
10
|
+
export declare const RadQLGetTypeMetadataSchema: z.ZodObject<{
|
|
11
|
+
data_type: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
data_type: string;
|
|
14
|
+
}, {
|
|
15
|
+
data_type: string;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Schema for listing filter values for a field (enum discovery)
|
|
19
|
+
*/
|
|
20
|
+
export declare const RadQLListFilterValuesSchema: z.ZodObject<{
|
|
21
|
+
data_type: z.ZodString;
|
|
22
|
+
filter_name: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
data_type: string;
|
|
25
|
+
filter_name: string;
|
|
26
|
+
}, {
|
|
27
|
+
data_type: string;
|
|
28
|
+
filter_name: string;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Main RadQL query schema for executing queries against the Data API
|
|
32
|
+
*/
|
|
33
|
+
export declare const RadQLQuerySchema: z.ZodObject<{
|
|
34
|
+
data_type: z.ZodString;
|
|
35
|
+
operation: z.ZodEnum<["list", "get_by_id", "stats"]>;
|
|
36
|
+
filters_query: z.ZodOptional<z.ZodString>;
|
|
37
|
+
stats_query: z.ZodOptional<z.ZodString>;
|
|
38
|
+
id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
40
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
41
|
+
include_relations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
offset: number;
|
|
44
|
+
limit: number;
|
|
45
|
+
data_type: string;
|
|
46
|
+
operation: "list" | "get_by_id" | "stats";
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
filters_query?: string | undefined;
|
|
49
|
+
stats_query?: string | undefined;
|
|
50
|
+
include_relations?: string[] | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
data_type: string;
|
|
53
|
+
operation: "list" | "get_by_id" | "stats";
|
|
54
|
+
offset?: number | undefined;
|
|
55
|
+
limit?: number | undefined;
|
|
56
|
+
id?: string | undefined;
|
|
57
|
+
filters_query?: string | undefined;
|
|
58
|
+
stats_query?: string | undefined;
|
|
59
|
+
include_relations?: string[] | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Helper schema for building RadQL queries programmatically
|
|
63
|
+
*/
|
|
64
|
+
export declare const RadQLQueryBuilderSchema: z.ZodObject<{
|
|
65
|
+
data_type: z.ZodString;
|
|
66
|
+
conditions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
field: z.ZodString;
|
|
68
|
+
operator: z.ZodEnum<[":", "=", "!=", "!:", "<>", ">", ">=", "<", "<=", "contains", "starts_with", "ends_with"]>;
|
|
69
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
70
|
+
negate: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
value: string | number | boolean;
|
|
73
|
+
field: string;
|
|
74
|
+
operator: ":" | "=" | "!=" | "!:" | "<>" | ">" | ">=" | "<" | "<=" | "contains" | "starts_with" | "ends_with";
|
|
75
|
+
negate?: boolean | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
value: string | number | boolean;
|
|
78
|
+
field: string;
|
|
79
|
+
operator: ":" | "=" | "!=" | "!:" | "<>" | ">" | ">=" | "<" | "<=" | "contains" | "starts_with" | "ends_with";
|
|
80
|
+
negate?: boolean | undefined;
|
|
81
|
+
}>, "many">>;
|
|
82
|
+
logic: z.ZodDefault<z.ZodOptional<z.ZodEnum<["AND", "OR"]>>>;
|
|
83
|
+
aggregation: z.ZodOptional<z.ZodEnum<["count", "sum", "avg", "min", "max", "median"]>>;
|
|
84
|
+
aggregate_field: z.ZodOptional<z.ZodString>;
|
|
85
|
+
group_by: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
+
time_group: z.ZodOptional<z.ZodEnum<["second", "minute", "hour", "day", "month", "year"]>>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
data_type: string;
|
|
89
|
+
logic: "AND" | "OR";
|
|
90
|
+
conditions?: {
|
|
91
|
+
value: string | number | boolean;
|
|
92
|
+
field: string;
|
|
93
|
+
operator: ":" | "=" | "!=" | "!:" | "<>" | ">" | ">=" | "<" | "<=" | "contains" | "starts_with" | "ends_with";
|
|
94
|
+
negate?: boolean | undefined;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
aggregation?: "count" | "sum" | "avg" | "min" | "max" | "median" | undefined;
|
|
97
|
+
aggregate_field?: string | undefined;
|
|
98
|
+
group_by?: string[] | undefined;
|
|
99
|
+
time_group?: "second" | "minute" | "hour" | "day" | "month" | "year" | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
data_type: string;
|
|
102
|
+
conditions?: {
|
|
103
|
+
value: string | number | boolean;
|
|
104
|
+
field: string;
|
|
105
|
+
operator: ":" | "=" | "!=" | "!:" | "<>" | ">" | ">=" | "<" | "<=" | "contains" | "starts_with" | "ends_with";
|
|
106
|
+
negate?: boolean | undefined;
|
|
107
|
+
}[] | undefined;
|
|
108
|
+
logic?: "AND" | "OR" | undefined;
|
|
109
|
+
aggregation?: "count" | "sum" | "avg" | "min" | "max" | "median" | undefined;
|
|
110
|
+
aggregate_field?: string | undefined;
|
|
111
|
+
group_by?: string[] | undefined;
|
|
112
|
+
time_group?: "second" | "minute" | "hour" | "day" | "month" | "year" | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Batch query schema for executing multiple queries in parallel
|
|
116
|
+
*/
|
|
117
|
+
export declare const RadQLBatchQuerySchema: z.ZodObject<{
|
|
118
|
+
queries: z.ZodArray<z.ZodObject<{
|
|
119
|
+
data_type: z.ZodString;
|
|
120
|
+
operation: z.ZodEnum<["list", "get_by_id", "stats"]>;
|
|
121
|
+
filters_query: z.ZodOptional<z.ZodString>;
|
|
122
|
+
stats_query: z.ZodOptional<z.ZodString>;
|
|
123
|
+
id: z.ZodOptional<z.ZodString>;
|
|
124
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
125
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
126
|
+
include_relations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
offset: number;
|
|
129
|
+
limit: number;
|
|
130
|
+
data_type: string;
|
|
131
|
+
operation: "list" | "get_by_id" | "stats";
|
|
132
|
+
id?: string | undefined;
|
|
133
|
+
filters_query?: string | undefined;
|
|
134
|
+
stats_query?: string | undefined;
|
|
135
|
+
include_relations?: string[] | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
data_type: string;
|
|
138
|
+
operation: "list" | "get_by_id" | "stats";
|
|
139
|
+
offset?: number | undefined;
|
|
140
|
+
limit?: number | undefined;
|
|
141
|
+
id?: string | undefined;
|
|
142
|
+
filters_query?: string | undefined;
|
|
143
|
+
stats_query?: string | undefined;
|
|
144
|
+
include_relations?: string[] | undefined;
|
|
145
|
+
}>, "many">;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
queries: {
|
|
148
|
+
offset: number;
|
|
149
|
+
limit: number;
|
|
150
|
+
data_type: string;
|
|
151
|
+
operation: "list" | "get_by_id" | "stats";
|
|
152
|
+
id?: string | undefined;
|
|
153
|
+
filters_query?: string | undefined;
|
|
154
|
+
stats_query?: string | undefined;
|
|
155
|
+
include_relations?: string[] | undefined;
|
|
156
|
+
}[];
|
|
157
|
+
}, {
|
|
158
|
+
queries: {
|
|
159
|
+
data_type: string;
|
|
160
|
+
operation: "list" | "get_by_id" | "stats";
|
|
161
|
+
offset?: number | undefined;
|
|
162
|
+
limit?: number | undefined;
|
|
163
|
+
id?: string | undefined;
|
|
164
|
+
filters_query?: string | undefined;
|
|
165
|
+
stats_query?: string | undefined;
|
|
166
|
+
include_relations?: string[] | undefined;
|
|
167
|
+
}[];
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* List all available data types that can be queried
|
|
171
|
+
*/
|
|
172
|
+
export declare function listDataTypes(client: RadSecurityClient): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* Get metadata for a specific data type including available fields
|
|
175
|
+
*/
|
|
176
|
+
export declare function getDataTypeMetadata(client: RadSecurityClient, dataType: string): Promise<any>;
|
|
177
|
+
/**
|
|
178
|
+
* Main function to execute RadQL queries (list, get_by_id, stats)
|
|
179
|
+
*/
|
|
180
|
+
export declare function executeRadQLQuery(client: RadSecurityClient, args: z.infer<typeof RadQLQuerySchema>): Promise<any>;
|
|
181
|
+
/**
|
|
182
|
+
* Wrapper for listing data types (discovery tool)
|
|
183
|
+
*/
|
|
184
|
+
export declare function executeListDataTypes(client: RadSecurityClient): Promise<any>;
|
|
185
|
+
/**
|
|
186
|
+
* Wrapper for getting type metadata (schema discovery tool)
|
|
187
|
+
*/
|
|
188
|
+
export declare function executeGetTypeMetadata(client: RadSecurityClient, args: z.infer<typeof RadQLGetTypeMetadataSchema>): Promise<any>;
|
|
189
|
+
/**
|
|
190
|
+
* Wrapper for listing filter values (enum discovery tool)
|
|
191
|
+
*/
|
|
192
|
+
export declare function executeListFilterValues(client: RadSecurityClient, args: z.infer<typeof RadQLListFilterValuesSchema>): Promise<any>;
|
|
193
|
+
/**
|
|
194
|
+
* Build RadQL queries programmatically from structured conditions
|
|
195
|
+
*/
|
|
196
|
+
export declare function buildRadQLQuery(args: z.infer<typeof RadQLQueryBuilderSchema>): {
|
|
197
|
+
filters_query?: string;
|
|
198
|
+
stats_query?: string;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Execute multiple RadQL queries in parallel
|
|
202
|
+
*/
|
|
203
|
+
export declare function executeBatchQueries(client: RadSecurityClient, args: z.infer<typeof RadQLBatchQuerySchema>): Promise<any[]>;
|