@keak/webmcp-core 0.1.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.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/dist/config.d.ts +103 -0
  4. package/dist/config.d.ts.map +1 -0
  5. package/dist/config.js +54 -0
  6. package/dist/config.js.map +1 -0
  7. package/dist/exporter/manifest.d.ts +6 -0
  8. package/dist/exporter/manifest.d.ts.map +1 -0
  9. package/dist/exporter/manifest.js +36 -0
  10. package/dist/exporter/manifest.js.map +1 -0
  11. package/dist/exporter/snippet.d.ts +7 -0
  12. package/dist/exporter/snippet.d.ts.map +1 -0
  13. package/dist/exporter/snippet.js +197 -0
  14. package/dist/exporter/snippet.js.map +1 -0
  15. package/dist/exporter/userscript.d.ts +6 -0
  16. package/dist/exporter/userscript.d.ts.map +1 -0
  17. package/dist/exporter/userscript.js +53 -0
  18. package/dist/exporter/userscript.js.map +1 -0
  19. package/dist/exporter/yaml.d.ts +6 -0
  20. package/dist/exporter/yaml.d.ts.map +1 -0
  21. package/dist/exporter/yaml.js +90 -0
  22. package/dist/exporter/yaml.js.map +1 -0
  23. package/dist/extractor/api-extractor.d.ts +3 -0
  24. package/dist/extractor/api-extractor.d.ts.map +1 -0
  25. package/dist/extractor/api-extractor.js +274 -0
  26. package/dist/extractor/api-extractor.js.map +1 -0
  27. package/dist/extractor/click-extractor.d.ts +3 -0
  28. package/dist/extractor/click-extractor.d.ts.map +1 -0
  29. package/dist/extractor/click-extractor.js +52 -0
  30. package/dist/extractor/click-extractor.js.map +1 -0
  31. package/dist/extractor/form-extractor.d.ts +3 -0
  32. package/dist/extractor/form-extractor.d.ts.map +1 -0
  33. package/dist/extractor/form-extractor.js +27 -0
  34. package/dist/extractor/form-extractor.js.map +1 -0
  35. package/dist/extractor/route-extractor.d.ts +3 -0
  36. package/dist/extractor/route-extractor.d.ts.map +1 -0
  37. package/dist/extractor/route-extractor.js +84 -0
  38. package/dist/extractor/route-extractor.js.map +1 -0
  39. package/dist/extractor/schema-inferrer.d.ts +4 -0
  40. package/dist/extractor/schema-inferrer.d.ts.map +1 -0
  41. package/dist/extractor/schema-inferrer.js +128 -0
  42. package/dist/extractor/schema-inferrer.js.map +1 -0
  43. package/dist/index.d.ts +88 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +170 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/linter/linter.d.ts +10 -0
  48. package/dist/linter/linter.d.ts.map +1 -0
  49. package/dist/linter/linter.js +39 -0
  50. package/dist/linter/linter.js.map +1 -0
  51. package/dist/linter/rules.d.ts +4 -0
  52. package/dist/linter/rules.d.ts.map +1 -0
  53. package/dist/linter/rules.js +111 -0
  54. package/dist/linter/rules.js.map +1 -0
  55. package/dist/scanner/browser.d.ts +14 -0
  56. package/dist/scanner/browser.d.ts.map +1 -0
  57. package/dist/scanner/browser.js +42 -0
  58. package/dist/scanner/browser.js.map +1 -0
  59. package/dist/scanner/crawler.d.ts +12 -0
  60. package/dist/scanner/crawler.d.ts.map +1 -0
  61. package/dist/scanner/crawler.js +80 -0
  62. package/dist/scanner/crawler.js.map +1 -0
  63. package/dist/scanner/dom-capture.d.ts +4 -0
  64. package/dist/scanner/dom-capture.d.ts.map +1 -0
  65. package/dist/scanner/dom-capture.js +148 -0
  66. package/dist/scanner/dom-capture.js.map +1 -0
  67. package/dist/scanner/network-capture.d.ts +8 -0
  68. package/dist/scanner/network-capture.d.ts.map +1 -0
  69. package/dist/scanner/network-capture.js +112 -0
  70. package/dist/scanner/network-capture.js.map +1 -0
  71. package/dist/scanner/screenshot.d.ts +3 -0
  72. package/dist/scanner/screenshot.d.ts.map +1 -0
  73. package/dist/scanner/screenshot.js +10 -0
  74. package/dist/scanner/screenshot.js.map +1 -0
  75. package/dist/synthesizer/clusterer.d.ts +7 -0
  76. package/dist/synthesizer/clusterer.d.ts.map +1 -0
  77. package/dist/synthesizer/clusterer.js +310 -0
  78. package/dist/synthesizer/clusterer.js.map +1 -0
  79. package/dist/synthesizer/describer.d.ts +3 -0
  80. package/dist/synthesizer/describer.d.ts.map +1 -0
  81. package/dist/synthesizer/describer.js +92 -0
  82. package/dist/synthesizer/describer.js.map +1 -0
  83. package/dist/synthesizer/llm-client.d.ts +7 -0
  84. package/dist/synthesizer/llm-client.d.ts.map +1 -0
  85. package/dist/synthesizer/llm-client.js +7 -0
  86. package/dist/synthesizer/llm-client.js.map +1 -0
  87. package/dist/synthesizer/namer.d.ts +3 -0
  88. package/dist/synthesizer/namer.d.ts.map +1 -0
  89. package/dist/synthesizer/namer.js +154 -0
  90. package/dist/synthesizer/namer.js.map +1 -0
  91. package/dist/synthesizer/safety-classifier.d.ts +3 -0
  92. package/dist/synthesizer/safety-classifier.d.ts.map +1 -0
  93. package/dist/synthesizer/safety-classifier.js +68 -0
  94. package/dist/synthesizer/safety-classifier.js.map +1 -0
  95. package/dist/synthesizer/schema-builder.d.ts +3 -0
  96. package/dist/synthesizer/schema-builder.d.ts.map +1 -0
  97. package/dist/synthesizer/schema-builder.js +99 -0
  98. package/dist/synthesizer/schema-builder.js.map +1 -0
  99. package/dist/types.d.ts +271 -0
  100. package/dist/types.d.ts.map +1 -0
  101. package/dist/types.js +3 -0
  102. package/dist/types.js.map +1 -0
  103. package/dist/utils/redact.d.ts +3 -0
  104. package/dist/utils/redact.d.ts.map +1 -0
  105. package/dist/utils/redact.js +42 -0
  106. package/dist/utils/redact.js.map +1 -0
  107. package/dist/utils/validation.d.ts +876 -0
  108. package/dist/utils/validation.d.ts.map +1 -0
  109. package/dist/utils/validation.js +108 -0
  110. package/dist/utils/validation.js.map +1 -0
  111. package/package.json +69 -0
@@ -0,0 +1,876 @@
1
+ import { z } from "zod";
2
+ export declare const FieldSpecSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ type: z.ZodEnum<["string", "number", "boolean", "enum", "date", "email", "tel", "url"]>;
5
+ required: z.ZodBoolean;
6
+ label: z.ZodOptional<z.ZodString>;
7
+ placeholder: z.ZodOptional<z.ZodString>;
8
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
+ pattern: z.ZodOptional<z.ZodString>;
10
+ min: z.ZodOptional<z.ZodNumber>;
11
+ max: z.ZodOptional<z.ZodNumber>;
12
+ defaultValue: z.ZodOptional<z.ZodString>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
15
+ name: string;
16
+ required: boolean;
17
+ options?: string[] | undefined;
18
+ label?: string | undefined;
19
+ placeholder?: string | undefined;
20
+ pattern?: string | undefined;
21
+ min?: number | undefined;
22
+ max?: number | undefined;
23
+ defaultValue?: string | undefined;
24
+ }, {
25
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
26
+ name: string;
27
+ required: boolean;
28
+ options?: string[] | undefined;
29
+ label?: string | undefined;
30
+ placeholder?: string | undefined;
31
+ pattern?: string | undefined;
32
+ min?: number | undefined;
33
+ max?: number | undefined;
34
+ defaultValue?: string | undefined;
35
+ }>;
36
+ export declare const NetworkCallSchema: z.ZodObject<{
37
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
38
+ url: z.ZodString;
39
+ status: z.ZodOptional<z.ZodNumber>;
40
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
41
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
42
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
43
+ requestBodySample: z.ZodOptional<z.ZodAny>;
44
+ responseBodySample: z.ZodOptional<z.ZodAny>;
45
+ operationName: z.ZodOptional<z.ZodString>;
46
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
47
+ }, "strip", z.ZodTypeAny, {
48
+ url: string;
49
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
50
+ status?: number | undefined;
51
+ requestHeaders?: Record<string, string> | undefined;
52
+ requestBodySchema?: any;
53
+ responseBodySchema?: any;
54
+ requestBodySample?: any;
55
+ responseBodySample?: any;
56
+ operationName?: string | undefined;
57
+ operationType?: "query" | "mutation" | "subscription" | undefined;
58
+ }, {
59
+ url: string;
60
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
61
+ status?: number | undefined;
62
+ requestHeaders?: Record<string, string> | undefined;
63
+ requestBodySchema?: any;
64
+ responseBodySchema?: any;
65
+ requestBodySample?: any;
66
+ responseBodySample?: any;
67
+ operationName?: string | undefined;
68
+ operationType?: "query" | "mutation" | "subscription" | undefined;
69
+ }>;
70
+ export declare const FormSubmitActionSchema: z.ZodObject<{
71
+ kind: z.ZodLiteral<"form_submit">;
72
+ id: z.ZodString;
73
+ pageUrl: z.ZodString;
74
+ formSelector: z.ZodString;
75
+ fields: z.ZodArray<z.ZodObject<{
76
+ name: z.ZodString;
77
+ type: z.ZodEnum<["string", "number", "boolean", "enum", "date", "email", "tel", "url"]>;
78
+ required: z.ZodBoolean;
79
+ label: z.ZodOptional<z.ZodString>;
80
+ placeholder: z.ZodOptional<z.ZodString>;
81
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ pattern: z.ZodOptional<z.ZodString>;
83
+ min: z.ZodOptional<z.ZodNumber>;
84
+ max: z.ZodOptional<z.ZodNumber>;
85
+ defaultValue: z.ZodOptional<z.ZodString>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
88
+ name: string;
89
+ required: boolean;
90
+ options?: string[] | undefined;
91
+ label?: string | undefined;
92
+ placeholder?: string | undefined;
93
+ pattern?: string | undefined;
94
+ min?: number | undefined;
95
+ max?: number | undefined;
96
+ defaultValue?: string | undefined;
97
+ }, {
98
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
99
+ name: string;
100
+ required: boolean;
101
+ options?: string[] | undefined;
102
+ label?: string | undefined;
103
+ placeholder?: string | undefined;
104
+ pattern?: string | undefined;
105
+ min?: number | undefined;
106
+ max?: number | undefined;
107
+ defaultValue?: string | undefined;
108
+ }>, "many">;
109
+ submitSelector: z.ZodString;
110
+ labels: z.ZodArray<z.ZodString, "many">;
111
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
112
+ action: z.ZodOptional<z.ZodString>;
113
+ networkCalls: z.ZodArray<z.ZodObject<{
114
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
115
+ url: z.ZodString;
116
+ status: z.ZodOptional<z.ZodNumber>;
117
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
118
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
119
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
120
+ requestBodySample: z.ZodOptional<z.ZodAny>;
121
+ responseBodySample: z.ZodOptional<z.ZodAny>;
122
+ operationName: z.ZodOptional<z.ZodString>;
123
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ url: string;
126
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
127
+ status?: number | undefined;
128
+ requestHeaders?: Record<string, string> | undefined;
129
+ requestBodySchema?: any;
130
+ responseBodySchema?: any;
131
+ requestBodySample?: any;
132
+ responseBodySample?: any;
133
+ operationName?: string | undefined;
134
+ operationType?: "query" | "mutation" | "subscription" | undefined;
135
+ }, {
136
+ url: string;
137
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
138
+ status?: number | undefined;
139
+ requestHeaders?: Record<string, string> | undefined;
140
+ requestBodySchema?: any;
141
+ responseBodySchema?: any;
142
+ requestBodySample?: any;
143
+ responseBodySample?: any;
144
+ operationName?: string | undefined;
145
+ operationType?: "query" | "mutation" | "subscription" | undefined;
146
+ }>, "many">;
147
+ }, "strip", z.ZodTypeAny, {
148
+ kind: "form_submit";
149
+ id: string;
150
+ pageUrl: string;
151
+ formSelector: string;
152
+ fields: {
153
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
154
+ name: string;
155
+ required: boolean;
156
+ options?: string[] | undefined;
157
+ label?: string | undefined;
158
+ placeholder?: string | undefined;
159
+ pattern?: string | undefined;
160
+ min?: number | undefined;
161
+ max?: number | undefined;
162
+ defaultValue?: string | undefined;
163
+ }[];
164
+ submitSelector: string;
165
+ labels: string[];
166
+ networkCalls: {
167
+ url: string;
168
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
169
+ status?: number | undefined;
170
+ requestHeaders?: Record<string, string> | undefined;
171
+ requestBodySchema?: any;
172
+ responseBodySchema?: any;
173
+ requestBodySample?: any;
174
+ responseBodySample?: any;
175
+ operationName?: string | undefined;
176
+ operationType?: "query" | "mutation" | "subscription" | undefined;
177
+ }[];
178
+ method?: "GET" | "POST" | undefined;
179
+ action?: string | undefined;
180
+ }, {
181
+ kind: "form_submit";
182
+ id: string;
183
+ pageUrl: string;
184
+ formSelector: string;
185
+ fields: {
186
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
187
+ name: string;
188
+ required: boolean;
189
+ options?: string[] | undefined;
190
+ label?: string | undefined;
191
+ placeholder?: string | undefined;
192
+ pattern?: string | undefined;
193
+ min?: number | undefined;
194
+ max?: number | undefined;
195
+ defaultValue?: string | undefined;
196
+ }[];
197
+ submitSelector: string;
198
+ labels: string[];
199
+ networkCalls: {
200
+ url: string;
201
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
202
+ status?: number | undefined;
203
+ requestHeaders?: Record<string, string> | undefined;
204
+ requestBodySchema?: any;
205
+ responseBodySchema?: any;
206
+ requestBodySample?: any;
207
+ responseBodySample?: any;
208
+ operationName?: string | undefined;
209
+ operationType?: "query" | "mutation" | "subscription" | undefined;
210
+ }[];
211
+ method?: "GET" | "POST" | undefined;
212
+ action?: string | undefined;
213
+ }>;
214
+ export declare const ClickFlowActionSchema: z.ZodObject<{
215
+ kind: z.ZodLiteral<"click_flow">;
216
+ id: z.ZodString;
217
+ pageUrl: z.ZodString;
218
+ startSelector: z.ZodString;
219
+ intermediateSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
220
+ resultingUrl: z.ZodOptional<z.ZodString>;
221
+ networkCalls: z.ZodArray<z.ZodObject<{
222
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
223
+ url: z.ZodString;
224
+ status: z.ZodOptional<z.ZodNumber>;
225
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
226
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
227
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
228
+ requestBodySample: z.ZodOptional<z.ZodAny>;
229
+ responseBodySample: z.ZodOptional<z.ZodAny>;
230
+ operationName: z.ZodOptional<z.ZodString>;
231
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ url: string;
234
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
235
+ status?: number | undefined;
236
+ requestHeaders?: Record<string, string> | undefined;
237
+ requestBodySchema?: any;
238
+ responseBodySchema?: any;
239
+ requestBodySample?: any;
240
+ responseBodySample?: any;
241
+ operationName?: string | undefined;
242
+ operationType?: "query" | "mutation" | "subscription" | undefined;
243
+ }, {
244
+ url: string;
245
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
246
+ status?: number | undefined;
247
+ requestHeaders?: Record<string, string> | undefined;
248
+ requestBodySchema?: any;
249
+ responseBodySchema?: any;
250
+ requestBodySample?: any;
251
+ responseBodySample?: any;
252
+ operationName?: string | undefined;
253
+ operationType?: "query" | "mutation" | "subscription" | undefined;
254
+ }>, "many">;
255
+ labels: z.ZodArray<z.ZodString, "many">;
256
+ screenshotPath: z.ZodOptional<z.ZodString>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ kind: "click_flow";
259
+ id: string;
260
+ pageUrl: string;
261
+ labels: string[];
262
+ networkCalls: {
263
+ url: string;
264
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
265
+ status?: number | undefined;
266
+ requestHeaders?: Record<string, string> | undefined;
267
+ requestBodySchema?: any;
268
+ responseBodySchema?: any;
269
+ requestBodySample?: any;
270
+ responseBodySample?: any;
271
+ operationName?: string | undefined;
272
+ operationType?: "query" | "mutation" | "subscription" | undefined;
273
+ }[];
274
+ startSelector: string;
275
+ intermediateSteps?: string[] | undefined;
276
+ resultingUrl?: string | undefined;
277
+ screenshotPath?: string | undefined;
278
+ }, {
279
+ kind: "click_flow";
280
+ id: string;
281
+ pageUrl: string;
282
+ labels: string[];
283
+ networkCalls: {
284
+ url: string;
285
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
286
+ status?: number | undefined;
287
+ requestHeaders?: Record<string, string> | undefined;
288
+ requestBodySchema?: any;
289
+ responseBodySchema?: any;
290
+ requestBodySample?: any;
291
+ responseBodySample?: any;
292
+ operationName?: string | undefined;
293
+ operationType?: "query" | "mutation" | "subscription" | undefined;
294
+ }[];
295
+ startSelector: string;
296
+ intermediateSteps?: string[] | undefined;
297
+ resultingUrl?: string | undefined;
298
+ screenshotPath?: string | undefined;
299
+ }>;
300
+ export declare const ApiCallActionSchema: z.ZodObject<{
301
+ kind: z.ZodLiteral<"api_call">;
302
+ id: z.ZodString;
303
+ pageUrl: z.ZodString;
304
+ request: z.ZodObject<{
305
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
306
+ url: z.ZodString;
307
+ status: z.ZodOptional<z.ZodNumber>;
308
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
309
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
310
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
311
+ requestBodySample: z.ZodOptional<z.ZodAny>;
312
+ responseBodySample: z.ZodOptional<z.ZodAny>;
313
+ operationName: z.ZodOptional<z.ZodString>;
314
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ url: string;
317
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
318
+ status?: number | undefined;
319
+ requestHeaders?: Record<string, string> | undefined;
320
+ requestBodySchema?: any;
321
+ responseBodySchema?: any;
322
+ requestBodySample?: any;
323
+ responseBodySample?: any;
324
+ operationName?: string | undefined;
325
+ operationType?: "query" | "mutation" | "subscription" | undefined;
326
+ }, {
327
+ url: string;
328
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
329
+ status?: number | undefined;
330
+ requestHeaders?: Record<string, string> | undefined;
331
+ requestBodySchema?: any;
332
+ responseBodySchema?: any;
333
+ requestBodySample?: any;
334
+ responseBodySample?: any;
335
+ operationName?: string | undefined;
336
+ operationType?: "query" | "mutation" | "subscription" | undefined;
337
+ }>;
338
+ triggerSelector: z.ZodOptional<z.ZodString>;
339
+ labels: z.ZodArray<z.ZodString, "many">;
340
+ }, "strip", z.ZodTypeAny, {
341
+ kind: "api_call";
342
+ id: string;
343
+ pageUrl: string;
344
+ labels: string[];
345
+ request: {
346
+ url: string;
347
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
348
+ status?: number | undefined;
349
+ requestHeaders?: Record<string, string> | undefined;
350
+ requestBodySchema?: any;
351
+ responseBodySchema?: any;
352
+ requestBodySample?: any;
353
+ responseBodySample?: any;
354
+ operationName?: string | undefined;
355
+ operationType?: "query" | "mutation" | "subscription" | undefined;
356
+ };
357
+ triggerSelector?: string | undefined;
358
+ }, {
359
+ kind: "api_call";
360
+ id: string;
361
+ pageUrl: string;
362
+ labels: string[];
363
+ request: {
364
+ url: string;
365
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
366
+ status?: number | undefined;
367
+ requestHeaders?: Record<string, string> | undefined;
368
+ requestBodySchema?: any;
369
+ responseBodySchema?: any;
370
+ requestBodySample?: any;
371
+ responseBodySample?: any;
372
+ operationName?: string | undefined;
373
+ operationType?: "query" | "mutation" | "subscription" | undefined;
374
+ };
375
+ triggerSelector?: string | undefined;
376
+ }>;
377
+ export declare const RouteChangeActionSchema: z.ZodObject<{
378
+ kind: z.ZodLiteral<"route_change">;
379
+ id: z.ZodString;
380
+ from: z.ZodString;
381
+ to: z.ZodString;
382
+ trigger: z.ZodOptional<z.ZodString>;
383
+ labels: z.ZodArray<z.ZodString, "many">;
384
+ }, "strip", z.ZodTypeAny, {
385
+ kind: "route_change";
386
+ id: string;
387
+ labels: string[];
388
+ from: string;
389
+ to: string;
390
+ trigger?: string | undefined;
391
+ }, {
392
+ kind: "route_change";
393
+ id: string;
394
+ labels: string[];
395
+ from: string;
396
+ to: string;
397
+ trigger?: string | undefined;
398
+ }>;
399
+ export declare const ActionSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
400
+ kind: z.ZodLiteral<"form_submit">;
401
+ id: z.ZodString;
402
+ pageUrl: z.ZodString;
403
+ formSelector: z.ZodString;
404
+ fields: z.ZodArray<z.ZodObject<{
405
+ name: z.ZodString;
406
+ type: z.ZodEnum<["string", "number", "boolean", "enum", "date", "email", "tel", "url"]>;
407
+ required: z.ZodBoolean;
408
+ label: z.ZodOptional<z.ZodString>;
409
+ placeholder: z.ZodOptional<z.ZodString>;
410
+ options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
411
+ pattern: z.ZodOptional<z.ZodString>;
412
+ min: z.ZodOptional<z.ZodNumber>;
413
+ max: z.ZodOptional<z.ZodNumber>;
414
+ defaultValue: z.ZodOptional<z.ZodString>;
415
+ }, "strip", z.ZodTypeAny, {
416
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
417
+ name: string;
418
+ required: boolean;
419
+ options?: string[] | undefined;
420
+ label?: string | undefined;
421
+ placeholder?: string | undefined;
422
+ pattern?: string | undefined;
423
+ min?: number | undefined;
424
+ max?: number | undefined;
425
+ defaultValue?: string | undefined;
426
+ }, {
427
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
428
+ name: string;
429
+ required: boolean;
430
+ options?: string[] | undefined;
431
+ label?: string | undefined;
432
+ placeholder?: string | undefined;
433
+ pattern?: string | undefined;
434
+ min?: number | undefined;
435
+ max?: number | undefined;
436
+ defaultValue?: string | undefined;
437
+ }>, "many">;
438
+ submitSelector: z.ZodString;
439
+ labels: z.ZodArray<z.ZodString, "many">;
440
+ method: z.ZodOptional<z.ZodEnum<["GET", "POST"]>>;
441
+ action: z.ZodOptional<z.ZodString>;
442
+ networkCalls: z.ZodArray<z.ZodObject<{
443
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
444
+ url: z.ZodString;
445
+ status: z.ZodOptional<z.ZodNumber>;
446
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
447
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
448
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
449
+ requestBodySample: z.ZodOptional<z.ZodAny>;
450
+ responseBodySample: z.ZodOptional<z.ZodAny>;
451
+ operationName: z.ZodOptional<z.ZodString>;
452
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ url: string;
455
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
456
+ status?: number | undefined;
457
+ requestHeaders?: Record<string, string> | undefined;
458
+ requestBodySchema?: any;
459
+ responseBodySchema?: any;
460
+ requestBodySample?: any;
461
+ responseBodySample?: any;
462
+ operationName?: string | undefined;
463
+ operationType?: "query" | "mutation" | "subscription" | undefined;
464
+ }, {
465
+ url: string;
466
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
467
+ status?: number | undefined;
468
+ requestHeaders?: Record<string, string> | undefined;
469
+ requestBodySchema?: any;
470
+ responseBodySchema?: any;
471
+ requestBodySample?: any;
472
+ responseBodySample?: any;
473
+ operationName?: string | undefined;
474
+ operationType?: "query" | "mutation" | "subscription" | undefined;
475
+ }>, "many">;
476
+ }, "strip", z.ZodTypeAny, {
477
+ kind: "form_submit";
478
+ id: string;
479
+ pageUrl: string;
480
+ formSelector: string;
481
+ fields: {
482
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
483
+ name: string;
484
+ required: boolean;
485
+ options?: string[] | undefined;
486
+ label?: string | undefined;
487
+ placeholder?: string | undefined;
488
+ pattern?: string | undefined;
489
+ min?: number | undefined;
490
+ max?: number | undefined;
491
+ defaultValue?: string | undefined;
492
+ }[];
493
+ submitSelector: string;
494
+ labels: string[];
495
+ networkCalls: {
496
+ url: string;
497
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
498
+ status?: number | undefined;
499
+ requestHeaders?: Record<string, string> | undefined;
500
+ requestBodySchema?: any;
501
+ responseBodySchema?: any;
502
+ requestBodySample?: any;
503
+ responseBodySample?: any;
504
+ operationName?: string | undefined;
505
+ operationType?: "query" | "mutation" | "subscription" | undefined;
506
+ }[];
507
+ method?: "GET" | "POST" | undefined;
508
+ action?: string | undefined;
509
+ }, {
510
+ kind: "form_submit";
511
+ id: string;
512
+ pageUrl: string;
513
+ formSelector: string;
514
+ fields: {
515
+ type: "string" | "number" | "boolean" | "email" | "date" | "enum" | "tel" | "url";
516
+ name: string;
517
+ required: boolean;
518
+ options?: string[] | undefined;
519
+ label?: string | undefined;
520
+ placeholder?: string | undefined;
521
+ pattern?: string | undefined;
522
+ min?: number | undefined;
523
+ max?: number | undefined;
524
+ defaultValue?: string | undefined;
525
+ }[];
526
+ submitSelector: string;
527
+ labels: string[];
528
+ networkCalls: {
529
+ url: string;
530
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
531
+ status?: number | undefined;
532
+ requestHeaders?: Record<string, string> | undefined;
533
+ requestBodySchema?: any;
534
+ responseBodySchema?: any;
535
+ requestBodySample?: any;
536
+ responseBodySample?: any;
537
+ operationName?: string | undefined;
538
+ operationType?: "query" | "mutation" | "subscription" | undefined;
539
+ }[];
540
+ method?: "GET" | "POST" | undefined;
541
+ action?: string | undefined;
542
+ }>, z.ZodObject<{
543
+ kind: z.ZodLiteral<"click_flow">;
544
+ id: z.ZodString;
545
+ pageUrl: z.ZodString;
546
+ startSelector: z.ZodString;
547
+ intermediateSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
548
+ resultingUrl: z.ZodOptional<z.ZodString>;
549
+ networkCalls: z.ZodArray<z.ZodObject<{
550
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
551
+ url: z.ZodString;
552
+ status: z.ZodOptional<z.ZodNumber>;
553
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
554
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
555
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
556
+ requestBodySample: z.ZodOptional<z.ZodAny>;
557
+ responseBodySample: z.ZodOptional<z.ZodAny>;
558
+ operationName: z.ZodOptional<z.ZodString>;
559
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
560
+ }, "strip", z.ZodTypeAny, {
561
+ url: string;
562
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
563
+ status?: number | undefined;
564
+ requestHeaders?: Record<string, string> | undefined;
565
+ requestBodySchema?: any;
566
+ responseBodySchema?: any;
567
+ requestBodySample?: any;
568
+ responseBodySample?: any;
569
+ operationName?: string | undefined;
570
+ operationType?: "query" | "mutation" | "subscription" | undefined;
571
+ }, {
572
+ url: string;
573
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
574
+ status?: number | undefined;
575
+ requestHeaders?: Record<string, string> | undefined;
576
+ requestBodySchema?: any;
577
+ responseBodySchema?: any;
578
+ requestBodySample?: any;
579
+ responseBodySample?: any;
580
+ operationName?: string | undefined;
581
+ operationType?: "query" | "mutation" | "subscription" | undefined;
582
+ }>, "many">;
583
+ labels: z.ZodArray<z.ZodString, "many">;
584
+ screenshotPath: z.ZodOptional<z.ZodString>;
585
+ }, "strip", z.ZodTypeAny, {
586
+ kind: "click_flow";
587
+ id: string;
588
+ pageUrl: string;
589
+ labels: string[];
590
+ networkCalls: {
591
+ url: string;
592
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
593
+ status?: number | undefined;
594
+ requestHeaders?: Record<string, string> | undefined;
595
+ requestBodySchema?: any;
596
+ responseBodySchema?: any;
597
+ requestBodySample?: any;
598
+ responseBodySample?: any;
599
+ operationName?: string | undefined;
600
+ operationType?: "query" | "mutation" | "subscription" | undefined;
601
+ }[];
602
+ startSelector: string;
603
+ intermediateSteps?: string[] | undefined;
604
+ resultingUrl?: string | undefined;
605
+ screenshotPath?: string | undefined;
606
+ }, {
607
+ kind: "click_flow";
608
+ id: string;
609
+ pageUrl: string;
610
+ labels: string[];
611
+ networkCalls: {
612
+ url: string;
613
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
614
+ status?: number | undefined;
615
+ requestHeaders?: Record<string, string> | undefined;
616
+ requestBodySchema?: any;
617
+ responseBodySchema?: any;
618
+ requestBodySample?: any;
619
+ responseBodySample?: any;
620
+ operationName?: string | undefined;
621
+ operationType?: "query" | "mutation" | "subscription" | undefined;
622
+ }[];
623
+ startSelector: string;
624
+ intermediateSteps?: string[] | undefined;
625
+ resultingUrl?: string | undefined;
626
+ screenshotPath?: string | undefined;
627
+ }>, z.ZodObject<{
628
+ kind: z.ZodLiteral<"api_call">;
629
+ id: z.ZodString;
630
+ pageUrl: z.ZodString;
631
+ request: z.ZodObject<{
632
+ method: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE"]>;
633
+ url: z.ZodString;
634
+ status: z.ZodOptional<z.ZodNumber>;
635
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
636
+ requestBodySchema: z.ZodOptional<z.ZodAny>;
637
+ responseBodySchema: z.ZodOptional<z.ZodAny>;
638
+ requestBodySample: z.ZodOptional<z.ZodAny>;
639
+ responseBodySample: z.ZodOptional<z.ZodAny>;
640
+ operationName: z.ZodOptional<z.ZodString>;
641
+ operationType: z.ZodOptional<z.ZodEnum<["query", "mutation", "subscription"]>>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ url: string;
644
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
645
+ status?: number | undefined;
646
+ requestHeaders?: Record<string, string> | undefined;
647
+ requestBodySchema?: any;
648
+ responseBodySchema?: any;
649
+ requestBodySample?: any;
650
+ responseBodySample?: any;
651
+ operationName?: string | undefined;
652
+ operationType?: "query" | "mutation" | "subscription" | undefined;
653
+ }, {
654
+ url: string;
655
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
656
+ status?: number | undefined;
657
+ requestHeaders?: Record<string, string> | undefined;
658
+ requestBodySchema?: any;
659
+ responseBodySchema?: any;
660
+ requestBodySample?: any;
661
+ responseBodySample?: any;
662
+ operationName?: string | undefined;
663
+ operationType?: "query" | "mutation" | "subscription" | undefined;
664
+ }>;
665
+ triggerSelector: z.ZodOptional<z.ZodString>;
666
+ labels: z.ZodArray<z.ZodString, "many">;
667
+ }, "strip", z.ZodTypeAny, {
668
+ kind: "api_call";
669
+ id: string;
670
+ pageUrl: string;
671
+ labels: string[];
672
+ request: {
673
+ url: string;
674
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
675
+ status?: number | undefined;
676
+ requestHeaders?: Record<string, string> | undefined;
677
+ requestBodySchema?: any;
678
+ responseBodySchema?: any;
679
+ requestBodySample?: any;
680
+ responseBodySample?: any;
681
+ operationName?: string | undefined;
682
+ operationType?: "query" | "mutation" | "subscription" | undefined;
683
+ };
684
+ triggerSelector?: string | undefined;
685
+ }, {
686
+ kind: "api_call";
687
+ id: string;
688
+ pageUrl: string;
689
+ labels: string[];
690
+ request: {
691
+ url: string;
692
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
693
+ status?: number | undefined;
694
+ requestHeaders?: Record<string, string> | undefined;
695
+ requestBodySchema?: any;
696
+ responseBodySchema?: any;
697
+ requestBodySample?: any;
698
+ responseBodySample?: any;
699
+ operationName?: string | undefined;
700
+ operationType?: "query" | "mutation" | "subscription" | undefined;
701
+ };
702
+ triggerSelector?: string | undefined;
703
+ }>, z.ZodObject<{
704
+ kind: z.ZodLiteral<"route_change">;
705
+ id: z.ZodString;
706
+ from: z.ZodString;
707
+ to: z.ZodString;
708
+ trigger: z.ZodOptional<z.ZodString>;
709
+ labels: z.ZodArray<z.ZodString, "many">;
710
+ }, "strip", z.ZodTypeAny, {
711
+ kind: "route_change";
712
+ id: string;
713
+ labels: string[];
714
+ from: string;
715
+ to: string;
716
+ trigger?: string | undefined;
717
+ }, {
718
+ kind: "route_change";
719
+ id: string;
720
+ labels: string[];
721
+ from: string;
722
+ to: string;
723
+ trigger?: string | undefined;
724
+ }>]>;
725
+ export declare const SafetySchema: z.ZodObject<{
726
+ level: z.ZodEnum<["read", "write", "danger"]>;
727
+ requiresConfirm: z.ZodBoolean;
728
+ }, "strip", z.ZodTypeAny, {
729
+ level: "read" | "write" | "danger";
730
+ requiresConfirm: boolean;
731
+ }, {
732
+ level: "read" | "write" | "danger";
733
+ requiresConfirm: boolean;
734
+ }>;
735
+ export declare const ToolSpecSchema: z.ZodObject<{
736
+ id: z.ZodString;
737
+ name: z.ZodString;
738
+ description: z.ZodString;
739
+ inputSchema: z.ZodAny;
740
+ outputSchema: z.ZodOptional<z.ZodAny>;
741
+ safety: z.ZodObject<{
742
+ level: z.ZodEnum<["read", "write", "danger"]>;
743
+ requiresConfirm: z.ZodBoolean;
744
+ }, "strip", z.ZodTypeAny, {
745
+ level: "read" | "write" | "danger";
746
+ requiresConfirm: boolean;
747
+ }, {
748
+ level: "read" | "write" | "danger";
749
+ requiresConfirm: boolean;
750
+ }>;
751
+ availability: z.ZodObject<{
752
+ urlPatterns: z.ZodArray<z.ZodString, "many">;
753
+ requiresAuth: z.ZodBoolean;
754
+ }, "strip", z.ZodTypeAny, {
755
+ urlPatterns: string[];
756
+ requiresAuth: boolean;
757
+ }, {
758
+ urlPatterns: string[];
759
+ requiresAuth: boolean;
760
+ }>;
761
+ implementation: z.ZodObject<{
762
+ kind: z.ZodEnum<["js_handler", "form_declarative"]>;
763
+ handlerTemplate: z.ZodOptional<z.ZodAny>;
764
+ form: z.ZodOptional<z.ZodObject<{
765
+ toolname: z.ZodString;
766
+ tooldescription: z.ZodString;
767
+ toolautosubmit: z.ZodOptional<z.ZodBoolean>;
768
+ formSelector: z.ZodString;
769
+ }, "strip", z.ZodTypeAny, {
770
+ formSelector: string;
771
+ toolname: string;
772
+ tooldescription: string;
773
+ toolautosubmit?: boolean | undefined;
774
+ }, {
775
+ formSelector: string;
776
+ toolname: string;
777
+ tooldescription: string;
778
+ toolautosubmit?: boolean | undefined;
779
+ }>>;
780
+ }, "strip", z.ZodTypeAny, {
781
+ kind: "js_handler" | "form_declarative";
782
+ handlerTemplate?: any;
783
+ form?: {
784
+ formSelector: string;
785
+ toolname: string;
786
+ tooldescription: string;
787
+ toolautosubmit?: boolean | undefined;
788
+ } | undefined;
789
+ }, {
790
+ kind: "js_handler" | "form_declarative";
791
+ handlerTemplate?: any;
792
+ form?: {
793
+ formSelector: string;
794
+ toolname: string;
795
+ tooldescription: string;
796
+ toolautosubmit?: boolean | undefined;
797
+ } | undefined;
798
+ }>;
799
+ provenance: z.ZodObject<{
800
+ actions: z.ZodArray<z.ZodString, "many">;
801
+ createdFrom: z.ZodLiteral<"autogen-v1">;
802
+ confidence: z.ZodNumber;
803
+ pageUrl: z.ZodString;
804
+ }, "strip", z.ZodTypeAny, {
805
+ pageUrl: string;
806
+ actions: string[];
807
+ createdFrom: "autogen-v1";
808
+ confidence: number;
809
+ }, {
810
+ pageUrl: string;
811
+ actions: string[];
812
+ createdFrom: "autogen-v1";
813
+ confidence: number;
814
+ }>;
815
+ }, "strip", z.ZodTypeAny, {
816
+ name: string;
817
+ id: string;
818
+ description: string;
819
+ safety: {
820
+ level: "read" | "write" | "danger";
821
+ requiresConfirm: boolean;
822
+ };
823
+ availability: {
824
+ urlPatterns: string[];
825
+ requiresAuth: boolean;
826
+ };
827
+ implementation: {
828
+ kind: "js_handler" | "form_declarative";
829
+ handlerTemplate?: any;
830
+ form?: {
831
+ formSelector: string;
832
+ toolname: string;
833
+ tooldescription: string;
834
+ toolautosubmit?: boolean | undefined;
835
+ } | undefined;
836
+ };
837
+ provenance: {
838
+ pageUrl: string;
839
+ actions: string[];
840
+ createdFrom: "autogen-v1";
841
+ confidence: number;
842
+ };
843
+ inputSchema?: any;
844
+ outputSchema?: any;
845
+ }, {
846
+ name: string;
847
+ id: string;
848
+ description: string;
849
+ safety: {
850
+ level: "read" | "write" | "danger";
851
+ requiresConfirm: boolean;
852
+ };
853
+ availability: {
854
+ urlPatterns: string[];
855
+ requiresAuth: boolean;
856
+ };
857
+ implementation: {
858
+ kind: "js_handler" | "form_declarative";
859
+ handlerTemplate?: any;
860
+ form?: {
861
+ formSelector: string;
862
+ toolname: string;
863
+ tooldescription: string;
864
+ toolautosubmit?: boolean | undefined;
865
+ } | undefined;
866
+ };
867
+ provenance: {
868
+ pageUrl: string;
869
+ actions: string[];
870
+ createdFrom: "autogen-v1";
871
+ confidence: number;
872
+ };
873
+ inputSchema?: any;
874
+ outputSchema?: any;
875
+ }>;
876
+ //# sourceMappingURL=validation.d.ts.map