playwriter 0.0.89 → 0.0.103
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/aria-snapshot.d.ts +7 -3
- package/dist/aria-snapshot.d.ts.map +1 -1
- package/dist/aria-snapshot.js +76 -18
- package/dist/aria-snapshot.js.map +1 -1
- package/dist/aria-snapshot.test.js +94 -0
- package/dist/aria-snapshot.test.js.map +1 -1
- package/dist/bippy.js +1 -1
- package/dist/browser-config.d.ts +12 -1
- package/dist/browser-config.d.ts.map +1 -1
- package/dist/browser-config.js +101 -38
- package/dist/browser-config.js.map +1 -1
- package/dist/browser-launch.d.ts +17 -0
- package/dist/browser-launch.d.ts.map +1 -0
- package/dist/browser-launch.js +44 -0
- package/dist/browser-launch.js.map +1 -0
- package/dist/cdp-relay.d.ts.map +1 -1
- package/dist/cdp-relay.js +34 -10
- package/dist/cdp-relay.js.map +1 -1
- package/dist/channel-owner-inspect.test.d.ts +2 -0
- package/dist/channel-owner-inspect.test.d.ts.map +1 -0
- package/dist/channel-owner-inspect.test.js +75 -0
- package/dist/channel-owner-inspect.test.js.map +1 -0
- package/dist/chrome-discovery.d.ts +65 -0
- package/dist/chrome-discovery.d.ts.map +1 -0
- package/dist/chrome-discovery.js +165 -0
- package/dist/chrome-discovery.js.map +1 -0
- package/dist/chrome-discovery.test.d.ts +2 -0
- package/dist/chrome-discovery.test.d.ts.map +1 -0
- package/dist/chrome-discovery.test.js +41 -0
- package/dist/chrome-discovery.test.js.map +1 -0
- package/dist/cli.js +357 -53
- package/dist/cli.js.map +1 -1
- package/dist/executor.d.ts +44 -11
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.js +121 -55
- package/dist/executor.js.map +1 -1
- package/dist/executor.unit.test.js +29 -1
- package/dist/executor.unit.test.js.map +1 -1
- package/dist/extension/background.js +1704 -0
- package/dist/extension/icons/SolarCursorSquareBold.png +0 -0
- package/dist/extension/icons/icon-black-128.png +0 -0
- package/dist/extension/icons/icon-black-16.png +0 -0
- package/dist/extension/icons/icon-black-32.png +0 -0
- package/dist/extension/icons/icon-black-48.png +0 -0
- package/dist/extension/icons/icon-gray-128.png +0 -0
- package/dist/extension/icons/icon-gray-16.png +0 -0
- package/dist/extension/icons/icon-gray-32.png +0 -0
- package/dist/extension/icons/icon-gray-48.png +0 -0
- package/dist/extension/icons/icon-green-128.png +0 -0
- package/dist/extension/icons/icon-green-16.png +0 -0
- package/dist/extension/icons/icon-green-32.png +0 -0
- package/dist/extension/icons/icon-green-48.png +0 -0
- package/dist/extension/icons/playwriter-icon-black.png +0 -0
- package/dist/extension/icons/playwriter-icon-gray-disabled.png +0 -0
- package/dist/extension/icons/playwriter-icon-gray-disabled.svg +1 -0
- package/dist/extension/manifest.json +40 -0
- package/dist/extension/offscreen.js +214 -0
- package/dist/extension/src/offscreen.html +9 -0
- package/dist/extension/src/prism-bash.min.js +1 -0
- package/dist/extension/src/prism.min.js +1 -0
- package/dist/extension/src/welcome.html +399 -0
- package/dist/kitty-graphics.d.ts +22 -0
- package/dist/kitty-graphics.d.ts.map +1 -0
- package/dist/kitty-graphics.js +71 -0
- package/dist/kitty-graphics.js.map +1 -0
- package/dist/kitty-graphics.test.d.ts +2 -0
- package/dist/kitty-graphics.test.d.ts.map +1 -0
- package/dist/kitty-graphics.test.js +125 -0
- package/dist/kitty-graphics.test.js.map +1 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +76 -12
- package/dist/mcp.js.map +1 -1
- package/dist/package-paths.d.ts +3 -0
- package/dist/package-paths.d.ts.map +1 -0
- package/dist/package-paths.js +29 -0
- package/dist/package-paths.js.map +1 -0
- package/dist/prompt.md +4 -2
- package/dist/readability.js +1 -1
- package/dist/relay-core.test.js +14 -4
- package/dist/relay-core.test.js.map +1 -1
- package/dist/relay-navigation.test.d.ts.map +1 -1
- package/dist/relay-navigation.test.js +95 -1
- package/dist/relay-navigation.test.js.map +1 -1
- package/dist/scoped-fs.d.ts +5 -4
- package/dist/scoped-fs.d.ts.map +1 -1
- package/dist/scoped-fs.js +11 -9
- package/dist/scoped-fs.js.map +1 -1
- package/dist/scoped-fs.test.d.ts +5 -0
- package/dist/scoped-fs.test.d.ts.map +1 -0
- package/dist/scoped-fs.test.js +70 -0
- package/dist/scoped-fs.test.js.map +1 -0
- package/dist/screen-recording.d.ts +3 -6
- package/dist/screen-recording.d.ts.map +1 -1
- package/dist/screen-recording.js +7 -21
- package/dist/screen-recording.js.map +1 -1
- package/dist/selector-generator.js +1 -1
- package/dist/snapshot-tools.test.js +3 -4
- package/dist/snapshot-tools.test.js.map +1 -1
- package/dist/test-utils.d.ts +3 -1
- package/dist/test-utils.d.ts.map +1 -1
- package/dist/test-utils.js +24 -12
- package/dist/test-utils.js.map +1 -1
- package/package.json +6 -5
- package/src/aria-snapshot.test.ts +110 -0
- package/src/aria-snapshot.ts +86 -19
- package/src/aria-snapshots/contenteditable-interactive.txt +7 -0
- package/src/aria-snapshots/contenteditable-raw.txt +14 -0
- package/src/aria-snapshots/github-interactive.txt +0 -2
- package/src/aria-snapshots/github-raw.txt +0 -4
- package/src/aria-snapshots/hackernews-interactive.txt +240 -237
- package/src/aria-snapshots/hackernews-raw.txt +262 -258
- package/src/aria-snapshots/prosemirror-interactive.txt +63 -0
- package/src/aria-snapshots/prosemirror-raw.txt +141 -0
- package/src/assets/aria-labels-hacker-news.png +0 -0
- package/src/browser-config.ts +143 -37
- package/src/browser-launch.ts +75 -0
- package/src/cdp-relay.ts +46 -11
- package/src/channel-owner-inspect.test.ts +94 -0
- package/src/chrome-discovery.test.ts +50 -0
- package/src/chrome-discovery.ts +211 -0
- package/src/cli.ts +432 -59
- package/src/executor.ts +171 -72
- package/src/executor.unit.test.ts +32 -1
- package/src/kitty-graphics.test.ts +139 -0
- package/src/kitty-graphics.ts +79 -0
- package/src/mcp.ts +82 -12
- package/src/package-paths.ts +36 -0
- package/src/relay-core.test.ts +14 -4
- package/src/relay-navigation.test.ts +106 -1
- package/src/scoped-fs.test.ts +77 -0
- package/src/scoped-fs.ts +12 -9
- package/src/screen-recording.ts +7 -22
- package/src/skill.md +32 -2
- package/src/snapshot-tools.test.ts +3 -4
- package/src/snapshots/shadcn-ui-accessibility-full.md +181 -183
- package/src/snapshots/shadcn-ui-accessibility-interactive.md +119 -121
- package/src/test-utils.ts +25 -11
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Welcome to Playwriter</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--color-bg: #ffffff;
|
|
10
|
+
--color-text: #262626;
|
|
11
|
+
--color-heading: #171717;
|
|
12
|
+
--color-border: #d4d4d4;
|
|
13
|
+
--color-code-bg: transparent;
|
|
14
|
+
--color-link: #0969da;
|
|
15
|
+
--color-link-hover: #0550ae;
|
|
16
|
+
--color-success: #16a34a;
|
|
17
|
+
--color-muted: #737373;
|
|
18
|
+
--max-width: 640px;
|
|
19
|
+
--spacing: 1.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (prefers-color-scheme: dark) {
|
|
23
|
+
:root {
|
|
24
|
+
--color-bg: #0a0a0a;
|
|
25
|
+
--color-text: #e5e5e5;
|
|
26
|
+
--color-heading: #fafafa;
|
|
27
|
+
--color-border: #404040;
|
|
28
|
+
--color-code-bg: transparent;
|
|
29
|
+
--color-link: #4493f8;
|
|
30
|
+
--color-link-hover: #539bf5;
|
|
31
|
+
--color-success: #22c55e;
|
|
32
|
+
--color-muted: #a3a3a3;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
* {
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body {
|
|
43
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
line-height: 1.6;
|
|
46
|
+
color: var(--color-text);
|
|
47
|
+
background-color: var(--color-bg);
|
|
48
|
+
padding: 2rem 1rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
main {
|
|
52
|
+
max-width: var(--max-width);
|
|
53
|
+
margin: 0 auto;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
h2 {
|
|
57
|
+
font-size: 1.75rem;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
color: var(--color-heading);
|
|
60
|
+
margin-top: 2rem;
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
padding-bottom: 0.5rem;
|
|
63
|
+
border-bottom: 1px solid var(--color-border);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h3 {
|
|
67
|
+
font-size: 1.25rem;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
color: var(--color-heading);
|
|
70
|
+
margin-top: 1.5rem;
|
|
71
|
+
margin-bottom: 0.75rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
p {
|
|
75
|
+
margin-bottom: 1rem;
|
|
76
|
+
opacity: 0.8;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
a {
|
|
80
|
+
color: var(--color-link);
|
|
81
|
+
text-decoration: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
a:hover {
|
|
85
|
+
color: var(--color-link-hover);
|
|
86
|
+
text-decoration: underline;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
code {
|
|
90
|
+
font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
|
|
91
|
+
font-size: 0.875em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
pre {
|
|
95
|
+
background: transparent !important;
|
|
96
|
+
border: none !important;
|
|
97
|
+
padding: 0 !important;
|
|
98
|
+
margin-bottom: 1rem;
|
|
99
|
+
overflow: visible;
|
|
100
|
+
white-space: pre;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
pre code {
|
|
104
|
+
background: transparent !important;
|
|
105
|
+
padding: 0 !important;
|
|
106
|
+
font-size: 0.875rem;
|
|
107
|
+
white-space: pre;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
ol,
|
|
111
|
+
ul {
|
|
112
|
+
margin-bottom: 1rem;
|
|
113
|
+
padding-left: 2rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
li {
|
|
117
|
+
margin-bottom: 0.5rem;
|
|
118
|
+
opacity: 0.8;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
strong {
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
color: var(--color-heading);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.step-number {
|
|
127
|
+
color: var(--color-link);
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
font-size: 1.125rem;
|
|
130
|
+
margin-right: 0.75rem;
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
line-height: 1.6;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.step {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: flex-start;
|
|
138
|
+
margin-bottom: 1.5rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.step-content {
|
|
142
|
+
flex: 1;
|
|
143
|
+
min-width: 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
footer {
|
|
147
|
+
margin-top: 3rem;
|
|
148
|
+
padding-top: 2rem;
|
|
149
|
+
border-top: 1px solid var(--color-border);
|
|
150
|
+
text-align: center;
|
|
151
|
+
color: var(--color-muted);
|
|
152
|
+
font-size: 0.875rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Tomorrow (light) token colors */
|
|
156
|
+
code[class*='language-'],
|
|
157
|
+
pre[class*='language-'] {
|
|
158
|
+
color: #8959a8;
|
|
159
|
+
text-shadow: none;
|
|
160
|
+
}
|
|
161
|
+
.token.comment,
|
|
162
|
+
.token.block-comment,
|
|
163
|
+
.token.prolog,
|
|
164
|
+
.token.doctype,
|
|
165
|
+
.token.cdata {
|
|
166
|
+
color: #8e908c;
|
|
167
|
+
}
|
|
168
|
+
.token.punctuation {
|
|
169
|
+
color: #8959a8;
|
|
170
|
+
}
|
|
171
|
+
.token.tag,
|
|
172
|
+
.token.attr-name,
|
|
173
|
+
.token.namespace,
|
|
174
|
+
.token.deleted {
|
|
175
|
+
color: #c82829;
|
|
176
|
+
}
|
|
177
|
+
.token.function-name {
|
|
178
|
+
color: #4271ae;
|
|
179
|
+
}
|
|
180
|
+
.token.boolean,
|
|
181
|
+
.token.number,
|
|
182
|
+
.token.function {
|
|
183
|
+
color: #f5871f;
|
|
184
|
+
}
|
|
185
|
+
.token.property,
|
|
186
|
+
.token.class-name,
|
|
187
|
+
.token.constant,
|
|
188
|
+
.token.symbol {
|
|
189
|
+
color: #eab700;
|
|
190
|
+
}
|
|
191
|
+
.token.selector,
|
|
192
|
+
.token.important,
|
|
193
|
+
.token.atrule,
|
|
194
|
+
.token.keyword,
|
|
195
|
+
.token.builtin {
|
|
196
|
+
color: #8959a8;
|
|
197
|
+
}
|
|
198
|
+
.token.string,
|
|
199
|
+
.token.char,
|
|
200
|
+
.token.attr-value,
|
|
201
|
+
.token.regex,
|
|
202
|
+
.token.variable {
|
|
203
|
+
color: #718c00;
|
|
204
|
+
}
|
|
205
|
+
.token.operator,
|
|
206
|
+
.token.entity,
|
|
207
|
+
.token.url {
|
|
208
|
+
color: #3e999f;
|
|
209
|
+
}
|
|
210
|
+
.token.inserted {
|
|
211
|
+
color: #718c00;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Tomorrow Night (dark) token colors */
|
|
215
|
+
@media (prefers-color-scheme: dark) {
|
|
216
|
+
code[class*='language-'],
|
|
217
|
+
pre[class*='language-'] {
|
|
218
|
+
color: #b294bb;
|
|
219
|
+
}
|
|
220
|
+
.token.comment,
|
|
221
|
+
.token.block-comment,
|
|
222
|
+
.token.prolog,
|
|
223
|
+
.token.doctype,
|
|
224
|
+
.token.cdata {
|
|
225
|
+
color: #969896;
|
|
226
|
+
}
|
|
227
|
+
.token.punctuation {
|
|
228
|
+
color: #b294bb;
|
|
229
|
+
}
|
|
230
|
+
.token.tag,
|
|
231
|
+
.token.attr-name,
|
|
232
|
+
.token.namespace,
|
|
233
|
+
.token.deleted {
|
|
234
|
+
color: #cc6666;
|
|
235
|
+
}
|
|
236
|
+
.token.function-name {
|
|
237
|
+
color: #81a2be;
|
|
238
|
+
}
|
|
239
|
+
.token.boolean,
|
|
240
|
+
.token.number,
|
|
241
|
+
.token.function {
|
|
242
|
+
color: #de935f;
|
|
243
|
+
}
|
|
244
|
+
.token.property,
|
|
245
|
+
.token.class-name,
|
|
246
|
+
.token.constant,
|
|
247
|
+
.token.symbol {
|
|
248
|
+
color: #f0c674;
|
|
249
|
+
}
|
|
250
|
+
.token.selector,
|
|
251
|
+
.token.important,
|
|
252
|
+
.token.atrule,
|
|
253
|
+
.token.keyword,
|
|
254
|
+
.token.builtin {
|
|
255
|
+
color: #b294bb;
|
|
256
|
+
}
|
|
257
|
+
.token.string,
|
|
258
|
+
.token.char,
|
|
259
|
+
.token.attr-value,
|
|
260
|
+
.token.regex,
|
|
261
|
+
.token.variable {
|
|
262
|
+
color: #b5bd68;
|
|
263
|
+
}
|
|
264
|
+
.token.operator,
|
|
265
|
+
.token.entity,
|
|
266
|
+
.token.url {
|
|
267
|
+
color: #8abeb7;
|
|
268
|
+
}
|
|
269
|
+
.token.inserted {
|
|
270
|
+
color: #b5bd68;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
</style>
|
|
274
|
+
</head>
|
|
275
|
+
<body>
|
|
276
|
+
<main>
|
|
277
|
+
<section>
|
|
278
|
+
<h2>Getting Started with Playwriter</h2>
|
|
279
|
+
|
|
280
|
+
<p>Control your browser via Playwright API. Uses extension + CLI. No context bloat.</p>
|
|
281
|
+
|
|
282
|
+
<h3>Installation</h3>
|
|
283
|
+
|
|
284
|
+
<div class="step">
|
|
285
|
+
<span class="step-number">1</span>
|
|
286
|
+
<div class="step-content">
|
|
287
|
+
<strong>Pin the extension</strong>
|
|
288
|
+
<p>Click the puzzle icon in Chrome's toolbar, then pin Playwriter so it's always visible.</p>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div class="step">
|
|
293
|
+
<span class="step-number">2</span>
|
|
294
|
+
<div class="step-content">
|
|
295
|
+
<strong>Enable a tab</strong>
|
|
296
|
+
<p>Click the extension icon on a tab. It turns green when connected.</p>
|
|
297
|
+
</div>
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
<div class="step">
|
|
301
|
+
<span class="step-number">3</span>
|
|
302
|
+
<div class="step-content">
|
|
303
|
+
<strong>Install the CLI and run a command</strong>
|
|
304
|
+
<pre><code class="language-bash"># install the CLI globally
|
|
305
|
+
npm i -g playwriter
|
|
306
|
+
# navigate to a URL in the active tab
|
|
307
|
+
playwriter -s 1 -e "await page.goto('https://example.com')"</code></pre>
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
|
|
311
|
+
<div class="step">
|
|
312
|
+
<span class="step-number">4</span>
|
|
313
|
+
<div class="step-content">
|
|
314
|
+
<strong>Add the skill to your agent</strong>
|
|
315
|
+
<p>Install the Playwriter skill so your agent can call the CLI:</p>
|
|
316
|
+
<pre><code class="language-bash"># add playwriter skill to your coding agent
|
|
317
|
+
npx -y skills add remorses/playwriter</code></pre>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<h3>CLI Examples</h3>
|
|
322
|
+
|
|
323
|
+
<pre><code class="language-bash"># create a stateful sandbox, outputs session id (e.g. 1)
|
|
324
|
+
playwriter session new
|
|
325
|
+
# navigate to a URL
|
|
326
|
+
playwriter -s 1 -e "await page.goto('https://example.com')"
|
|
327
|
+
# get the accessibility tree of the page
|
|
328
|
+
playwriter -s 1 -e "console.log(await snapshot({ page }))"
|
|
329
|
+
# click an element by its accessibility reference
|
|
330
|
+
playwriter -s 1 -e "await page.locator('aria-ref=e5').click()"</code></pre>
|
|
331
|
+
</section>
|
|
332
|
+
|
|
333
|
+
<section>
|
|
334
|
+
<h2>How It Works</h2>
|
|
335
|
+
|
|
336
|
+
<ul>
|
|
337
|
+
<li><strong>No new Chrome instances:</strong> Works with your current browser session</li>
|
|
338
|
+
<li><strong>No CDP mode required:</strong> No need to restart Chrome with special flags</li>
|
|
339
|
+
<li><strong>Full CDP access:</strong> Complete Chrome DevTools Protocol capabilities</li>
|
|
340
|
+
<li><strong>Visual feedback:</strong> Extension icon changes color to indicate connection status</li>
|
|
341
|
+
</ul>
|
|
342
|
+
</section>
|
|
343
|
+
|
|
344
|
+
<section>
|
|
345
|
+
<h2>Icon States</h2>
|
|
346
|
+
|
|
347
|
+
<ul>
|
|
348
|
+
<li><strong>Gray:</strong> Not connected to any tab</li>
|
|
349
|
+
<li><strong>Green:</strong> Successfully connected and ready</li>
|
|
350
|
+
<li><strong>Orange badge (...):</strong> Connecting to relay server</li>
|
|
351
|
+
<li><strong>Red badge (!):</strong> Error occurred</li>
|
|
352
|
+
</ul>
|
|
353
|
+
</section>
|
|
354
|
+
|
|
355
|
+
<section>
|
|
356
|
+
<h2>Privacy & Security</h2>
|
|
357
|
+
|
|
358
|
+
<p>
|
|
359
|
+
Playwriter MCP runs locally in your browser and does not send any data to external servers. All browser
|
|
360
|
+
control happens through the standard Chrome DevTools Protocol on your machine.
|
|
361
|
+
</p>
|
|
362
|
+
</section>
|
|
363
|
+
|
|
364
|
+
<section>
|
|
365
|
+
<h2>MCP Setup (Optional)</h2>
|
|
366
|
+
|
|
367
|
+
<p>The CLI is the recommended way to use Playwriter. If you need MCP server setup, auto-configure it with:</p>
|
|
368
|
+
|
|
369
|
+
<pre><code class="language-bash"># auto-configure MCP server for your editor
|
|
370
|
+
npx -y @playwriter/install-mcp playwriter@latest</code></pre>
|
|
371
|
+
|
|
372
|
+
<p>
|
|
373
|
+
For full MCP instructions, see
|
|
374
|
+
<a href="https://github.com/remorses/playwriter/blob/main/MCP.md" target="_blank" rel="noopener noreferrer"
|
|
375
|
+
>MCP.md</a
|
|
376
|
+
>.
|
|
377
|
+
</p>
|
|
378
|
+
</section>
|
|
379
|
+
|
|
380
|
+
<section>
|
|
381
|
+
<h2>Need Help?</h2>
|
|
382
|
+
|
|
383
|
+
<p>
|
|
384
|
+
For issues, feature requests, or contributions, visit the
|
|
385
|
+
<a href="https://github.com/remorses/playwriter" target="_blank" rel="noopener noreferrer">
|
|
386
|
+
GitHub repository
|
|
387
|
+
</a>
|
|
388
|
+
.
|
|
389
|
+
</p>
|
|
390
|
+
</section>
|
|
391
|
+
|
|
392
|
+
<footer>
|
|
393
|
+
<p>Playwriter © Microsoft Corporation · Licensed under Apache-2.0</p>
|
|
394
|
+
</footer>
|
|
395
|
+
</main>
|
|
396
|
+
<script src="prism.min.js"></script>
|
|
397
|
+
<script src="prism-bash.min.js"></script>
|
|
398
|
+
</body>
|
|
399
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the current environment supports Kitty Graphics Protocol output.
|
|
3
|
+
* Returns true when AGENT_GRAPHICS=kitty is set (agent is intercepting stdout).
|
|
4
|
+
*/
|
|
5
|
+
export declare function canEmitKittyGraphics(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Emit a PNG image to stdout using the Kitty Graphics Protocol.
|
|
8
|
+
* The image is chunked per the spec (4096 bytes per chunk).
|
|
9
|
+
*
|
|
10
|
+
* Only call this when canEmitKittyGraphics() returns true.
|
|
11
|
+
*/
|
|
12
|
+
export declare function emitKittyImage({ base64 }: {
|
|
13
|
+
base64: string;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* Build the raw Kitty Graphics escape sequence string for a PNG image.
|
|
17
|
+
* Useful for testing without writing to stdout.
|
|
18
|
+
*/
|
|
19
|
+
export declare function buildKittySequence({ base64 }: {
|
|
20
|
+
base64: string;
|
|
21
|
+
}): string;
|
|
22
|
+
//# sourceMappingURL=kitty-graphics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kitty-graphics.d.ts","sourceRoot":"","sources":["../src/kitty-graphics.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAiBnE;AAaD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAezE"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Kitty Graphics Protocol emitter for CLI output.
|
|
2
|
+
// Emits base64-encoded PNG images as APC escape sequences so agents with
|
|
3
|
+
// kitty-graphics-agent (or compatible parsers) can extract and pass them
|
|
4
|
+
// to LLMs as media parts.
|
|
5
|
+
//
|
|
6
|
+
// Protocol format:
|
|
7
|
+
// \x1b_G<control_data>;<base64_payload>\x1b\\
|
|
8
|
+
//
|
|
9
|
+
// Only emits when AGENT_GRAPHICS env var contains 'kitty', signaling that
|
|
10
|
+
// an agent is intercepting stdout and can handle Kitty Graphics Protocol.
|
|
11
|
+
// See: https://github.com/remorses/kitty-graphics-agent
|
|
12
|
+
// Kitty spec recommends max 4096 bytes per chunk payload
|
|
13
|
+
const CHUNK_SIZE = 4096;
|
|
14
|
+
/**
|
|
15
|
+
* Check if the current environment supports Kitty Graphics Protocol output.
|
|
16
|
+
* Returns true when AGENT_GRAPHICS=kitty is set (agent is intercepting stdout).
|
|
17
|
+
*/
|
|
18
|
+
export function canEmitKittyGraphics() {
|
|
19
|
+
return process.env.AGENT_GRAPHICS?.includes('kitty') ?? false;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Emit a PNG image to stdout using the Kitty Graphics Protocol.
|
|
23
|
+
* The image is chunked per the spec (4096 bytes per chunk).
|
|
24
|
+
*
|
|
25
|
+
* Only call this when canEmitKittyGraphics() returns true.
|
|
26
|
+
*/
|
|
27
|
+
export function emitKittyImage({ base64 }) {
|
|
28
|
+
const chunks = splitIntoChunks(base64, CHUNK_SIZE);
|
|
29
|
+
if (chunks.length === 1) {
|
|
30
|
+
// Single chunk: no chunked transfer needed
|
|
31
|
+
process.stdout.write(`\x1b_Ga=T,f=100;${chunks[0]}\x1b\\`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// Multi-chunk: first chunk has full control data + m=1,
|
|
35
|
+
// continuation chunks have only m=1, last chunk has m=0
|
|
36
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
37
|
+
const isFirst = i === 0;
|
|
38
|
+
const isLast = i === chunks.length - 1;
|
|
39
|
+
const control = isFirst ? 'a=T,f=100,m=1' : isLast ? 'm=0' : 'm=1';
|
|
40
|
+
process.stdout.write(`\x1b_G${control};${chunks[i]}\x1b\\`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function splitIntoChunks(str, size) {
|
|
44
|
+
if (str.length <= size) {
|
|
45
|
+
return [str];
|
|
46
|
+
}
|
|
47
|
+
const chunks = [];
|
|
48
|
+
for (let i = 0; i < str.length; i += size) {
|
|
49
|
+
chunks.push(str.slice(i, i + size));
|
|
50
|
+
}
|
|
51
|
+
return chunks;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build the raw Kitty Graphics escape sequence string for a PNG image.
|
|
55
|
+
* Useful for testing without writing to stdout.
|
|
56
|
+
*/
|
|
57
|
+
export function buildKittySequence({ base64 }) {
|
|
58
|
+
const chunks = splitIntoChunks(base64, CHUNK_SIZE);
|
|
59
|
+
if (chunks.length === 1) {
|
|
60
|
+
return `\x1b_Ga=T,f=100;${chunks[0]}\x1b\\`;
|
|
61
|
+
}
|
|
62
|
+
const parts = [];
|
|
63
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
64
|
+
const isFirst = i === 0;
|
|
65
|
+
const isLast = i === chunks.length - 1;
|
|
66
|
+
const control = isFirst ? 'a=T,f=100,m=1' : isLast ? 'm=0' : 'm=1';
|
|
67
|
+
parts.push(`\x1b_G${control};${chunks[i]}\x1b\\`);
|
|
68
|
+
}
|
|
69
|
+
return parts.join('');
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=kitty-graphics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kitty-graphics.js","sourceRoot":"","sources":["../src/kitty-graphics.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,yEAAyE;AACzE,yEAAyE;AACzE,0BAA0B;AAC1B,EAAE;AACF,mBAAmB;AACnB,gDAAgD;AAChD,EAAE;AACF,0EAA0E;AAC1E,0EAA0E;AAC1E,wDAAwD;AAExD,yDAAyD;AACzD,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAA;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,EAAsB;IAC3D,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;IAElD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,2CAA2C;QAC3C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;QAC1D,OAAM;IACR,CAAC;IAED,wDAAwD;IACxD,wDAAwD;IACxD,KAAK,IAAI,CAAC,GAAG,C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,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,CAAA;QACvB,MAAM,MAAM,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,GAAG,CAAC,CAAA;QACtC,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;QAClE,KAAK,CAAC,IAAI,CAAC,SAAS,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAA;IACnD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kitty-graphics.test.d.ts","sourceRoot":"","sources":["../src/kitty-graphics.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { buildKittySequence, canEmitKittyGraphics } from './kitty-graphics.js';
|
|
3
|
+
// Minimal valid PNG (1x1 transparent pixel) as base64
|
|
4
|
+
const TINY_PNG_B64 = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==';
|
|
5
|
+
describe('kitty-graphics', () => {
|
|
6
|
+
describe('canEmitKittyGraphics', () => {
|
|
7
|
+
test('returns false when AGENT_GRAPHICS is not set', () => {
|
|
8
|
+
const prev = process.env.AGENT_GRAPHICS;
|
|
9
|
+
delete process.env.AGENT_GRAPHICS;
|
|
10
|
+
expect(canEmitKittyGraphics()).toBe(false);
|
|
11
|
+
if (prev !== undefined) {
|
|
12
|
+
process.env.AGENT_GRAPHICS = prev;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
test('returns true when AGENT_GRAPHICS=kitty', () => {
|
|
16
|
+
const prev = process.env.AGENT_GRAPHICS;
|
|
17
|
+
process.env.AGENT_GRAPHICS = 'kitty';
|
|
18
|
+
expect(canEmitKittyGraphics()).toBe(true);
|
|
19
|
+
if (prev !== undefined) {
|
|
20
|
+
process.env.AGENT_GRAPHICS = prev;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
delete process.env.AGENT_GRAPHICS;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
test('returns true when AGENT_GRAPHICS contains kitty among others', () => {
|
|
27
|
+
const prev = process.env.AGENT_GRAPHICS;
|
|
28
|
+
process.env.AGENT_GRAPHICS = 'kitty,iterm2';
|
|
29
|
+
expect(canEmitKittyGraphics()).toBe(true);
|
|
30
|
+
if (prev !== undefined) {
|
|
31
|
+
process.env.AGENT_GRAPHICS = prev;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
delete process.env.AGENT_GRAPHICS;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
describe('buildKittySequence', () => {
|
|
39
|
+
test('small payload produces single escape sequence', () => {
|
|
40
|
+
const result = buildKittySequence({ base64: 'AAAA' });
|
|
41
|
+
expect(result).toMatchInlineSnapshot(`"_Ga=T,f=100;AAAA\\"`);
|
|
42
|
+
});
|
|
43
|
+
test('sequence starts with APC and ends with ST', () => {
|
|
44
|
+
const result = buildKittySequence({ base64: 'AAAA' });
|
|
45
|
+
expect(result.startsWith('\x1b_G')).toBe(true);
|
|
46
|
+
expect(result.endsWith('\x1b\\')).toBe(true);
|
|
47
|
+
});
|
|
48
|
+
test('real PNG base64 produces valid sequence', () => {
|
|
49
|
+
const result = buildKittySequence({ base64: TINY_PNG_B64 });
|
|
50
|
+
// Should be a single chunk (small payload)
|
|
51
|
+
expect(result).toContain('a=T,f=100');
|
|
52
|
+
expect(result).toContain(TINY_PNG_B64);
|
|
53
|
+
});
|
|
54
|
+
test('large payload is chunked at 4096 bytes', () => {
|
|
55
|
+
// Create a payload larger than 4096 bytes
|
|
56
|
+
const bigPayload = 'A'.repeat(10000);
|
|
57
|
+
const result = buildKittySequence({ base64: bigPayload });
|
|
58
|
+
// Should have multiple escape sequences
|
|
59
|
+
// First chunk: a=T,f=100,m=1
|
|
60
|
+
expect(result).toContain('a=T,f=100,m=1');
|
|
61
|
+
// Last chunk: m=0
|
|
62
|
+
expect(result).toContain('\x1b_Gm=0;');
|
|
63
|
+
// Should NOT contain single-shot a=T,f=100; (without m=)
|
|
64
|
+
expect(result).not.toMatch(/a=T,f=100;/);
|
|
65
|
+
});
|
|
66
|
+
test('three-chunk payload has correct structure', () => {
|
|
67
|
+
// 9000 bytes = 3 chunks: 4096 + 4096 + 808
|
|
68
|
+
const payload = 'B'.repeat(9000);
|
|
69
|
+
const result = buildKittySequence({ base64: payload });
|
|
70
|
+
const sequences = result.split('\x1b\\').filter(Boolean);
|
|
71
|
+
expect(sequences.length).toBe(3);
|
|
72
|
+
// First: a=T,f=100,m=1
|
|
73
|
+
expect(sequences[0]).toContain('a=T,f=100,m=1');
|
|
74
|
+
// Middle: m=1
|
|
75
|
+
expect(sequences[1]).toContain('\x1b_Gm=1;');
|
|
76
|
+
// Last: m=0
|
|
77
|
+
expect(sequences[2]).toContain('\x1b_Gm=0;');
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('round-trip with kitty-graphics-agent parser', () => {
|
|
81
|
+
test('emitted sequence can be parsed back to extract the image', async () => {
|
|
82
|
+
// Dynamically import the parser to test round-trip
|
|
83
|
+
let extractKittyGraphics;
|
|
84
|
+
try {
|
|
85
|
+
const mod = await import('kitty-graphics-agent/parser');
|
|
86
|
+
extractKittyGraphics = mod.extractKittyGraphics;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// kitty-graphics-agent not installed, skip
|
|
90
|
+
console.log('kitty-graphics-agent not installed, skipping round-trip test');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const sequence = buildKittySequence({ base64: TINY_PNG_B64 });
|
|
94
|
+
const output = `some text before\n${sequence}\nsome text after`;
|
|
95
|
+
const result = extractKittyGraphics(output);
|
|
96
|
+
expect(result.cleanedOutput).toMatchInlineSnapshot(`
|
|
97
|
+
"some text before
|
|
98
|
+
|
|
99
|
+
some text after"
|
|
100
|
+
`);
|
|
101
|
+
expect(result.images.length).toBe(1);
|
|
102
|
+
expect(result.images[0].mime).toBe('image/png');
|
|
103
|
+
expect(result.images[0].data).toBe(TINY_PNG_B64);
|
|
104
|
+
});
|
|
105
|
+
test('chunked sequence round-trips correctly', async () => {
|
|
106
|
+
let extractKittyGraphics;
|
|
107
|
+
try {
|
|
108
|
+
const mod = await import('kitty-graphics-agent/parser');
|
|
109
|
+
extractKittyGraphics = mod.extractKittyGraphics;
|
|
110
|
+
}
|
|
111
|
+
catch {
|
|
112
|
+
console.log('kitty-graphics-agent not installed, skipping round-trip test');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const bigPayload = 'A'.repeat(10000);
|
|
116
|
+
const sequence = buildKittySequence({ base64: bigPayload });
|
|
117
|
+
const result = extractKittyGraphics(sequence);
|
|
118
|
+
expect(result.cleanedOutput).toBe('');
|
|
119
|
+
expect(result.images.length).toBe(1);
|
|
120
|
+
expect(result.images[0].mime).toBe('image/png');
|
|
121
|
+
expect(result.images[0].data).toBe(bigPayload);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
//# sourceMappingURL=kitty-graphics.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kitty-graphics.test.js","sourceRoot":"","sources":["../src/kitty-graphics.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE9E,sDAAsD;AACtD,MAAM,YAAY,GAChB,kG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AAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;YAC3D,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAA;YAE7C,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACrC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YACpC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YAC/C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAChD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../src/mcp.ts"],"names":[],"mappings":"AA2VA,wBAAsB,QAAQ,CAAC,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,iBAuB7E"}
|