aether-mcp-server 2.0.2 → 2.1.1

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/dist/types.js ADDED
@@ -0,0 +1,267 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RememberAetherLessonSchema = exports.ConfigureAetherMemorySchema = exports.LoadAuthStateSchema = exports.SaveAuthStateSchema = exports.GetPageTextSchema = exports.PageSnapshotSchema = exports.AgentFormFillSchema = exports.ObserveAndActSchema = exports.SmartNavigateSchema = exports.AgentActionSchema = exports.SolveCaptchaSchema = exports.DetectCaptchaSchema = exports.CdpCommandSchema = exports.ExecuteScriptSchema = exports.GetNetworkErrorsSchema = exports.GetLogsSchema = exports.ActSchema = exports.BrowserIntentSchema = exports.ElementAtPointSchema = exports.PressKeySchema = exports.FillLabelSchema = exports.ClickRoleSchema = exports.ClickTextSchema = exports.WaitForTextSchema = exports.WaitForSelectorSchema = exports.FillBySelectorSchema = exports.ClickBySelectorSchema = exports.ClickByRefSchema = exports.BrowserStatusSchema = exports.ListInteractiveElementsSchema = exports.SnapshotCompactSchema = exports.GetStateSchema = exports.ConnectBrowserSchema = void 0;
4
+ /**
5
+ * Aether MCP Server — Shared Types
6
+ *
7
+ * All Zod-inferred types for end-to-end type safety across the bridge,
8
+ * client, and MCP tool handlers. Generated from the schemas in mcp-server.ts.
9
+ */
10
+ const zod_1 = require("zod");
11
+ // ─── Browser Connection ───────────────────────────────────────────────
12
+ exports.ConnectBrowserSchema = zod_1.z.object({
13
+ mode: zod_1.z.enum(["connect", "launch", "auto", "ask"]).optional(),
14
+ port: zod_1.z.number().optional(),
15
+ headless: zod_1.z.boolean().optional(),
16
+ browser: zod_1.z.enum(["chrome", "edge", "brave", "firefox"]).optional(),
17
+ profile: zod_1.z.string().optional(),
18
+ profileDirectory: zod_1.z.string().optional(),
19
+ userDataDir: zod_1.z.string().optional(),
20
+ });
21
+ // ─── State & Snapshot ─────────────────────────────────────────────────
22
+ exports.GetStateSchema = zod_1.z.object({
23
+ screenshot: zod_1.z.boolean().optional(),
24
+ domSnapshot: zod_1.z.boolean().optional(),
25
+ elements: zod_1.z.boolean().optional(),
26
+ som: zod_1.z.boolean().optional(),
27
+ tabs: zod_1.z.boolean().optional(),
28
+ });
29
+ exports.SnapshotCompactSchema = zod_1.z.object({
30
+ maxElements: zod_1.z.number().optional(),
31
+ includeText: zod_1.z.boolean().optional(),
32
+ });
33
+ exports.ListInteractiveElementsSchema = zod_1.z.object({
34
+ maxElements: zod_1.z.number().optional(),
35
+ withOverlay: zod_1.z.boolean().optional(),
36
+ });
37
+ exports.BrowserStatusSchema = zod_1.z.object({
38
+ includeTargets: zod_1.z.boolean().optional(),
39
+ });
40
+ // ─── Interaction ──────────────────────────────────────────────────────
41
+ exports.ClickByRefSchema = zod_1.z.object({
42
+ ref: zod_1.z.string(),
43
+ });
44
+ exports.ClickBySelectorSchema = zod_1.z.object({
45
+ selector: zod_1.z.string(),
46
+ timeout: zod_1.z.number().optional(),
47
+ });
48
+ exports.FillBySelectorSchema = zod_1.z.object({
49
+ selector: zod_1.z.string(),
50
+ value: zod_1.z.string(),
51
+ timeout: zod_1.z.number().optional(),
52
+ });
53
+ exports.WaitForSelectorSchema = zod_1.z.object({
54
+ selector: zod_1.z.string(),
55
+ timeout: zod_1.z.number().optional(),
56
+ });
57
+ exports.WaitForTextSchema = zod_1.z.object({
58
+ text: zod_1.z.string(),
59
+ timeout: zod_1.z.number().optional(),
60
+ });
61
+ exports.ClickTextSchema = zod_1.z.object({
62
+ text: zod_1.z.string(),
63
+ role: zod_1.z.string().optional(),
64
+ timeout: zod_1.z.number().optional(),
65
+ });
66
+ exports.ClickRoleSchema = zod_1.z.object({
67
+ role: zod_1.z.string(),
68
+ name: zod_1.z.string().optional(),
69
+ timeout: zod_1.z.number().optional(),
70
+ });
71
+ exports.FillLabelSchema = zod_1.z.object({
72
+ label: zod_1.z.string(),
73
+ value: zod_1.z.string(),
74
+ role: zod_1.z.string().optional(),
75
+ timeout: zod_1.z.number().optional(),
76
+ });
77
+ exports.PressKeySchema = zod_1.z.object({
78
+ key: zod_1.z.string(),
79
+ modifiers: zod_1.z.array(zod_1.z.string()).optional(),
80
+ });
81
+ exports.ElementAtPointSchema = zod_1.z.object({
82
+ x: zod_1.z.number().optional(),
83
+ y: zod_1.z.number().optional(),
84
+ coordinate: zod_1.z.string().optional(),
85
+ });
86
+ // ─── Browser Intent ───────────────────────────────────────────────────
87
+ exports.BrowserIntentSchema = zod_1.z.object({
88
+ intent: zod_1.z.enum(["click", "fill", "select", "check", "wait_for", "inspect", "navigate"]),
89
+ target: zod_1.z.string().optional(),
90
+ value: zod_1.z.string().optional(),
91
+ role: zod_1.z.string().optional(),
92
+ timeout: zod_1.z.number().optional(),
93
+ verify: zod_1.z.string().optional(),
94
+ includeCandidates: zod_1.z.boolean().optional(),
95
+ });
96
+ // ─── Act (Primary Action Tool) ────────────────────────────────────────
97
+ exports.ActSchema = zod_1.z.object({
98
+ action: zod_1.z.enum([
99
+ "navigate", "click", "type", "fill", "select", "check",
100
+ "hover", "scroll", "wait", "screenshot",
101
+ "new_tab", "switch_tab", "close_tab", "drag_and_drop", "upload_file",
102
+ "get_tree", "get_dom_tree", "configure", "print_pdf", "emulate_network",
103
+ "get_cookies", "set_cookie", "clear_cache", "set_geolocation", "set_timezone",
104
+ "get_performance_metrics",
105
+ "start_screencast", "stop_screencast", "record_session", "sample_visual_frames",
106
+ "mock_network_request", "highlight_elements",
107
+ "assert", "start_tracing", "stop_tracing",
108
+ "screenshot_region", "verify_ui_state", "get_dom_snapshot", "get_event_listeners",
109
+ "get_computed_style", "get_network_traffic", "get_network_response",
110
+ "get_screencast_frames", "get_dom_storage", "get_logs", "press_key", "key_combo",
111
+ "click_text", "click_role", "fill_label", "element_at_point", "detect_captcha",
112
+ ]),
113
+ selector: zod_1.z.string().optional(),
114
+ text: zod_1.z.string().optional(),
115
+ key: zod_1.z.string().optional(),
116
+ role: zod_1.z.string().optional(),
117
+ name: zod_1.z.string().optional(),
118
+ label: zod_1.z.string().optional(),
119
+ elementId: zod_1.z.string().optional(),
120
+ value: zod_1.z.string().optional(),
121
+ assertionType: zod_1.z.string().optional(),
122
+ options: zod_1.z.record(zod_1.z.any()).optional(),
123
+ domain: zod_1.z.string().optional(),
124
+ coordinate: zod_1.z.string().optional(),
125
+ x: zod_1.z.number().optional(),
126
+ y: zod_1.z.number().optional(),
127
+ visible: zod_1.z.boolean().optional(),
128
+ stable: zod_1.z.boolean().optional(),
129
+ parentId: zod_1.z.string().optional(),
130
+ projectRoot: zod_1.z.string().optional(),
131
+ tabId: zod_1.z.number().optional(),
132
+ files: zod_1.z.array(zod_1.z.string()).optional(),
133
+ modifiers: zod_1.z.array(zod_1.z.string()).optional(),
134
+ format: zod_1.z.string().optional(),
135
+ quality: zod_1.z.number().optional(),
136
+ maxWidth: zod_1.z.number().optional(),
137
+ maxHeight: zod_1.z.number().optional(),
138
+ everyNthFrame: zod_1.z.number().optional(),
139
+ maxFrames: zod_1.z.number().optional(),
140
+ duration: zod_1.z.number().optional(),
141
+ cookieName: zod_1.z.string().optional(),
142
+ cookieValue: zod_1.z.string().optional(),
143
+ latitude: zod_1.z.number().optional(),
144
+ longitude: zod_1.z.number().optional(),
145
+ timezoneId: zod_1.z.string().optional(),
146
+ urlPattern: zod_1.z.string().optional(),
147
+ mockResponse: zod_1.z.string().optional(),
148
+ markdownSummary: zod_1.z.string().optional(),
149
+ requestId: zod_1.z.string().optional(),
150
+ offline: zod_1.z.boolean().optional(),
151
+ latency: zod_1.z.number().optional(),
152
+ downloadThroughput: zod_1.z.number().optional(),
153
+ uploadThroughput: zod_1.z.number().optional(),
154
+ landscape: zod_1.z.boolean().optional(),
155
+ printBackground: zod_1.z.boolean().optional(),
156
+ network: zod_1.z.object({
157
+ blockImages: zod_1.z.boolean().optional(),
158
+ blockAds: zod_1.z.boolean().optional(),
159
+ blockCSS: zod_1.z.boolean().optional(),
160
+ }).optional(),
161
+ emulation: zod_1.z.object({
162
+ width: zod_1.z.number().optional(),
163
+ height: zod_1.z.number().optional(),
164
+ mobile: zod_1.z.boolean().optional(),
165
+ userAgent: zod_1.z.string().optional(),
166
+ }).optional(),
167
+ script: zod_1.z.object({
168
+ onLoad: zod_1.z.string().optional(),
169
+ }).optional(),
170
+ });
171
+ // ─── Debugging ────────────────────────────────────────────────────────
172
+ exports.GetLogsSchema = zod_1.z.object({
173
+ limit: zod_1.z.number().optional(),
174
+ });
175
+ exports.GetNetworkErrorsSchema = zod_1.z.object({
176
+ limit: zod_1.z.number().optional(),
177
+ });
178
+ exports.ExecuteScriptSchema = zod_1.z.object({
179
+ script: zod_1.z.string(),
180
+ });
181
+ exports.CdpCommandSchema = zod_1.z.object({
182
+ command: zod_1.z.string(),
183
+ args: zod_1.z.record(zod_1.z.any()).optional(),
184
+ });
185
+ // ─── CAPTCHA ──────────────────────────────────────────────────────────
186
+ exports.DetectCaptchaSchema = zod_1.z.object({});
187
+ exports.SolveCaptchaSchema = zod_1.z.object({
188
+ useService: zod_1.z.boolean().optional(),
189
+ service: zod_1.z.enum(["2captcha", "capsolver"]).optional(),
190
+ apiKey: zod_1.z.string().optional(),
191
+ pageUrl: zod_1.z.string().optional(),
192
+ waitAfterClick: zod_1.z.number().optional(),
193
+ timeout: zod_1.z.number().optional(),
194
+ pollInterval: zod_1.z.number().optional(),
195
+ });
196
+ // ─── Agent-Centric APIs ───────────────────────────────────────────────
197
+ exports.AgentActionSchema = zod_1.z.object({
198
+ action: zod_1.z.string(),
199
+ target: zod_1.z.record(zod_1.z.any()).optional(),
200
+ verify: zod_1.z.record(zod_1.z.any()).optional(),
201
+ waitFor: zod_1.z.record(zod_1.z.any()).optional(),
202
+ timeout: zod_1.z.number().optional(),
203
+ screenshot: zod_1.z.boolean().optional(),
204
+ });
205
+ exports.SmartNavigateSchema = zod_1.z.object({
206
+ url: zod_1.z.string(),
207
+ waitFor: zod_1.z.record(zod_1.z.any()).optional(),
208
+ dismissPopups: zod_1.z.boolean().optional(),
209
+ screenshot: zod_1.z.boolean().optional(),
210
+ timeout: zod_1.z.number().optional(),
211
+ });
212
+ exports.ObserveAndActSchema = zod_1.z.object({
213
+ action: zod_1.z.record(zod_1.z.any()),
214
+ observe: zod_1.z.record(zod_1.z.any()).optional(),
215
+ returnScreenshot: zod_1.z.boolean().optional(),
216
+ });
217
+ exports.AgentFormFillSchema = zod_1.z.object({
218
+ fields: zod_1.z.array(zod_1.z.record(zod_1.z.any())),
219
+ submitAfterFill: zod_1.z.boolean().optional(),
220
+ submitSelector: zod_1.z.string().optional(),
221
+ });
222
+ exports.PageSnapshotSchema = zod_1.z.object({
223
+ fullPage: zod_1.z.boolean().optional(),
224
+ includeDOMSnapshot: zod_1.z.boolean().optional(),
225
+ screenshot: zod_1.z.boolean().optional(),
226
+ cookies: zod_1.z.boolean().optional(),
227
+ accessibilityTree: zod_1.z.boolean().optional(),
228
+ });
229
+ // ─── Page Text ────────────────────────────────────────────────────────
230
+ exports.GetPageTextSchema = zod_1.z.object({
231
+ format: zod_1.z.enum(["markdown", "text"]).optional(),
232
+ selector: zod_1.z.string().optional(),
233
+ includeLinks: zod_1.z.boolean().optional(),
234
+ maxLength: zod_1.z.number().optional(),
235
+ });
236
+ // ─── Auth State ───────────────────────────────────────────────────────
237
+ exports.SaveAuthStateSchema = zod_1.z.object({
238
+ path: zod_1.z.string().optional(),
239
+ origins: zod_1.z.array(zod_1.z.any()).optional(),
240
+ });
241
+ exports.LoadAuthStateSchema = zod_1.z.object({
242
+ path: zod_1.z.string().optional(),
243
+ reload: zod_1.z.boolean().optional(),
244
+ });
245
+ // ─── Aether Memory ────────────────────────────────────────────────────
246
+ exports.ConfigureAetherMemorySchema = zod_1.z.object({
247
+ projectRoot: zod_1.z.string().optional(),
248
+ });
249
+ exports.RememberAetherLessonSchema = zod_1.z.object({
250
+ projectRoot: zod_1.z.string().optional(),
251
+ title: zod_1.z.string(),
252
+ trigger: zod_1.z.string(),
253
+ problemPattern: zod_1.z.string(),
254
+ symptoms: zod_1.z.array(zod_1.z.string()).optional(),
255
+ failedApproach: zod_1.z.string().optional(),
256
+ betterApproach: zod_1.z.string(),
257
+ createdBecause: zod_1.z.enum([
258
+ "complex_task_succeeded",
259
+ "errors_overcome",
260
+ "user_corrected_approach_worked",
261
+ "non_trivial_workflow_discovered",
262
+ "user_asked_to_remember",
263
+ ]),
264
+ evidence: zod_1.z.string().optional(),
265
+ tags: zod_1.z.array(zod_1.z.string()).optional(),
266
+ confidence: zod_1.z.number().optional(),
267
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aether-mcp-server",
3
- "version": "2.0.2",
3
+ "version": "2.1.1",
4
4
  "description": "Aether MCP Server - AI Browser Controller",
5
5
  "main": "dist/index.js",
6
6
  "bin": {