agent-canvas 0.9.0-dev.7 → 0.9.0-dev.8
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 +10 -0
- package/bin/lib/commands/review-remote.ts +186 -0
- package/bin/lib/commands/review.ts +88 -25
- package/bin/lib/instructions/app-review.md +31 -0
- package/daemon/build.ts +2 -0
- package/daemon/dist/review.js +3 -3
- package/daemon/review-widget/client.ts +16 -1
- package/daemon/review-widget/index.tsx +69 -11
- package/daemon/review-widget/remote-client.ts +117 -0
- package/daemon/review-widget/widget.tsx +3 -9
- package/daemon/src/review/model.ts +0 -5
- package/daemon/src/review/remote.ts +112 -0
- package/daemon/src/review/sealing.ts +35 -0
- package/daemon/src/review/server.ts +2 -1
- package/daemon/src/review/store.ts +16 -35
- package/daemon/src/review/threads.ts +63 -0
- package/package.json +23 -6
- package/skills/canvas/SKILL.md +2 -1
- package/types/bin/agent-canvas.d.ts +2 -0
- package/types/bin/lib/commands/daemon.d.ts +1 -0
- package/types/bin/lib/commands/exec.d.ts +7 -0
- package/types/bin/lib/commands/fetch.d.ts +1 -0
- package/types/bin/lib/commands/install.d.ts +1 -0
- package/types/bin/lib/commands/instructions.d.ts +1 -0
- package/types/bin/lib/commands/push.d.ts +1 -0
- package/types/bin/lib/commands/review-remote.d.ts +52 -0
- package/types/bin/lib/commands/review.d.ts +1 -0
- package/types/bin/lib/commands/watch.d.ts +1 -0
- package/types/bin/lib/config.d.ts +9 -0
- package/types/bin/lib/daemon-lifecycle.d.ts +4 -0
- package/types/bin/lib/helpers.d.ts +13 -0
- package/types/daemon/build.d.ts +1 -0
- package/types/daemon/client/App.d.ts +1 -0
- package/types/daemon/client/CompareView.d.ts +17 -0
- package/types/daemon/client/FileBrowser.d.ts +4 -0
- package/types/daemon/client/FileViewer.d.ts +6 -0
- package/types/daemon/client/OverviewView.d.ts +18 -0
- package/types/daemon/client/ReviewerIdentityDialog.d.ts +17 -0
- package/types/daemon/client/RevisionSelect.d.ts +10 -0
- package/types/daemon/client/SessionSwitcher.d.ts +6 -0
- package/types/daemon/client/ShareDialog.d.ts +30 -0
- package/types/daemon/client/apiSchemas.d.ts +1311 -0
- package/types/daemon/client/canvas-runtime.d.ts +1 -0
- package/types/daemon/client/clientApi.d.ts +112 -0
- package/types/daemon/client/components/SecretInput.d.ts +10 -0
- package/types/daemon/client/components/index.d.ts +2 -0
- package/types/daemon/client/domDiff.d.ts +37 -0
- package/types/daemon/client/errorMessage.d.ts +1 -0
- package/types/daemon/client/exportMarkdown.d.ts +1 -0
- package/types/daemon/client/lcs.d.ts +2 -0
- package/types/daemon/client/shareCrypto.d.ts +40 -0
- package/types/daemon/client/unifiedDiff.d.ts +26 -0
- package/types/daemon/langMap.d.ts +2 -0
- package/types/daemon/review-widget/anchor.d.ts +18 -0
- package/types/daemon/review-widget/browser.d.ts +6 -0
- package/types/daemon/review-widget/client.d.ts +38 -0
- package/types/daemon/review-widget/index.d.ts +1 -0
- package/types/daemon/review-widget/markup.d.ts +4 -0
- package/types/daemon/review-widget/remote-client.d.ts +29 -0
- package/types/daemon/review-widget/screenshot.d.ts +8 -0
- package/types/daemon/review-widget/source.d.ts +17 -0
- package/types/daemon/review-widget/style.d.ts +7 -0
- package/types/daemon/review-widget/widget.d.ts +7 -0
- package/types/daemon/src/components.d.ts +10 -0
- package/types/daemon/src/handlers/api.d.ts +11 -0
- package/types/daemon/src/handlers/files.d.ts +3 -0
- package/types/daemon/src/handlers/static.d.ts +2 -0
- package/types/daemon/src/handlers/uploads.d.ts +3 -0
- package/types/daemon/src/paths.d.ts +12 -0
- package/types/daemon/src/remote-feedback.d.ts +4 -0
- package/types/daemon/src/review/markdown.d.ts +3 -0
- package/types/daemon/src/review/model.d.ts +1089 -0
- package/types/daemon/src/review/proxy.d.ts +30 -0
- package/types/daemon/src/review/remote.d.ts +258 -0
- package/types/daemon/src/review/sealing.d.ts +11 -0
- package/types/daemon/src/review/server.d.ts +24 -0
- package/types/daemon/src/review/store.d.ts +34 -0
- package/types/daemon/src/review/threads.d.ts +35 -0
- package/types/daemon/src/server.d.ts +7 -0
- package/types/daemon/src/share.d.ts +98 -0
- package/types/daemon/src/stubFetch.d.ts +2 -0
|
@@ -0,0 +1,1089 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Review threads: comments a person leaves on a running application. A thread is a note until the person sends it
|
|
4
|
+
* to the agent; the agent picks it up, answers and may resolve it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const PROJECT_RE: RegExp;
|
|
7
|
+
/**
|
|
8
|
+
* Loopback origins only: a page on any other origin must not be able to put a request in front of the agent.
|
|
9
|
+
* The application under review runs on its own dev server, so its port is not the daemon's.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isLoopbackOrigin(origin: string): boolean;
|
|
12
|
+
export declare const MAX_HTML = 4000;
|
|
13
|
+
export declare const MAX_SOURCE_FILE = 1000;
|
|
14
|
+
export declare const MAX_STYLE = 1000;
|
|
15
|
+
/** A position in the application's source, resolved from a development stack through the page's source maps. */
|
|
16
|
+
export declare const reviewSourceSchema: z.ZodObject<{
|
|
17
|
+
/** What was created there, e.g. `<a> in ProductListCell` or `<ProductListCell> in DataGrid`. */
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
file: z.ZodString;
|
|
20
|
+
line: z.ZodNumber;
|
|
21
|
+
column: z.ZodNumber;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
label: string;
|
|
24
|
+
file: string;
|
|
25
|
+
line: number;
|
|
26
|
+
column: number;
|
|
27
|
+
}, {
|
|
28
|
+
label: string;
|
|
29
|
+
file: string;
|
|
30
|
+
line: number;
|
|
31
|
+
column: number;
|
|
32
|
+
}>;
|
|
33
|
+
export type ReviewSource = z.infer<typeof reviewSourceSchema>;
|
|
34
|
+
/** Where in the page a thread points. Every field is best effort; the agent reads them, the widget re-finds the element. */
|
|
35
|
+
export declare const reviewAnchorSchema: z.ZodObject<{
|
|
36
|
+
/** The page's URL when the thread was created, hash routes included. */
|
|
37
|
+
url: z.ZodString;
|
|
38
|
+
/** CSS path from the nearest element with an id, or from `body`. */
|
|
39
|
+
selector: z.ZodString;
|
|
40
|
+
/** ARIA role and accessible name, as the agent would target the element in a browser. */
|
|
41
|
+
role: z.ZodOptional<z.ZodString>;
|
|
42
|
+
name: z.ZodOptional<z.ZodString>;
|
|
43
|
+
/** The element's visible text, shortened. */
|
|
44
|
+
text: z.ZodOptional<z.ZodString>;
|
|
45
|
+
/** Owner components from the outermost to the element, read off React's development fibers. */
|
|
46
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
47
|
+
/** Source positions of the element and its nearest owner components, innermost first. */
|
|
48
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
+
/** What was created there, e.g. `<a> in ProductListCell` or `<ProductListCell> in DataGrid`. */
|
|
50
|
+
label: z.ZodString;
|
|
51
|
+
file: z.ZodString;
|
|
52
|
+
line: z.ZodNumber;
|
|
53
|
+
column: z.ZodNumber;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
label: string;
|
|
56
|
+
file: string;
|
|
57
|
+
line: number;
|
|
58
|
+
column: number;
|
|
59
|
+
}, {
|
|
60
|
+
label: string;
|
|
61
|
+
file: string;
|
|
62
|
+
line: number;
|
|
63
|
+
column: number;
|
|
64
|
+
}>, "many">>;
|
|
65
|
+
/** The landmarks around the element: page heading, section, dialog. */
|
|
66
|
+
context: z.ZodOptional<z.ZodString>;
|
|
67
|
+
/** The reviewer's browser and operating system, e.g. `Chrome 141 · Linux`, viewport and colour scheme. */
|
|
68
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
viewport: z.ZodObject<{
|
|
71
|
+
width: z.ZodNumber;
|
|
72
|
+
height: z.ZodNumber;
|
|
73
|
+
scale: z.ZodNumber;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
scale: number;
|
|
78
|
+
}, {
|
|
79
|
+
width: number;
|
|
80
|
+
height: number;
|
|
81
|
+
scale: number;
|
|
82
|
+
}>;
|
|
83
|
+
colorScheme: z.ZodEnum<["light", "dark"]>;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
name: string;
|
|
86
|
+
viewport: {
|
|
87
|
+
width: number;
|
|
88
|
+
height: number;
|
|
89
|
+
scale: number;
|
|
90
|
+
};
|
|
91
|
+
colorScheme: "light" | "dark";
|
|
92
|
+
}, {
|
|
93
|
+
name: string;
|
|
94
|
+
viewport: {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
scale: number;
|
|
98
|
+
};
|
|
99
|
+
colorScheme: "light" | "dark";
|
|
100
|
+
}>>;
|
|
101
|
+
/** The element's computed box, layout and type as CSS declarations, initial values left out. */
|
|
102
|
+
style: z.ZodOptional<z.ZodString>;
|
|
103
|
+
/** The element's markup, trimmed: deep subtrees, long lists and long texts are cut. */
|
|
104
|
+
html: z.ZodOptional<z.ZodString>;
|
|
105
|
+
/** A text selection inside the element, with its surroundings. */
|
|
106
|
+
quote: z.ZodOptional<z.ZodObject<{
|
|
107
|
+
exact: z.ZodString;
|
|
108
|
+
before: z.ZodString;
|
|
109
|
+
after: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
exact: string;
|
|
112
|
+
before: string;
|
|
113
|
+
after: string;
|
|
114
|
+
}, {
|
|
115
|
+
exact: string;
|
|
116
|
+
before: string;
|
|
117
|
+
after: string;
|
|
118
|
+
}>>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
url: string;
|
|
121
|
+
selector: string;
|
|
122
|
+
browser?: {
|
|
123
|
+
name: string;
|
|
124
|
+
viewport: {
|
|
125
|
+
width: number;
|
|
126
|
+
height: number;
|
|
127
|
+
scale: number;
|
|
128
|
+
};
|
|
129
|
+
colorScheme: "light" | "dark";
|
|
130
|
+
} | undefined;
|
|
131
|
+
name?: string | undefined;
|
|
132
|
+
role?: string | undefined;
|
|
133
|
+
text?: string | undefined;
|
|
134
|
+
components?: string[] | undefined;
|
|
135
|
+
sources?: {
|
|
136
|
+
label: string;
|
|
137
|
+
file: string;
|
|
138
|
+
line: number;
|
|
139
|
+
column: number;
|
|
140
|
+
}[] | undefined;
|
|
141
|
+
context?: string | undefined;
|
|
142
|
+
style?: string | undefined;
|
|
143
|
+
html?: string | undefined;
|
|
144
|
+
quote?: {
|
|
145
|
+
exact: string;
|
|
146
|
+
before: string;
|
|
147
|
+
after: string;
|
|
148
|
+
} | undefined;
|
|
149
|
+
}, {
|
|
150
|
+
url: string;
|
|
151
|
+
selector: string;
|
|
152
|
+
browser?: {
|
|
153
|
+
name: string;
|
|
154
|
+
viewport: {
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
scale: number;
|
|
158
|
+
};
|
|
159
|
+
colorScheme: "light" | "dark";
|
|
160
|
+
} | undefined;
|
|
161
|
+
name?: string | undefined;
|
|
162
|
+
role?: string | undefined;
|
|
163
|
+
text?: string | undefined;
|
|
164
|
+
components?: string[] | undefined;
|
|
165
|
+
sources?: {
|
|
166
|
+
label: string;
|
|
167
|
+
file: string;
|
|
168
|
+
line: number;
|
|
169
|
+
column: number;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
context?: string | undefined;
|
|
172
|
+
style?: string | undefined;
|
|
173
|
+
html?: string | undefined;
|
|
174
|
+
quote?: {
|
|
175
|
+
exact: string;
|
|
176
|
+
before: string;
|
|
177
|
+
after: string;
|
|
178
|
+
} | undefined;
|
|
179
|
+
}>;
|
|
180
|
+
export type ReviewAnchor = z.infer<typeof reviewAnchorSchema>;
|
|
181
|
+
export declare const reviewAuthorSchema: z.ZodEnum<["user", "agent"]>;
|
|
182
|
+
export type ReviewAuthor = z.infer<typeof reviewAuthorSchema>;
|
|
183
|
+
export declare const reviewCommentSchema: z.ZodObject<{
|
|
184
|
+
id: z.ZodString;
|
|
185
|
+
author: z.ZodEnum<["user", "agent"]>;
|
|
186
|
+
body: z.ZodString;
|
|
187
|
+
createdAt: z.ZodString;
|
|
188
|
+
}, "strip", z.ZodTypeAny, {
|
|
189
|
+
id: string;
|
|
190
|
+
author: "user" | "agent";
|
|
191
|
+
body: string;
|
|
192
|
+
createdAt: string;
|
|
193
|
+
}, {
|
|
194
|
+
id: string;
|
|
195
|
+
author: "user" | "agent";
|
|
196
|
+
body: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
}>;
|
|
199
|
+
export type ReviewComment = z.infer<typeof reviewCommentSchema>;
|
|
200
|
+
/**
|
|
201
|
+
* - `open`: a note, or an answered thread waiting on the person.
|
|
202
|
+
* - `queued`: sent to the agent, not picked up yet.
|
|
203
|
+
* - `working`: delivered to the agent.
|
|
204
|
+
* - `resolved`: the agent or the person closed it.
|
|
205
|
+
*/
|
|
206
|
+
export declare const reviewThreadStateSchema: z.ZodEnum<["open", "queued", "working", "resolved"]>;
|
|
207
|
+
export type ReviewThreadState = z.infer<typeof reviewThreadStateSchema>;
|
|
208
|
+
export declare const reviewThreadSchema: z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
anchor: z.ZodObject<{
|
|
211
|
+
/** The page's URL when the thread was created, hash routes included. */
|
|
212
|
+
url: z.ZodString;
|
|
213
|
+
/** CSS path from the nearest element with an id, or from `body`. */
|
|
214
|
+
selector: z.ZodString;
|
|
215
|
+
/** ARIA role and accessible name, as the agent would target the element in a browser. */
|
|
216
|
+
role: z.ZodOptional<z.ZodString>;
|
|
217
|
+
name: z.ZodOptional<z.ZodString>;
|
|
218
|
+
/** The element's visible text, shortened. */
|
|
219
|
+
text: z.ZodOptional<z.ZodString>;
|
|
220
|
+
/** Owner components from the outermost to the element, read off React's development fibers. */
|
|
221
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
222
|
+
/** Source positions of the element and its nearest owner components, innermost first. */
|
|
223
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
224
|
+
/** What was created there, e.g. `<a> in ProductListCell` or `<ProductListCell> in DataGrid`. */
|
|
225
|
+
label: z.ZodString;
|
|
226
|
+
file: z.ZodString;
|
|
227
|
+
line: z.ZodNumber;
|
|
228
|
+
column: z.ZodNumber;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
label: string;
|
|
231
|
+
file: string;
|
|
232
|
+
line: number;
|
|
233
|
+
column: number;
|
|
234
|
+
}, {
|
|
235
|
+
label: string;
|
|
236
|
+
file: string;
|
|
237
|
+
line: number;
|
|
238
|
+
column: number;
|
|
239
|
+
}>, "many">>;
|
|
240
|
+
/** The landmarks around the element: page heading, section, dialog. */
|
|
241
|
+
context: z.ZodOptional<z.ZodString>;
|
|
242
|
+
/** The reviewer's browser and operating system, e.g. `Chrome 141 · Linux`, viewport and colour scheme. */
|
|
243
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
viewport: z.ZodObject<{
|
|
246
|
+
width: z.ZodNumber;
|
|
247
|
+
height: z.ZodNumber;
|
|
248
|
+
scale: z.ZodNumber;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
width: number;
|
|
251
|
+
height: number;
|
|
252
|
+
scale: number;
|
|
253
|
+
}, {
|
|
254
|
+
width: number;
|
|
255
|
+
height: number;
|
|
256
|
+
scale: number;
|
|
257
|
+
}>;
|
|
258
|
+
colorScheme: z.ZodEnum<["light", "dark"]>;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
name: string;
|
|
261
|
+
viewport: {
|
|
262
|
+
width: number;
|
|
263
|
+
height: number;
|
|
264
|
+
scale: number;
|
|
265
|
+
};
|
|
266
|
+
colorScheme: "light" | "dark";
|
|
267
|
+
}, {
|
|
268
|
+
name: string;
|
|
269
|
+
viewport: {
|
|
270
|
+
width: number;
|
|
271
|
+
height: number;
|
|
272
|
+
scale: number;
|
|
273
|
+
};
|
|
274
|
+
colorScheme: "light" | "dark";
|
|
275
|
+
}>>;
|
|
276
|
+
/** The element's computed box, layout and type as CSS declarations, initial values left out. */
|
|
277
|
+
style: z.ZodOptional<z.ZodString>;
|
|
278
|
+
/** The element's markup, trimmed: deep subtrees, long lists and long texts are cut. */
|
|
279
|
+
html: z.ZodOptional<z.ZodString>;
|
|
280
|
+
/** A text selection inside the element, with its surroundings. */
|
|
281
|
+
quote: z.ZodOptional<z.ZodObject<{
|
|
282
|
+
exact: z.ZodString;
|
|
283
|
+
before: z.ZodString;
|
|
284
|
+
after: z.ZodString;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
exact: string;
|
|
287
|
+
before: string;
|
|
288
|
+
after: string;
|
|
289
|
+
}, {
|
|
290
|
+
exact: string;
|
|
291
|
+
before: string;
|
|
292
|
+
after: string;
|
|
293
|
+
}>>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
url: string;
|
|
296
|
+
selector: string;
|
|
297
|
+
browser?: {
|
|
298
|
+
name: string;
|
|
299
|
+
viewport: {
|
|
300
|
+
width: number;
|
|
301
|
+
height: number;
|
|
302
|
+
scale: number;
|
|
303
|
+
};
|
|
304
|
+
colorScheme: "light" | "dark";
|
|
305
|
+
} | undefined;
|
|
306
|
+
name?: string | undefined;
|
|
307
|
+
role?: string | undefined;
|
|
308
|
+
text?: string | undefined;
|
|
309
|
+
components?: string[] | undefined;
|
|
310
|
+
sources?: {
|
|
311
|
+
label: string;
|
|
312
|
+
file: string;
|
|
313
|
+
line: number;
|
|
314
|
+
column: number;
|
|
315
|
+
}[] | undefined;
|
|
316
|
+
context?: string | undefined;
|
|
317
|
+
style?: string | undefined;
|
|
318
|
+
html?: string | undefined;
|
|
319
|
+
quote?: {
|
|
320
|
+
exact: string;
|
|
321
|
+
before: string;
|
|
322
|
+
after: string;
|
|
323
|
+
} | undefined;
|
|
324
|
+
}, {
|
|
325
|
+
url: string;
|
|
326
|
+
selector: string;
|
|
327
|
+
browser?: {
|
|
328
|
+
name: string;
|
|
329
|
+
viewport: {
|
|
330
|
+
width: number;
|
|
331
|
+
height: number;
|
|
332
|
+
scale: number;
|
|
333
|
+
};
|
|
334
|
+
colorScheme: "light" | "dark";
|
|
335
|
+
} | undefined;
|
|
336
|
+
name?: string | undefined;
|
|
337
|
+
role?: string | undefined;
|
|
338
|
+
text?: string | undefined;
|
|
339
|
+
components?: string[] | undefined;
|
|
340
|
+
sources?: {
|
|
341
|
+
label: string;
|
|
342
|
+
file: string;
|
|
343
|
+
line: number;
|
|
344
|
+
column: number;
|
|
345
|
+
}[] | undefined;
|
|
346
|
+
context?: string | undefined;
|
|
347
|
+
style?: string | undefined;
|
|
348
|
+
html?: string | undefined;
|
|
349
|
+
quote?: {
|
|
350
|
+
exact: string;
|
|
351
|
+
before: string;
|
|
352
|
+
after: string;
|
|
353
|
+
} | undefined;
|
|
354
|
+
}>;
|
|
355
|
+
state: z.ZodEnum<["open", "queued", "working", "resolved"]>;
|
|
356
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
357
|
+
id: z.ZodString;
|
|
358
|
+
author: z.ZodEnum<["user", "agent"]>;
|
|
359
|
+
body: z.ZodString;
|
|
360
|
+
createdAt: z.ZodString;
|
|
361
|
+
}, "strip", z.ZodTypeAny, {
|
|
362
|
+
id: string;
|
|
363
|
+
author: "user" | "agent";
|
|
364
|
+
body: string;
|
|
365
|
+
createdAt: string;
|
|
366
|
+
}, {
|
|
367
|
+
id: string;
|
|
368
|
+
author: "user" | "agent";
|
|
369
|
+
body: string;
|
|
370
|
+
createdAt: string;
|
|
371
|
+
}>, "many">;
|
|
372
|
+
/** Absolute path of a PNG of the element the reviewer attached, stored by the daemon. */
|
|
373
|
+
screenshot: z.ZodOptional<z.ZodString>;
|
|
374
|
+
createdAt: z.ZodString;
|
|
375
|
+
updatedAt: z.ZodString;
|
|
376
|
+
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
anchor: {
|
|
378
|
+
url: string;
|
|
379
|
+
selector: string;
|
|
380
|
+
browser?: {
|
|
381
|
+
name: string;
|
|
382
|
+
viewport: {
|
|
383
|
+
width: number;
|
|
384
|
+
height: number;
|
|
385
|
+
scale: number;
|
|
386
|
+
};
|
|
387
|
+
colorScheme: "light" | "dark";
|
|
388
|
+
} | undefined;
|
|
389
|
+
name?: string | undefined;
|
|
390
|
+
role?: string | undefined;
|
|
391
|
+
text?: string | undefined;
|
|
392
|
+
components?: string[] | undefined;
|
|
393
|
+
sources?: {
|
|
394
|
+
label: string;
|
|
395
|
+
file: string;
|
|
396
|
+
line: number;
|
|
397
|
+
column: number;
|
|
398
|
+
}[] | undefined;
|
|
399
|
+
context?: string | undefined;
|
|
400
|
+
style?: string | undefined;
|
|
401
|
+
html?: string | undefined;
|
|
402
|
+
quote?: {
|
|
403
|
+
exact: string;
|
|
404
|
+
before: string;
|
|
405
|
+
after: string;
|
|
406
|
+
} | undefined;
|
|
407
|
+
};
|
|
408
|
+
id: string;
|
|
409
|
+
createdAt: string;
|
|
410
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
411
|
+
comments: {
|
|
412
|
+
id: string;
|
|
413
|
+
author: "user" | "agent";
|
|
414
|
+
body: string;
|
|
415
|
+
createdAt: string;
|
|
416
|
+
}[];
|
|
417
|
+
updatedAt: string;
|
|
418
|
+
screenshot?: string | undefined;
|
|
419
|
+
}, {
|
|
420
|
+
anchor: {
|
|
421
|
+
url: string;
|
|
422
|
+
selector: string;
|
|
423
|
+
browser?: {
|
|
424
|
+
name: string;
|
|
425
|
+
viewport: {
|
|
426
|
+
width: number;
|
|
427
|
+
height: number;
|
|
428
|
+
scale: number;
|
|
429
|
+
};
|
|
430
|
+
colorScheme: "light" | "dark";
|
|
431
|
+
} | undefined;
|
|
432
|
+
name?: string | undefined;
|
|
433
|
+
role?: string | undefined;
|
|
434
|
+
text?: string | undefined;
|
|
435
|
+
components?: string[] | undefined;
|
|
436
|
+
sources?: {
|
|
437
|
+
label: string;
|
|
438
|
+
file: string;
|
|
439
|
+
line: number;
|
|
440
|
+
column: number;
|
|
441
|
+
}[] | undefined;
|
|
442
|
+
context?: string | undefined;
|
|
443
|
+
style?: string | undefined;
|
|
444
|
+
html?: string | undefined;
|
|
445
|
+
quote?: {
|
|
446
|
+
exact: string;
|
|
447
|
+
before: string;
|
|
448
|
+
after: string;
|
|
449
|
+
} | undefined;
|
|
450
|
+
};
|
|
451
|
+
id: string;
|
|
452
|
+
createdAt: string;
|
|
453
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
454
|
+
comments: {
|
|
455
|
+
id: string;
|
|
456
|
+
author: "user" | "agent";
|
|
457
|
+
body: string;
|
|
458
|
+
createdAt: string;
|
|
459
|
+
}[];
|
|
460
|
+
updatedAt: string;
|
|
461
|
+
screenshot?: string | undefined;
|
|
462
|
+
}>;
|
|
463
|
+
export type ReviewThread = z.infer<typeof reviewThreadSchema>;
|
|
464
|
+
export declare const reviewThreadsFileSchema: z.ZodObject<{
|
|
465
|
+
threads: z.ZodArray<z.ZodObject<{
|
|
466
|
+
id: z.ZodString;
|
|
467
|
+
anchor: z.ZodObject<{
|
|
468
|
+
/** The page's URL when the thread was created, hash routes included. */
|
|
469
|
+
url: z.ZodString;
|
|
470
|
+
/** CSS path from the nearest element with an id, or from `body`. */
|
|
471
|
+
selector: z.ZodString;
|
|
472
|
+
/** ARIA role and accessible name, as the agent would target the element in a browser. */
|
|
473
|
+
role: z.ZodOptional<z.ZodString>;
|
|
474
|
+
name: z.ZodOptional<z.ZodString>;
|
|
475
|
+
/** The element's visible text, shortened. */
|
|
476
|
+
text: z.ZodOptional<z.ZodString>;
|
|
477
|
+
/** Owner components from the outermost to the element, read off React's development fibers. */
|
|
478
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
479
|
+
/** Source positions of the element and its nearest owner components, innermost first. */
|
|
480
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
481
|
+
/** What was created there, e.g. `<a> in ProductListCell` or `<ProductListCell> in DataGrid`. */
|
|
482
|
+
label: z.ZodString;
|
|
483
|
+
file: z.ZodString;
|
|
484
|
+
line: z.ZodNumber;
|
|
485
|
+
column: z.ZodNumber;
|
|
486
|
+
}, "strip", z.ZodTypeAny, {
|
|
487
|
+
label: string;
|
|
488
|
+
file: string;
|
|
489
|
+
line: number;
|
|
490
|
+
column: number;
|
|
491
|
+
}, {
|
|
492
|
+
label: string;
|
|
493
|
+
file: string;
|
|
494
|
+
line: number;
|
|
495
|
+
column: number;
|
|
496
|
+
}>, "many">>;
|
|
497
|
+
/** The landmarks around the element: page heading, section, dialog. */
|
|
498
|
+
context: z.ZodOptional<z.ZodString>;
|
|
499
|
+
/** The reviewer's browser and operating system, e.g. `Chrome 141 · Linux`, viewport and colour scheme. */
|
|
500
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
501
|
+
name: z.ZodString;
|
|
502
|
+
viewport: z.ZodObject<{
|
|
503
|
+
width: z.ZodNumber;
|
|
504
|
+
height: z.ZodNumber;
|
|
505
|
+
scale: z.ZodNumber;
|
|
506
|
+
}, "strip", z.ZodTypeAny, {
|
|
507
|
+
width: number;
|
|
508
|
+
height: number;
|
|
509
|
+
scale: number;
|
|
510
|
+
}, {
|
|
511
|
+
width: number;
|
|
512
|
+
height: number;
|
|
513
|
+
scale: number;
|
|
514
|
+
}>;
|
|
515
|
+
colorScheme: z.ZodEnum<["light", "dark"]>;
|
|
516
|
+
}, "strip", z.ZodTypeAny, {
|
|
517
|
+
name: string;
|
|
518
|
+
viewport: {
|
|
519
|
+
width: number;
|
|
520
|
+
height: number;
|
|
521
|
+
scale: number;
|
|
522
|
+
};
|
|
523
|
+
colorScheme: "light" | "dark";
|
|
524
|
+
}, {
|
|
525
|
+
name: string;
|
|
526
|
+
viewport: {
|
|
527
|
+
width: number;
|
|
528
|
+
height: number;
|
|
529
|
+
scale: number;
|
|
530
|
+
};
|
|
531
|
+
colorScheme: "light" | "dark";
|
|
532
|
+
}>>;
|
|
533
|
+
/** The element's computed box, layout and type as CSS declarations, initial values left out. */
|
|
534
|
+
style: z.ZodOptional<z.ZodString>;
|
|
535
|
+
/** The element's markup, trimmed: deep subtrees, long lists and long texts are cut. */
|
|
536
|
+
html: z.ZodOptional<z.ZodString>;
|
|
537
|
+
/** A text selection inside the element, with its surroundings. */
|
|
538
|
+
quote: z.ZodOptional<z.ZodObject<{
|
|
539
|
+
exact: z.ZodString;
|
|
540
|
+
before: z.ZodString;
|
|
541
|
+
after: z.ZodString;
|
|
542
|
+
}, "strip", z.ZodTypeAny, {
|
|
543
|
+
exact: string;
|
|
544
|
+
before: string;
|
|
545
|
+
after: string;
|
|
546
|
+
}, {
|
|
547
|
+
exact: string;
|
|
548
|
+
before: string;
|
|
549
|
+
after: string;
|
|
550
|
+
}>>;
|
|
551
|
+
}, "strip", z.ZodTypeAny, {
|
|
552
|
+
url: string;
|
|
553
|
+
selector: string;
|
|
554
|
+
browser?: {
|
|
555
|
+
name: string;
|
|
556
|
+
viewport: {
|
|
557
|
+
width: number;
|
|
558
|
+
height: number;
|
|
559
|
+
scale: number;
|
|
560
|
+
};
|
|
561
|
+
colorScheme: "light" | "dark";
|
|
562
|
+
} | undefined;
|
|
563
|
+
name?: string | undefined;
|
|
564
|
+
role?: string | undefined;
|
|
565
|
+
text?: string | undefined;
|
|
566
|
+
components?: string[] | undefined;
|
|
567
|
+
sources?: {
|
|
568
|
+
label: string;
|
|
569
|
+
file: string;
|
|
570
|
+
line: number;
|
|
571
|
+
column: number;
|
|
572
|
+
}[] | undefined;
|
|
573
|
+
context?: string | undefined;
|
|
574
|
+
style?: string | undefined;
|
|
575
|
+
html?: string | undefined;
|
|
576
|
+
quote?: {
|
|
577
|
+
exact: string;
|
|
578
|
+
before: string;
|
|
579
|
+
after: string;
|
|
580
|
+
} | undefined;
|
|
581
|
+
}, {
|
|
582
|
+
url: string;
|
|
583
|
+
selector: string;
|
|
584
|
+
browser?: {
|
|
585
|
+
name: string;
|
|
586
|
+
viewport: {
|
|
587
|
+
width: number;
|
|
588
|
+
height: number;
|
|
589
|
+
scale: number;
|
|
590
|
+
};
|
|
591
|
+
colorScheme: "light" | "dark";
|
|
592
|
+
} | undefined;
|
|
593
|
+
name?: string | undefined;
|
|
594
|
+
role?: string | undefined;
|
|
595
|
+
text?: string | undefined;
|
|
596
|
+
components?: string[] | undefined;
|
|
597
|
+
sources?: {
|
|
598
|
+
label: string;
|
|
599
|
+
file: string;
|
|
600
|
+
line: number;
|
|
601
|
+
column: number;
|
|
602
|
+
}[] | undefined;
|
|
603
|
+
context?: string | undefined;
|
|
604
|
+
style?: string | undefined;
|
|
605
|
+
html?: string | undefined;
|
|
606
|
+
quote?: {
|
|
607
|
+
exact: string;
|
|
608
|
+
before: string;
|
|
609
|
+
after: string;
|
|
610
|
+
} | undefined;
|
|
611
|
+
}>;
|
|
612
|
+
state: z.ZodEnum<["open", "queued", "working", "resolved"]>;
|
|
613
|
+
comments: z.ZodArray<z.ZodObject<{
|
|
614
|
+
id: z.ZodString;
|
|
615
|
+
author: z.ZodEnum<["user", "agent"]>;
|
|
616
|
+
body: z.ZodString;
|
|
617
|
+
createdAt: z.ZodString;
|
|
618
|
+
}, "strip", z.ZodTypeAny, {
|
|
619
|
+
id: string;
|
|
620
|
+
author: "user" | "agent";
|
|
621
|
+
body: string;
|
|
622
|
+
createdAt: string;
|
|
623
|
+
}, {
|
|
624
|
+
id: string;
|
|
625
|
+
author: "user" | "agent";
|
|
626
|
+
body: string;
|
|
627
|
+
createdAt: string;
|
|
628
|
+
}>, "many">;
|
|
629
|
+
/** Absolute path of a PNG of the element the reviewer attached, stored by the daemon. */
|
|
630
|
+
screenshot: z.ZodOptional<z.ZodString>;
|
|
631
|
+
createdAt: z.ZodString;
|
|
632
|
+
updatedAt: z.ZodString;
|
|
633
|
+
}, "strip", z.ZodTypeAny, {
|
|
634
|
+
anchor: {
|
|
635
|
+
url: string;
|
|
636
|
+
selector: string;
|
|
637
|
+
browser?: {
|
|
638
|
+
name: string;
|
|
639
|
+
viewport: {
|
|
640
|
+
width: number;
|
|
641
|
+
height: number;
|
|
642
|
+
scale: number;
|
|
643
|
+
};
|
|
644
|
+
colorScheme: "light" | "dark";
|
|
645
|
+
} | undefined;
|
|
646
|
+
name?: string | undefined;
|
|
647
|
+
role?: string | undefined;
|
|
648
|
+
text?: string | undefined;
|
|
649
|
+
components?: string[] | undefined;
|
|
650
|
+
sources?: {
|
|
651
|
+
label: string;
|
|
652
|
+
file: string;
|
|
653
|
+
line: number;
|
|
654
|
+
column: number;
|
|
655
|
+
}[] | undefined;
|
|
656
|
+
context?: string | undefined;
|
|
657
|
+
style?: string | undefined;
|
|
658
|
+
html?: string | undefined;
|
|
659
|
+
quote?: {
|
|
660
|
+
exact: string;
|
|
661
|
+
before: string;
|
|
662
|
+
after: string;
|
|
663
|
+
} | undefined;
|
|
664
|
+
};
|
|
665
|
+
id: string;
|
|
666
|
+
createdAt: string;
|
|
667
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
668
|
+
comments: {
|
|
669
|
+
id: string;
|
|
670
|
+
author: "user" | "agent";
|
|
671
|
+
body: string;
|
|
672
|
+
createdAt: string;
|
|
673
|
+
}[];
|
|
674
|
+
updatedAt: string;
|
|
675
|
+
screenshot?: string | undefined;
|
|
676
|
+
}, {
|
|
677
|
+
anchor: {
|
|
678
|
+
url: string;
|
|
679
|
+
selector: string;
|
|
680
|
+
browser?: {
|
|
681
|
+
name: string;
|
|
682
|
+
viewport: {
|
|
683
|
+
width: number;
|
|
684
|
+
height: number;
|
|
685
|
+
scale: number;
|
|
686
|
+
};
|
|
687
|
+
colorScheme: "light" | "dark";
|
|
688
|
+
} | undefined;
|
|
689
|
+
name?: string | undefined;
|
|
690
|
+
role?: string | undefined;
|
|
691
|
+
text?: string | undefined;
|
|
692
|
+
components?: string[] | undefined;
|
|
693
|
+
sources?: {
|
|
694
|
+
label: string;
|
|
695
|
+
file: string;
|
|
696
|
+
line: number;
|
|
697
|
+
column: number;
|
|
698
|
+
}[] | undefined;
|
|
699
|
+
context?: string | undefined;
|
|
700
|
+
style?: string | undefined;
|
|
701
|
+
html?: string | undefined;
|
|
702
|
+
quote?: {
|
|
703
|
+
exact: string;
|
|
704
|
+
before: string;
|
|
705
|
+
after: string;
|
|
706
|
+
} | undefined;
|
|
707
|
+
};
|
|
708
|
+
id: string;
|
|
709
|
+
createdAt: string;
|
|
710
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
711
|
+
comments: {
|
|
712
|
+
id: string;
|
|
713
|
+
author: "user" | "agent";
|
|
714
|
+
body: string;
|
|
715
|
+
createdAt: string;
|
|
716
|
+
}[];
|
|
717
|
+
updatedAt: string;
|
|
718
|
+
screenshot?: string | undefined;
|
|
719
|
+
}>, "many">;
|
|
720
|
+
}, "strip", z.ZodTypeAny, {
|
|
721
|
+
threads: {
|
|
722
|
+
anchor: {
|
|
723
|
+
url: string;
|
|
724
|
+
selector: string;
|
|
725
|
+
browser?: {
|
|
726
|
+
name: string;
|
|
727
|
+
viewport: {
|
|
728
|
+
width: number;
|
|
729
|
+
height: number;
|
|
730
|
+
scale: number;
|
|
731
|
+
};
|
|
732
|
+
colorScheme: "light" | "dark";
|
|
733
|
+
} | undefined;
|
|
734
|
+
name?: string | undefined;
|
|
735
|
+
role?: string | undefined;
|
|
736
|
+
text?: string | undefined;
|
|
737
|
+
components?: string[] | undefined;
|
|
738
|
+
sources?: {
|
|
739
|
+
label: string;
|
|
740
|
+
file: string;
|
|
741
|
+
line: number;
|
|
742
|
+
column: number;
|
|
743
|
+
}[] | undefined;
|
|
744
|
+
context?: string | undefined;
|
|
745
|
+
style?: string | undefined;
|
|
746
|
+
html?: string | undefined;
|
|
747
|
+
quote?: {
|
|
748
|
+
exact: string;
|
|
749
|
+
before: string;
|
|
750
|
+
after: string;
|
|
751
|
+
} | undefined;
|
|
752
|
+
};
|
|
753
|
+
id: string;
|
|
754
|
+
createdAt: string;
|
|
755
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
756
|
+
comments: {
|
|
757
|
+
id: string;
|
|
758
|
+
author: "user" | "agent";
|
|
759
|
+
body: string;
|
|
760
|
+
createdAt: string;
|
|
761
|
+
}[];
|
|
762
|
+
updatedAt: string;
|
|
763
|
+
screenshot?: string | undefined;
|
|
764
|
+
}[];
|
|
765
|
+
}, {
|
|
766
|
+
threads: {
|
|
767
|
+
anchor: {
|
|
768
|
+
url: string;
|
|
769
|
+
selector: string;
|
|
770
|
+
browser?: {
|
|
771
|
+
name: string;
|
|
772
|
+
viewport: {
|
|
773
|
+
width: number;
|
|
774
|
+
height: number;
|
|
775
|
+
scale: number;
|
|
776
|
+
};
|
|
777
|
+
colorScheme: "light" | "dark";
|
|
778
|
+
} | undefined;
|
|
779
|
+
name?: string | undefined;
|
|
780
|
+
role?: string | undefined;
|
|
781
|
+
text?: string | undefined;
|
|
782
|
+
components?: string[] | undefined;
|
|
783
|
+
sources?: {
|
|
784
|
+
label: string;
|
|
785
|
+
file: string;
|
|
786
|
+
line: number;
|
|
787
|
+
column: number;
|
|
788
|
+
}[] | undefined;
|
|
789
|
+
context?: string | undefined;
|
|
790
|
+
style?: string | undefined;
|
|
791
|
+
html?: string | undefined;
|
|
792
|
+
quote?: {
|
|
793
|
+
exact: string;
|
|
794
|
+
before: string;
|
|
795
|
+
after: string;
|
|
796
|
+
} | undefined;
|
|
797
|
+
};
|
|
798
|
+
id: string;
|
|
799
|
+
createdAt: string;
|
|
800
|
+
state: "open" | "queued" | "working" | "resolved";
|
|
801
|
+
comments: {
|
|
802
|
+
id: string;
|
|
803
|
+
author: "user" | "agent";
|
|
804
|
+
body: string;
|
|
805
|
+
createdAt: string;
|
|
806
|
+
}[];
|
|
807
|
+
updatedAt: string;
|
|
808
|
+
screenshot?: string | undefined;
|
|
809
|
+
}[];
|
|
810
|
+
}>;
|
|
811
|
+
/** A PNG the widget rendered from the element, as a data URL; at most about 6 MB decoded. */
|
|
812
|
+
export declare const screenshotDataUrlSchema: z.ZodEffects<z.ZodString, Uint8Array<ArrayBuffer>, string>;
|
|
813
|
+
export declare const createThreadBodySchema: z.ZodObject<{
|
|
814
|
+
anchor: z.ZodObject<{
|
|
815
|
+
/** The page's URL when the thread was created, hash routes included. */
|
|
816
|
+
url: z.ZodString;
|
|
817
|
+
/** CSS path from the nearest element with an id, or from `body`. */
|
|
818
|
+
selector: z.ZodString;
|
|
819
|
+
/** ARIA role and accessible name, as the agent would target the element in a browser. */
|
|
820
|
+
role: z.ZodOptional<z.ZodString>;
|
|
821
|
+
name: z.ZodOptional<z.ZodString>;
|
|
822
|
+
/** The element's visible text, shortened. */
|
|
823
|
+
text: z.ZodOptional<z.ZodString>;
|
|
824
|
+
/** Owner components from the outermost to the element, read off React's development fibers. */
|
|
825
|
+
components: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
826
|
+
/** Source positions of the element and its nearest owner components, innermost first. */
|
|
827
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
828
|
+
/** What was created there, e.g. `<a> in ProductListCell` or `<ProductListCell> in DataGrid`. */
|
|
829
|
+
label: z.ZodString;
|
|
830
|
+
file: z.ZodString;
|
|
831
|
+
line: z.ZodNumber;
|
|
832
|
+
column: z.ZodNumber;
|
|
833
|
+
}, "strip", z.ZodTypeAny, {
|
|
834
|
+
label: string;
|
|
835
|
+
file: string;
|
|
836
|
+
line: number;
|
|
837
|
+
column: number;
|
|
838
|
+
}, {
|
|
839
|
+
label: string;
|
|
840
|
+
file: string;
|
|
841
|
+
line: number;
|
|
842
|
+
column: number;
|
|
843
|
+
}>, "many">>;
|
|
844
|
+
/** The landmarks around the element: page heading, section, dialog. */
|
|
845
|
+
context: z.ZodOptional<z.ZodString>;
|
|
846
|
+
/** The reviewer's browser and operating system, e.g. `Chrome 141 · Linux`, viewport and colour scheme. */
|
|
847
|
+
browser: z.ZodOptional<z.ZodObject<{
|
|
848
|
+
name: z.ZodString;
|
|
849
|
+
viewport: z.ZodObject<{
|
|
850
|
+
width: z.ZodNumber;
|
|
851
|
+
height: z.ZodNumber;
|
|
852
|
+
scale: z.ZodNumber;
|
|
853
|
+
}, "strip", z.ZodTypeAny, {
|
|
854
|
+
width: number;
|
|
855
|
+
height: number;
|
|
856
|
+
scale: number;
|
|
857
|
+
}, {
|
|
858
|
+
width: number;
|
|
859
|
+
height: number;
|
|
860
|
+
scale: number;
|
|
861
|
+
}>;
|
|
862
|
+
colorScheme: z.ZodEnum<["light", "dark"]>;
|
|
863
|
+
}, "strip", z.ZodTypeAny, {
|
|
864
|
+
name: string;
|
|
865
|
+
viewport: {
|
|
866
|
+
width: number;
|
|
867
|
+
height: number;
|
|
868
|
+
scale: number;
|
|
869
|
+
};
|
|
870
|
+
colorScheme: "light" | "dark";
|
|
871
|
+
}, {
|
|
872
|
+
name: string;
|
|
873
|
+
viewport: {
|
|
874
|
+
width: number;
|
|
875
|
+
height: number;
|
|
876
|
+
scale: number;
|
|
877
|
+
};
|
|
878
|
+
colorScheme: "light" | "dark";
|
|
879
|
+
}>>;
|
|
880
|
+
/** The element's computed box, layout and type as CSS declarations, initial values left out. */
|
|
881
|
+
style: z.ZodOptional<z.ZodString>;
|
|
882
|
+
/** The element's markup, trimmed: deep subtrees, long lists and long texts are cut. */
|
|
883
|
+
html: z.ZodOptional<z.ZodString>;
|
|
884
|
+
/** A text selection inside the element, with its surroundings. */
|
|
885
|
+
quote: z.ZodOptional<z.ZodObject<{
|
|
886
|
+
exact: z.ZodString;
|
|
887
|
+
before: z.ZodString;
|
|
888
|
+
after: z.ZodString;
|
|
889
|
+
}, "strip", z.ZodTypeAny, {
|
|
890
|
+
exact: string;
|
|
891
|
+
before: string;
|
|
892
|
+
after: string;
|
|
893
|
+
}, {
|
|
894
|
+
exact: string;
|
|
895
|
+
before: string;
|
|
896
|
+
after: string;
|
|
897
|
+
}>>;
|
|
898
|
+
}, "strip", z.ZodTypeAny, {
|
|
899
|
+
url: string;
|
|
900
|
+
selector: string;
|
|
901
|
+
browser?: {
|
|
902
|
+
name: string;
|
|
903
|
+
viewport: {
|
|
904
|
+
width: number;
|
|
905
|
+
height: number;
|
|
906
|
+
scale: number;
|
|
907
|
+
};
|
|
908
|
+
colorScheme: "light" | "dark";
|
|
909
|
+
} | undefined;
|
|
910
|
+
name?: string | undefined;
|
|
911
|
+
role?: string | undefined;
|
|
912
|
+
text?: string | undefined;
|
|
913
|
+
components?: string[] | undefined;
|
|
914
|
+
sources?: {
|
|
915
|
+
label: string;
|
|
916
|
+
file: string;
|
|
917
|
+
line: number;
|
|
918
|
+
column: number;
|
|
919
|
+
}[] | undefined;
|
|
920
|
+
context?: string | undefined;
|
|
921
|
+
style?: string | undefined;
|
|
922
|
+
html?: string | undefined;
|
|
923
|
+
quote?: {
|
|
924
|
+
exact: string;
|
|
925
|
+
before: string;
|
|
926
|
+
after: string;
|
|
927
|
+
} | undefined;
|
|
928
|
+
}, {
|
|
929
|
+
url: string;
|
|
930
|
+
selector: string;
|
|
931
|
+
browser?: {
|
|
932
|
+
name: string;
|
|
933
|
+
viewport: {
|
|
934
|
+
width: number;
|
|
935
|
+
height: number;
|
|
936
|
+
scale: number;
|
|
937
|
+
};
|
|
938
|
+
colorScheme: "light" | "dark";
|
|
939
|
+
} | undefined;
|
|
940
|
+
name?: string | undefined;
|
|
941
|
+
role?: string | undefined;
|
|
942
|
+
text?: string | undefined;
|
|
943
|
+
components?: string[] | undefined;
|
|
944
|
+
sources?: {
|
|
945
|
+
label: string;
|
|
946
|
+
file: string;
|
|
947
|
+
line: number;
|
|
948
|
+
column: number;
|
|
949
|
+
}[] | undefined;
|
|
950
|
+
context?: string | undefined;
|
|
951
|
+
style?: string | undefined;
|
|
952
|
+
html?: string | undefined;
|
|
953
|
+
quote?: {
|
|
954
|
+
exact: string;
|
|
955
|
+
before: string;
|
|
956
|
+
after: string;
|
|
957
|
+
} | undefined;
|
|
958
|
+
}>;
|
|
959
|
+
body: z.ZodString;
|
|
960
|
+
send: z.ZodBoolean;
|
|
961
|
+
screenshot: z.ZodOptional<z.ZodEffects<z.ZodString, Uint8Array<ArrayBuffer>, string>>;
|
|
962
|
+
}, "strip", z.ZodTypeAny, {
|
|
963
|
+
anchor: {
|
|
964
|
+
url: string;
|
|
965
|
+
selector: string;
|
|
966
|
+
browser?: {
|
|
967
|
+
name: string;
|
|
968
|
+
viewport: {
|
|
969
|
+
width: number;
|
|
970
|
+
height: number;
|
|
971
|
+
scale: number;
|
|
972
|
+
};
|
|
973
|
+
colorScheme: "light" | "dark";
|
|
974
|
+
} | undefined;
|
|
975
|
+
name?: string | undefined;
|
|
976
|
+
role?: string | undefined;
|
|
977
|
+
text?: string | undefined;
|
|
978
|
+
components?: string[] | undefined;
|
|
979
|
+
sources?: {
|
|
980
|
+
label: string;
|
|
981
|
+
file: string;
|
|
982
|
+
line: number;
|
|
983
|
+
column: number;
|
|
984
|
+
}[] | undefined;
|
|
985
|
+
context?: string | undefined;
|
|
986
|
+
style?: string | undefined;
|
|
987
|
+
html?: string | undefined;
|
|
988
|
+
quote?: {
|
|
989
|
+
exact: string;
|
|
990
|
+
before: string;
|
|
991
|
+
after: string;
|
|
992
|
+
} | undefined;
|
|
993
|
+
};
|
|
994
|
+
body: string;
|
|
995
|
+
send: boolean;
|
|
996
|
+
screenshot?: Uint8Array<ArrayBuffer> | undefined;
|
|
997
|
+
}, {
|
|
998
|
+
anchor: {
|
|
999
|
+
url: string;
|
|
1000
|
+
selector: string;
|
|
1001
|
+
browser?: {
|
|
1002
|
+
name: string;
|
|
1003
|
+
viewport: {
|
|
1004
|
+
width: number;
|
|
1005
|
+
height: number;
|
|
1006
|
+
scale: number;
|
|
1007
|
+
};
|
|
1008
|
+
colorScheme: "light" | "dark";
|
|
1009
|
+
} | undefined;
|
|
1010
|
+
name?: string | undefined;
|
|
1011
|
+
role?: string | undefined;
|
|
1012
|
+
text?: string | undefined;
|
|
1013
|
+
components?: string[] | undefined;
|
|
1014
|
+
sources?: {
|
|
1015
|
+
label: string;
|
|
1016
|
+
file: string;
|
|
1017
|
+
line: number;
|
|
1018
|
+
column: number;
|
|
1019
|
+
}[] | undefined;
|
|
1020
|
+
context?: string | undefined;
|
|
1021
|
+
style?: string | undefined;
|
|
1022
|
+
html?: string | undefined;
|
|
1023
|
+
quote?: {
|
|
1024
|
+
exact: string;
|
|
1025
|
+
before: string;
|
|
1026
|
+
after: string;
|
|
1027
|
+
} | undefined;
|
|
1028
|
+
};
|
|
1029
|
+
body: string;
|
|
1030
|
+
send: boolean;
|
|
1031
|
+
screenshot?: string | undefined;
|
|
1032
|
+
}>;
|
|
1033
|
+
export declare const addCommentBodySchema: z.ZodObject<{
|
|
1034
|
+
body: z.ZodString;
|
|
1035
|
+
send: z.ZodBoolean;
|
|
1036
|
+
}, "strip", z.ZodTypeAny, {
|
|
1037
|
+
body: string;
|
|
1038
|
+
send: boolean;
|
|
1039
|
+
}, {
|
|
1040
|
+
body: string;
|
|
1041
|
+
send: boolean;
|
|
1042
|
+
}>;
|
|
1043
|
+
export declare const agentReplyBodySchema: z.ZodObject<{
|
|
1044
|
+
body: z.ZodString;
|
|
1045
|
+
resolve: z.ZodBoolean;
|
|
1046
|
+
}, "strip", z.ZodTypeAny, {
|
|
1047
|
+
body: string;
|
|
1048
|
+
resolve: boolean;
|
|
1049
|
+
}, {
|
|
1050
|
+
body: string;
|
|
1051
|
+
resolve: boolean;
|
|
1052
|
+
}>;
|
|
1053
|
+
/** The CLI's request to open an application for review through the daemon's proxy. */
|
|
1054
|
+
export declare const openProxyBodySchema: z.ZodObject<{
|
|
1055
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
1056
|
+
}, "strip", z.ZodTypeAny, {
|
|
1057
|
+
target: string;
|
|
1058
|
+
}, {
|
|
1059
|
+
target: string;
|
|
1060
|
+
}>;
|
|
1061
|
+
/** A project's review proxy, kept so a restarted daemon serves it on the same port: the reviewer's tab keeps working. */
|
|
1062
|
+
export declare const reviewProxySchema: z.ZodObject<{
|
|
1063
|
+
target: z.ZodEffects<z.ZodString, string, string>;
|
|
1064
|
+
port: z.ZodNumber;
|
|
1065
|
+
}, "strip", z.ZodTypeAny, {
|
|
1066
|
+
target: string;
|
|
1067
|
+
port: number;
|
|
1068
|
+
}, {
|
|
1069
|
+
target: string;
|
|
1070
|
+
port: number;
|
|
1071
|
+
}>;
|
|
1072
|
+
export type ReviewProxy = z.infer<typeof reviewProxySchema>;
|
|
1073
|
+
/** Frames the daemon sends to browsers on a project's topic. */
|
|
1074
|
+
export type ReviewBrowserFrame = {
|
|
1075
|
+
type: 'threads';
|
|
1076
|
+
threads: readonly ReviewThread[];
|
|
1077
|
+
} | {
|
|
1078
|
+
type: 'agent-status';
|
|
1079
|
+
watching: boolean;
|
|
1080
|
+
}
|
|
1081
|
+
/** The application's dev server asked for a full reload; the widget holds it while the reviewer writes. */
|
|
1082
|
+
| {
|
|
1083
|
+
type: 'reload';
|
|
1084
|
+
path: string;
|
|
1085
|
+
};
|
|
1086
|
+
/** The frame a waiting CLI receives when the person sends threads; it reads them back through the claim endpoint. */
|
|
1087
|
+
export interface ReviewWaitFrame {
|
|
1088
|
+
type: 'queued';
|
|
1089
|
+
}
|