claude-eyes 0.1.0 → 0.1.2
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 +72 -27
- package/build/index.js +0 -0
- package/build/tools/console.d.ts +18 -11
- package/build/tools/console.d.ts.map +1 -1
- package/build/tools/dom.d.ts +20 -4
- package/build/tools/dom.d.ts.map +1 -1
- package/build/tools/index.d.ts.map +1 -1
- package/build/tools/index.js +2 -26
- package/build/tools/index.js.map +1 -1
- package/build/tools/interaction.d.ts +63 -18
- package/build/tools/interaction.d.ts.map +1 -1
- package/build/tools/navigation.d.ts +16 -14
- package/build/tools/navigation.d.ts.map +1 -1
- package/build/tools/network.d.ts +28 -6
- package/build/tools/network.d.ts.map +1 -1
- package/build/tools/qa.d.ts +48 -13
- package/build/tools/qa.d.ts.map +1 -1
- package/build/tools/visual.d.ts +19 -3
- package/build/tools/visual.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
# claude-eyes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/claude-eyes)
|
|
4
|
+
[](LICENSE)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Give Claude Code eyes.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
An MCP server that lets Claude see screenshots, read console errors, and verify its own frontend fixes autonomously.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
<p align="center">
|
|
11
|
+
<img src="assets/claude-eyes.png" alt="claude-eyes in action" width="800">
|
|
12
|
+
</p>
|
|
10
13
|
|
|
11
14
|
---
|
|
12
15
|
|
|
13
|
-
##
|
|
16
|
+
## The Problem
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
You: "Fix the login button"
|
|
18
|
-
Claude: *writes code*
|
|
19
|
-
Claude: "I've updated the button. Can you check if it works?"
|
|
20
|
-
You: *opens browser, clicks around*
|
|
21
|
-
You: "There's a console error"
|
|
22
|
-
Claude: "Can you paste it?"
|
|
23
|
-
... 5 more messages ...
|
|
24
|
-
```
|
|
18
|
+
Claude Code writes frontend code. But it can't see what it built.
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
Every time Claude makes a UI change, you become the middleman:
|
|
21
|
+
|
|
22
|
+
- *"Does the button show up?"*
|
|
23
|
+
- *"Is there a console error?"*
|
|
24
|
+
- *"Did the layout break?"*
|
|
25
|
+
|
|
26
|
+
You check the browser, copy-paste errors, describe what you see. Claude guesses what went wrong. Repeat.
|
|
27
|
+
|
|
28
|
+
**This back-and-forth shouldn't exist.**
|
|
29
|
+
|
|
30
|
+
## The Solution
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
claude-eyes gives Claude actual vision:
|
|
33
|
+
|
|
34
|
+
- **Screenshots** it can see (not file paths - actual images)
|
|
35
|
+
- **Console logs** it can read
|
|
36
|
+
- **Network requests** it can inspect
|
|
37
|
+
- **Page interactions** it can perform
|
|
38
|
+
|
|
39
|
+
Now when you say *"fix the login button"*, Claude writes the code, opens the browser, clicks the button, checks for errors, and confirms it works. One message. Done.
|
|
35
40
|
|
|
36
41
|
---
|
|
37
42
|
|
|
38
43
|
## Install
|
|
44
|
+
|
|
45
|
+
1. Install Playwright's browser:
|
|
39
46
|
```bash
|
|
40
|
-
|
|
47
|
+
npx playwright install chromium
|
|
41
48
|
```
|
|
49
|
+
|
|
50
|
+
2. Add to your `.mcp.json`:
|
|
42
51
|
```json
|
|
43
52
|
{
|
|
44
53
|
"mcpServers": {
|
|
@@ -50,9 +59,11 @@ npm install claude-eyes
|
|
|
50
59
|
}
|
|
51
60
|
```
|
|
52
61
|
|
|
62
|
+
3. Restart Claude Code.
|
|
63
|
+
|
|
53
64
|
---
|
|
54
65
|
|
|
55
|
-
## What Claude
|
|
66
|
+
## What Claude Can Do
|
|
56
67
|
|
|
57
68
|
| Capability | Tools |
|
|
58
69
|
|------------|-------|
|
|
@@ -61,10 +72,44 @@ npm install claude-eyes
|
|
|
61
72
|
| **Interact** | `click`, `type`, `scroll`, `hover`, `navigate` |
|
|
62
73
|
| **Verify** | `verify_no_errors`, `verify_element`, `verify_request_succeeded` |
|
|
63
74
|
|
|
64
|
-
26 tools total
|
|
75
|
+
26 tools total for autonomous visual QA.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Example
|
|
80
|
+
|
|
81
|
+
**Without claude-eyes:**
|
|
82
|
+
```
|
|
83
|
+
You: "Fix the login button"
|
|
84
|
+
Claude: *writes code*
|
|
85
|
+
Claude: "I've updated the button. Can you check if it works?"
|
|
86
|
+
You: *opens browser, clicks around*
|
|
87
|
+
You: "There's a console error"
|
|
88
|
+
Claude: "Can you paste it?"
|
|
89
|
+
... 5 more messages ...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**With claude-eyes:**
|
|
93
|
+
```
|
|
94
|
+
You: "Fix the login button"
|
|
95
|
+
Claude: *writes code, takes screenshot, clicks button, checks console*
|
|
96
|
+
Claude: "Fixed. Button renders correctly, click triggers POST /api/auth (200), no console errors."
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## How It Works
|
|
102
|
+
|
|
103
|
+
claude-eyes runs a headless Chromium browser via Playwright. When Claude calls a tool like `screenshot`, it captures the actual page and returns it as an image that Claude can see and reason about.
|
|
104
|
+
|
|
105
|
+
The key insight: Claude receives **actual image data**, not file paths. It can look at your UI, notice visual bugs, and verify fixes without you lifting a finger.
|
|
65
106
|
|
|
66
107
|
---
|
|
67
108
|
|
|
109
|
+
## Contributing
|
|
110
|
+
|
|
111
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions and guidelines.
|
|
112
|
+
|
|
68
113
|
## License
|
|
69
114
|
|
|
70
|
-
MIT
|
|
115
|
+
MIT
|
package/build/index.js
CHANGED
|
File without changes
|
package/build/tools/console.d.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const getConsoleLogsSchema: z.ZodObject<{
|
|
3
|
-
types: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
4
|
-
log: "log";
|
|
5
|
-
debug: "debug";
|
|
6
|
-
info: "info";
|
|
7
|
-
error: "error";
|
|
8
|
-
warning: "warning";
|
|
9
|
-
trace: "trace";
|
|
10
|
-
}>>>;
|
|
3
|
+
types: z.ZodOptional<z.ZodArray<z.ZodEnum<["log", "debug", "info", "error", "warning", "trace"]>, "many">>;
|
|
11
4
|
since: z.ZodOptional<z.ZodNumber>;
|
|
12
5
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
13
6
|
search: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, z.
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
limit: number;
|
|
9
|
+
types?: ("log" | "debug" | "info" | "error" | "warning" | "trace")[] | undefined;
|
|
10
|
+
since?: number | undefined;
|
|
11
|
+
search?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
types?: ("log" | "debug" | "info" | "error" | "warning" | "trace")[] | undefined;
|
|
14
|
+
since?: number | undefined;
|
|
15
|
+
search?: string | undefined;
|
|
16
|
+
limit?: number | undefined;
|
|
17
|
+
}>;
|
|
15
18
|
export declare function getConsoleLogs(args: z.infer<typeof getConsoleLogsSchema>): Promise<{
|
|
16
19
|
content: {
|
|
17
20
|
type: "text";
|
|
18
21
|
text: string;
|
|
19
22
|
}[];
|
|
20
23
|
}>;
|
|
21
|
-
export declare const clearConsoleSchema: z.ZodObject<{}, z.
|
|
24
|
+
export declare const clearConsoleSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
22
25
|
export declare function clearConsole(): Promise<{
|
|
23
26
|
content: {
|
|
24
27
|
type: "text";
|
|
@@ -27,7 +30,11 @@ export declare function clearConsole(): Promise<{
|
|
|
27
30
|
}>;
|
|
28
31
|
export declare const getConsoleErrorsSchema: z.ZodObject<{
|
|
29
32
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
30
|
-
}, z.
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
limit: number;
|
|
35
|
+
}, {
|
|
36
|
+
limit?: number | undefined;
|
|
37
|
+
}>;
|
|
31
38
|
export declare function getConsoleErrors(args: z.infer<typeof getConsoleErrorsSchema>): Promise<{
|
|
32
39
|
content: {
|
|
33
40
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../src/tools/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../src/tools/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAkB/B,CAAC;AAEH,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;GAmC9E;AAED,eAAO,MAAM,kBAAkB,gDAAe,CAAC;AAE/C,wBAAsB,YAAY;;;;;GAWjC;AAED,eAAO,MAAM,sBAAsB;;;;;;EAMjC,CAAC;AAEH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC;;;;;GAqClF"}
|
package/build/tools/dom.d.ts
CHANGED
|
@@ -2,7 +2,13 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const getDomSnapshotSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
selector: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
5
|
-
}, z.
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
selector: string;
|
|
7
|
+
name: string;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
selector?: string | undefined;
|
|
11
|
+
}>;
|
|
6
12
|
export declare function getDomSnapshot(args: z.infer<typeof getDomSnapshotSchema>): Promise<{
|
|
7
13
|
content: {
|
|
8
14
|
type: "text";
|
|
@@ -12,7 +18,13 @@ export declare function getDomSnapshot(args: z.infer<typeof getDomSnapshotSchema
|
|
|
12
18
|
export declare const domDiffSchema: z.ZodObject<{
|
|
13
19
|
baseline: z.ZodString;
|
|
14
20
|
current: z.ZodString;
|
|
15
|
-
}, z.
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
baseline: string;
|
|
23
|
+
current: string;
|
|
24
|
+
}, {
|
|
25
|
+
baseline: string;
|
|
26
|
+
current: string;
|
|
27
|
+
}>;
|
|
16
28
|
export declare function domDiff(args: z.infer<typeof domDiffSchema>): Promise<{
|
|
17
29
|
content: {
|
|
18
30
|
type: "text";
|
|
@@ -21,14 +33,18 @@ export declare function domDiff(args: z.infer<typeof domDiffSchema>): Promise<{
|
|
|
21
33
|
}>;
|
|
22
34
|
export declare const getElementInfoSchema: z.ZodObject<{
|
|
23
35
|
selector: z.ZodString;
|
|
24
|
-
}, z.
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
selector: string;
|
|
38
|
+
}, {
|
|
39
|
+
selector: string;
|
|
40
|
+
}>;
|
|
25
41
|
export declare function getElementInfo(args: z.infer<typeof getElementInfoSchema>): Promise<{
|
|
26
42
|
content: {
|
|
27
43
|
type: "text";
|
|
28
44
|
text: string;
|
|
29
45
|
}[];
|
|
30
46
|
}>;
|
|
31
|
-
export declare const listDomSnapshotsSchema: z.ZodObject<{}, z.
|
|
47
|
+
export declare const listDomSnapshotsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
32
48
|
export declare function listDomSnapshots(): Promise<{
|
|
33
49
|
content: {
|
|
34
50
|
type: "text";
|
package/build/tools/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/tools/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/tools/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,oBAAoB;;;;;;;;;EAO/B,CAAC;AAEH,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;GAyC9E;AAED,eAAO,MAAM,aAAa;;;;;;;;;EAGxB,CAAC;AAEH,wBAAsB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC;;;;;GAsFhE;AAED,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;GA0E9E;AAED,eAAO,MAAM,sBAAsB,gDAAe,CAAC;AAEnD,wBAAsB,gBAAgB;;;;;GAsBrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAqLnE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,QA0C3C"}
|
package/build/tools/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
2
3
|
import * as navigation from './navigation.js';
|
|
3
4
|
import * as interaction from './interaction.js';
|
|
4
5
|
import * as visual from './visual.js';
|
|
@@ -161,38 +162,13 @@ const tools = {
|
|
|
161
162
|
handler: wrapHandler(qa.verifyTextOnPage),
|
|
162
163
|
},
|
|
163
164
|
};
|
|
164
|
-
function zodToJsonSchema(schema) {
|
|
165
|
-
// Simple conversion for MCP - just get the shape
|
|
166
|
-
const def = schema._def;
|
|
167
|
-
if (def?.shape) {
|
|
168
|
-
const shape = def.shape();
|
|
169
|
-
const properties = {};
|
|
170
|
-
const required = [];
|
|
171
|
-
for (const [key, value] of Object.entries(shape)) {
|
|
172
|
-
const fieldDef = value._def;
|
|
173
|
-
const isOptional = fieldDef?.typeName === 'ZodOptional' || fieldDef?.typeName === 'ZodDefault';
|
|
174
|
-
if (!isOptional) {
|
|
175
|
-
required.push(key);
|
|
176
|
-
}
|
|
177
|
-
properties[key] = {
|
|
178
|
-
type: 'string', // simplified
|
|
179
|
-
description: fieldDef?.description,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
type: 'object',
|
|
184
|
-
properties,
|
|
185
|
-
required: required.length > 0 ? required : undefined,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return { type: 'object' };
|
|
189
|
-
}
|
|
190
165
|
export function registerTools(server) {
|
|
191
166
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
192
167
|
return {
|
|
193
168
|
tools: Object.entries(tools).map(([name, tool]) => ({
|
|
194
169
|
name,
|
|
195
170
|
description: tool.description,
|
|
171
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
196
172
|
inputSchema: zodToJsonSchema(tool.schema),
|
|
197
173
|
})),
|
|
198
174
|
};
|
package/build/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAW9B,SAAS,WAAW,CAAI,EAAoD;IAC1E,OAAO,EAA4B,CAAC;AACtC,CAAC;AAED,MAAM,KAAK,GAAyB;IAClC,QAAQ,EAAE;QACR,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,UAAU,CAAC,cAAc;QACjC,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC;KAC1C;IACD,MAAM,EAAE;QACN,WAAW,EAAE,yBAAyB;QACtC,MAAM,EAAE,UAAU,CAAC,YAAY;QAC/B,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC;KACxC;IACD,OAAO,EAAE;QACP,WAAW,EAAE,kCAAkC;QAC/C,MAAM,EAAE,UAAU,CAAC,YAAY;QAC/B,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC;KACxC;IACD,UAAU,EAAE;QACV,WAAW,EAA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AAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,UAAU,OAAO,EAAE;qBAC1B;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const clickSchema: z.ZodObject<{
|
|
3
3
|
selector: z.ZodString;
|
|
4
|
-
button: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
5
|
-
left: "left";
|
|
6
|
-
right: "right";
|
|
7
|
-
middle: "middle";
|
|
8
|
-
}>>>;
|
|
4
|
+
button: z.ZodDefault<z.ZodOptional<z.ZodEnum<["left", "right", "middle"]>>>;
|
|
9
5
|
clickCount: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
6
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
-
}, z.
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
selector: string;
|
|
9
|
+
button: "left" | "right" | "middle";
|
|
10
|
+
clickCount: number;
|
|
11
|
+
timeout: number;
|
|
12
|
+
}, {
|
|
13
|
+
selector: string;
|
|
14
|
+
button?: "left" | "right" | "middle" | undefined;
|
|
15
|
+
clickCount?: number | undefined;
|
|
16
|
+
timeout?: number | undefined;
|
|
17
|
+
}>;
|
|
12
18
|
export declare function click(args: z.infer<typeof clickSchema>): Promise<{
|
|
13
19
|
content: {
|
|
14
20
|
type: "text";
|
|
@@ -20,7 +26,17 @@ export declare const typeSchema: z.ZodObject<{
|
|
|
20
26
|
text: z.ZodString;
|
|
21
27
|
delay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
22
28
|
clear: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
23
|
-
}, z.
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
clear: boolean;
|
|
31
|
+
text: string;
|
|
32
|
+
selector: string;
|
|
33
|
+
delay: number;
|
|
34
|
+
}, {
|
|
35
|
+
text: string;
|
|
36
|
+
selector: string;
|
|
37
|
+
clear?: boolean | undefined;
|
|
38
|
+
delay?: number | undefined;
|
|
39
|
+
}>;
|
|
24
40
|
export declare function type(args: z.infer<typeof typeSchema>): Promise<{
|
|
25
41
|
content: {
|
|
26
42
|
type: "text";
|
|
@@ -30,7 +46,13 @@ export declare function type(args: z.infer<typeof typeSchema>): Promise<{
|
|
|
30
46
|
export declare const fillSchema: z.ZodObject<{
|
|
31
47
|
selector: z.ZodString;
|
|
32
48
|
value: z.ZodString;
|
|
33
|
-
}, z.
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
value: string;
|
|
51
|
+
selector: string;
|
|
52
|
+
}, {
|
|
53
|
+
value: string;
|
|
54
|
+
selector: string;
|
|
55
|
+
}>;
|
|
34
56
|
export declare function fill(args: z.infer<typeof fillSchema>): Promise<{
|
|
35
57
|
content: {
|
|
36
58
|
type: "text";
|
|
@@ -41,7 +63,15 @@ export declare const scrollSchema: z.ZodObject<{
|
|
|
41
63
|
selector: z.ZodOptional<z.ZodString>;
|
|
42
64
|
x: z.ZodOptional<z.ZodNumber>;
|
|
43
65
|
y: z.ZodOptional<z.ZodNumber>;
|
|
44
|
-
}, z.
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
x?: number | undefined;
|
|
68
|
+
selector?: string | undefined;
|
|
69
|
+
y?: number | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
x?: number | undefined;
|
|
72
|
+
selector?: string | undefined;
|
|
73
|
+
y?: number | undefined;
|
|
74
|
+
}>;
|
|
45
75
|
export declare function scroll(args: z.infer<typeof scrollSchema>): Promise<{
|
|
46
76
|
content: {
|
|
47
77
|
type: "text";
|
|
@@ -50,14 +80,17 @@ export declare function scroll(args: z.infer<typeof scrollSchema>): Promise<{
|
|
|
50
80
|
}>;
|
|
51
81
|
export declare const waitForElementSchema: z.ZodObject<{
|
|
52
82
|
selector: z.ZodString;
|
|
53
|
-
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
54
|
-
attached: "attached";
|
|
55
|
-
detached: "detached";
|
|
56
|
-
visible: "visible";
|
|
57
|
-
hidden: "hidden";
|
|
58
|
-
}>>>;
|
|
83
|
+
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<["attached", "detached", "visible", "hidden"]>>>;
|
|
59
84
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
60
|
-
}, z.
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
selector: string;
|
|
87
|
+
timeout: number;
|
|
88
|
+
state: "attached" | "detached" | "visible" | "hidden";
|
|
89
|
+
}, {
|
|
90
|
+
selector: string;
|
|
91
|
+
timeout?: number | undefined;
|
|
92
|
+
state?: "attached" | "detached" | "visible" | "hidden" | undefined;
|
|
93
|
+
}>;
|
|
61
94
|
export declare function waitForElement(args: z.infer<typeof waitForElementSchema>): Promise<{
|
|
62
95
|
content: {
|
|
63
96
|
type: "text";
|
|
@@ -67,7 +100,13 @@ export declare function waitForElement(args: z.infer<typeof waitForElementSchema
|
|
|
67
100
|
export declare const hoverSchema: z.ZodObject<{
|
|
68
101
|
selector: z.ZodString;
|
|
69
102
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
70
|
-
}, z.
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
selector: string;
|
|
105
|
+
timeout: number;
|
|
106
|
+
}, {
|
|
107
|
+
selector: string;
|
|
108
|
+
timeout?: number | undefined;
|
|
109
|
+
}>;
|
|
71
110
|
export declare function hover(args: z.infer<typeof hoverSchema>): Promise<{
|
|
72
111
|
content: {
|
|
73
112
|
type: "text";
|
|
@@ -77,7 +116,13 @@ export declare function hover(args: z.infer<typeof hoverSchema>): Promise<{
|
|
|
77
116
|
export declare const selectSchema: z.ZodObject<{
|
|
78
117
|
selector: z.ZodString;
|
|
79
118
|
value: z.ZodString;
|
|
80
|
-
}, z.
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
value: string;
|
|
121
|
+
selector: string;
|
|
122
|
+
}, {
|
|
123
|
+
value: string;
|
|
124
|
+
selector: string;
|
|
125
|
+
}>;
|
|
81
126
|
export declare function select(args: z.infer<typeof selectSchema>): Promise<{
|
|
82
127
|
content: {
|
|
83
128
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../src/tools/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../src/tools/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAiBtB,CAAC;AAEH,wBAAsB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GA6B5D;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;EAarB,CAAC;AAEH,wBAAsB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC;;;;;GA6B1D;AAED,eAAO,MAAM,UAAU;;;;;;;;;EAGrB,CAAC;AAEH,wBAAsB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC;;;;;GAwB1D;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;EAOvB,CAAC;AAEH,wBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC;;;;;GAoD9D;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAY/B,CAAC;AAEH,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;GA4B9E;AAED,eAAO,MAAM,WAAW;;;;;;;;;EAOtB,CAAC;AAEH,wBAAsB,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;;;;;GAwB5D;AAED,eAAO,MAAM,YAAY;;;;;;;;;EAGvB,CAAC;AAEH,wBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC;;;;;GAwB9D"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const navigateSchema: z.ZodObject<{
|
|
3
3
|
url: z.ZodString;
|
|
4
|
-
waitUntil: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
waitUntil: z.ZodDefault<z.ZodOptional<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
url: string;
|
|
7
|
+
waitUntil: "domcontentloaded" | "load" | "networkidle";
|
|
8
|
+
}, {
|
|
9
|
+
url: string;
|
|
10
|
+
waitUntil?: "domcontentloaded" | "load" | "networkidle" | undefined;
|
|
11
|
+
}>;
|
|
10
12
|
export declare function navigate(args: z.infer<typeof navigateSchema>): Promise<{
|
|
11
13
|
content: {
|
|
12
14
|
type: "text";
|
|
@@ -14,26 +16,26 @@ export declare function navigate(args: z.infer<typeof navigateSchema>): Promise<
|
|
|
14
16
|
}[];
|
|
15
17
|
}>;
|
|
16
18
|
export declare const reloadSchema: z.ZodObject<{
|
|
17
|
-
waitUntil: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
waitUntil: z.ZodDefault<z.ZodOptional<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
waitUntil: "domcontentloaded" | "load" | "networkidle";
|
|
22
|
+
}, {
|
|
23
|
+
waitUntil?: "domcontentloaded" | "load" | "networkidle" | undefined;
|
|
24
|
+
}>;
|
|
23
25
|
export declare function reload(args: z.infer<typeof reloadSchema>): Promise<{
|
|
24
26
|
content: {
|
|
25
27
|
type: "text";
|
|
26
28
|
text: string;
|
|
27
29
|
}[];
|
|
28
30
|
}>;
|
|
29
|
-
export declare const goBackSchema: z.ZodObject<{}, z.
|
|
31
|
+
export declare const goBackSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
30
32
|
export declare function goBack(): Promise<{
|
|
31
33
|
content: {
|
|
32
34
|
type: "text";
|
|
33
35
|
text: string;
|
|
34
36
|
}[];
|
|
35
37
|
}>;
|
|
36
|
-
export declare const goForwardSchema: z.ZodObject<{}, z.
|
|
38
|
+
export declare const goForwardSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
37
39
|
export declare function goForward(): Promise<{
|
|
38
40
|
content: {
|
|
39
41
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;;EAOzB,CAAC;AAEH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC;;;;;GAkClE;AAED,eAAO,MAAM,YAAY;;;;;;EAMvB,CAAC;AAEH,wBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC;;;;;GA2B9D;AAED,eAAO,MAAM,YAAY,gDAAe,CAAC;AAEzC,wBAAsB,MAAM;;;;;GAsC3B;AAED,eAAO,MAAM,eAAe,gDAAe,CAAC;AAE5C,wBAAsB,SAAS;;;;;GAsC9B"}
|
package/build/tools/network.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const getNetworkRequestsSchema: z.ZodObject<{
|
|
3
3
|
urlPattern: z.ZodOptional<z.ZodString>;
|
|
4
|
-
methods: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
-
statusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
4
|
+
methods: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
|
+
statusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
6
6
|
failed: z.ZodOptional<z.ZodBoolean>;
|
|
7
7
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
-
}, z.
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
limit: number;
|
|
10
|
+
urlPattern?: string | undefined;
|
|
11
|
+
methods?: string[] | undefined;
|
|
12
|
+
statusCodes?: number[] | undefined;
|
|
13
|
+
failed?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
urlPattern?: string | undefined;
|
|
16
|
+
methods?: string[] | undefined;
|
|
17
|
+
statusCodes?: number[] | undefined;
|
|
18
|
+
limit?: number | undefined;
|
|
19
|
+
failed?: boolean | undefined;
|
|
20
|
+
}>;
|
|
9
21
|
export declare function getNetworkRequests(args: z.infer<typeof getNetworkRequestsSchema>): Promise<{
|
|
10
22
|
content: {
|
|
11
23
|
type: "text";
|
|
@@ -15,14 +27,20 @@ export declare function getNetworkRequests(args: z.infer<typeof getNetworkReques
|
|
|
15
27
|
export declare const getResponseBodySchema: z.ZodObject<{
|
|
16
28
|
urlPattern: z.ZodString;
|
|
17
29
|
index: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
18
|
-
}, z.
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
urlPattern: string;
|
|
32
|
+
index: number;
|
|
33
|
+
}, {
|
|
34
|
+
urlPattern: string;
|
|
35
|
+
index?: number | undefined;
|
|
36
|
+
}>;
|
|
19
37
|
export declare function getResponseBody(args: z.infer<typeof getResponseBodySchema>): Promise<{
|
|
20
38
|
content: {
|
|
21
39
|
type: "text";
|
|
22
40
|
text: string;
|
|
23
41
|
}[];
|
|
24
42
|
}>;
|
|
25
|
-
export declare const clearNetworkSchema: z.ZodObject<{}, z.
|
|
43
|
+
export declare const clearNetworkSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
26
44
|
export declare function clearNetwork(): Promise<{
|
|
27
45
|
content: {
|
|
28
46
|
type: "text";
|
|
@@ -31,7 +49,11 @@ export declare function clearNetwork(): Promise<{
|
|
|
31
49
|
}>;
|
|
32
50
|
export declare const waitForNetworkIdleSchema: z.ZodObject<{
|
|
33
51
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
34
|
-
}, z.
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
timeout: number;
|
|
54
|
+
}, {
|
|
55
|
+
timeout?: number | undefined;
|
|
56
|
+
}>;
|
|
35
57
|
export declare function waitForNetworkIdle(args: z.infer<typeof waitForNetworkIdleSchema>): Promise<{
|
|
36
58
|
content: {
|
|
37
59
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/tools/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/tools/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAsBnC,CAAC;AAEH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC;;;;;GAqCtF;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;EAOhC,CAAC;AAEH,wBAAsB,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC;;;;;GA4DhF;AAED,eAAO,MAAM,kBAAkB,gDAAe,CAAC;AAE/C,wBAAsB,YAAY;;;;;GAWjC;AAED,eAAO,MAAM,wBAAwB;;;;;;EAMnC,CAAC;AAEH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC;;;;;GAwBtF"}
|
package/build/tools/qa.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const getPageStateSchema: z.ZodObject<{}, z.
|
|
2
|
+
export declare const getPageStateSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
3
3
|
export declare function getPageState(): Promise<{
|
|
4
4
|
content: {
|
|
5
5
|
type: "text";
|
|
@@ -8,8 +8,14 @@ export declare function getPageState(): Promise<{
|
|
|
8
8
|
}>;
|
|
9
9
|
export declare const verifyNoErrorsSchema: z.ZodObject<{
|
|
10
10
|
since: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
ignorePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
-
}, z.
|
|
11
|
+
ignorePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
since?: number | undefined;
|
|
14
|
+
ignorePatterns?: string[] | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
since?: number | undefined;
|
|
17
|
+
ignorePatterns?: string[] | undefined;
|
|
18
|
+
}>;
|
|
13
19
|
export declare function verifyNoErrors(args: z.infer<typeof verifyNoErrorsSchema>): Promise<{
|
|
14
20
|
content: {
|
|
15
21
|
type: "text";
|
|
@@ -18,18 +24,35 @@ export declare function verifyNoErrors(args: z.infer<typeof verifyNoErrorsSchema
|
|
|
18
24
|
}>;
|
|
19
25
|
export declare const verifyElementSchema: z.ZodObject<{
|
|
20
26
|
selector: z.ZodString;
|
|
21
|
-
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
22
|
-
visible: "visible";
|
|
23
|
-
hidden: "hidden";
|
|
24
|
-
exists: "exists";
|
|
25
|
-
"not-exists": "not-exists";
|
|
26
|
-
}>>>;
|
|
27
|
+
state: z.ZodDefault<z.ZodOptional<z.ZodEnum<["visible", "hidden", "exists", "not-exists"]>>>;
|
|
27
28
|
text: z.ZodOptional<z.ZodString>;
|
|
28
29
|
attribute: z.ZodOptional<z.ZodObject<{
|
|
29
30
|
name: z.ZodString;
|
|
30
31
|
value: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, z.
|
|
32
|
-
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
name: string;
|
|
34
|
+
value?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
name: string;
|
|
37
|
+
value?: string | undefined;
|
|
38
|
+
}>>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
selector: string;
|
|
41
|
+
state: "visible" | "hidden" | "exists" | "not-exists";
|
|
42
|
+
text?: string | undefined;
|
|
43
|
+
attribute?: {
|
|
44
|
+
name: string;
|
|
45
|
+
value?: string | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
}, {
|
|
48
|
+
selector: string;
|
|
49
|
+
text?: string | undefined;
|
|
50
|
+
state?: "visible" | "hidden" | "exists" | "not-exists" | undefined;
|
|
51
|
+
attribute?: {
|
|
52
|
+
name: string;
|
|
53
|
+
value?: string | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
}>;
|
|
33
56
|
export declare function verifyElement(args: z.infer<typeof verifyElementSchema>): Promise<{
|
|
34
57
|
content: {
|
|
35
58
|
type: "text";
|
|
@@ -39,7 +62,13 @@ export declare function verifyElement(args: z.infer<typeof verifyElementSchema>)
|
|
|
39
62
|
export declare const verifyRequestSucceededSchema: z.ZodObject<{
|
|
40
63
|
urlPattern: z.ZodString;
|
|
41
64
|
expectedStatus: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
42
|
-
}, z.
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
urlPattern: string;
|
|
67
|
+
expectedStatus: number;
|
|
68
|
+
}, {
|
|
69
|
+
urlPattern: string;
|
|
70
|
+
expectedStatus?: number | undefined;
|
|
71
|
+
}>;
|
|
43
72
|
export declare function verifyRequestSucceeded(args: z.infer<typeof verifyRequestSucceededSchema>): Promise<{
|
|
44
73
|
content: {
|
|
45
74
|
type: "text";
|
|
@@ -49,7 +78,13 @@ export declare function verifyRequestSucceeded(args: z.infer<typeof verifyReques
|
|
|
49
78
|
export declare const verifyTextOnPageSchema: z.ZodObject<{
|
|
50
79
|
text: z.ZodString;
|
|
51
80
|
exact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
52
|
-
}, z.
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
exact: boolean;
|
|
83
|
+
text: string;
|
|
84
|
+
}, {
|
|
85
|
+
text: string;
|
|
86
|
+
exact?: boolean | undefined;
|
|
87
|
+
}>;
|
|
53
88
|
export declare function verifyTextOnPage(args: z.infer<typeof verifyTextOnPageSchema>): Promise<{
|
|
54
89
|
content: {
|
|
55
90
|
type: "text";
|
package/build/tools/qa.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../src/tools/qa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"qa.d.ts","sourceRoot":"","sources":["../../src/tools/qa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,gDAAe,CAAC;AAE/C,wBAAsB,YAAY;;;;;GA+CjC;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;AAEH,wBAAsB,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC;;;;;GAmC9E;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB9B,CAAC;AAEH,wBAAsB,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC;;;;;GA4F5E;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;EAOvC,CAAC;AAEH,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC;;;;;GAyC9F;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;EAOjC,CAAC;AAEH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC;;;;;GA+BlF"}
|
package/build/tools/visual.d.ts
CHANGED
|
@@ -3,7 +3,15 @@ export declare const screenshotSchema: z.ZodObject<{
|
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
fullPage: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
5
5
|
selector: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, z.
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
name: string;
|
|
8
|
+
fullPage: boolean;
|
|
9
|
+
selector?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
name: string;
|
|
12
|
+
selector?: string | undefined;
|
|
13
|
+
fullPage?: boolean | undefined;
|
|
14
|
+
}>;
|
|
7
15
|
export declare function screenshot(args: z.infer<typeof screenshotSchema>): Promise<{
|
|
8
16
|
content: ({
|
|
9
17
|
type: "image";
|
|
@@ -21,7 +29,15 @@ export declare const visualDiffSchema: z.ZodObject<{
|
|
|
21
29
|
baseline: z.ZodString;
|
|
22
30
|
current: z.ZodString;
|
|
23
31
|
threshold: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
24
|
-
}, z.
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
baseline: string;
|
|
34
|
+
current: string;
|
|
35
|
+
threshold: number;
|
|
36
|
+
}, {
|
|
37
|
+
baseline: string;
|
|
38
|
+
current: string;
|
|
39
|
+
threshold?: number | undefined;
|
|
40
|
+
}>;
|
|
25
41
|
export declare function visualDiff(args: z.infer<typeof visualDiffSchema>): Promise<{
|
|
26
42
|
content: ({
|
|
27
43
|
type: "image";
|
|
@@ -35,7 +51,7 @@ export declare function visualDiff(args: z.infer<typeof visualDiffSchema>): Prom
|
|
|
35
51
|
mimeType?: undefined;
|
|
36
52
|
})[];
|
|
37
53
|
}>;
|
|
38
|
-
export declare const listScreenshotsSchema: z.ZodObject<{}, z.
|
|
54
|
+
export declare const listScreenshotsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
39
55
|
export declare function listScreenshots(): Promise<{
|
|
40
56
|
content: {
|
|
41
57
|
type: "text";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual.d.ts","sourceRoot":"","sources":["../../src/tools/visual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"visual.d.ts","sourceRoot":"","sources":["../../src/tools/visual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAW3B,CAAC;AAEH,wBAAsB,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;GA0CtE;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAQ3B,CAAC;AAEH,wBAAsB,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC;;;;;;;;;;;;GAwFtE;AAED,eAAO,MAAM,qBAAqB,gDAAe,CAAC;AAElD,wBAAsB,eAAe;;;;;GAsBpC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-eyes",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "MCP server that gives Claude Code eyes for frontend development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"pixelmatch": "^7.1.0",
|
|
45
45
|
"playwright": "^1.57.0",
|
|
46
46
|
"sharp": "^0.34.5",
|
|
47
|
-
"zod": "^
|
|
47
|
+
"zod": "^3.25.76",
|
|
48
48
|
"zod-to-json-schema": "^3.25.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|