@parity-app/cli 0.7.1 → 0.7.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/dist/bin.mjs +214 -1098
- package/dist/{client-D5kbiMmn.mjs → client-BtxrNeIk.mjs} +638 -13
- package/dist/index.d.mts +754 -380
- package/dist/index.mjs +1 -1
- package/dist/{schema-DcQLoUPP.mjs → schema-CemdtCeF.mjs} +19 -4
- package/dist/{src-DM51TWZ6.mjs → src-CPka3fhs.mjs} +4 -4
- package/dist/{src-B5sEtTw_.mjs → src-Chy2scQg.mjs} +1 -1
- package/dist/{src-IWA2JHPw.mjs → src-Csdxx4kB.mjs} +1 -1
- package/dist/{src-C6QQltHZ.mjs → src-CzZ9eIU8.mjs} +1 -1
- package/dist/src-tY0sf-AQ.mjs +5 -0
- package/package.json +1 -1
- package/dist/src-_5ETJOb0.mjs +0 -4
package/dist/index.d.mts
CHANGED
|
@@ -13,100 +13,766 @@ interface Registry {
|
|
|
13
13
|
path: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Each operation's input by RPC method, as the CLI and MCP take it and the app is sent it. Execute's is a snippet to
|
|
17
|
+
* run, or a failed snippet's editId with edits to it (PAR-451).
|
|
18
18
|
*/
|
|
19
|
-
declare const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
19
|
+
declare const requests: {
|
|
20
|
+
tabs: z.ZodObject<{}, z.core.$strict>;
|
|
21
|
+
state: z.ZodObject<{
|
|
22
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
status: z.ZodObject<{
|
|
25
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
26
|
+
summary: z.ZodDefault<z.ZodBoolean>;
|
|
27
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
modes: z.ZodObject<{
|
|
30
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
31
|
+
design: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
open: z.ZodObject<{
|
|
34
|
+
root: z.ZodString;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
screenshot: z.ZodObject<{
|
|
37
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
38
|
+
design: z.ZodString;
|
|
39
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
state: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string | string[], string | string[]>>>;
|
|
41
|
+
mode: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string | string[], string | string[]>>>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
problems: z.ZodObject<{
|
|
44
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
45
|
+
design: z.ZodString;
|
|
46
|
+
state: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string | string[], string | string[]>>;
|
|
47
|
+
mode: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string | string[], string | string[]>>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
accessibility: z.ZodObject<{
|
|
50
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
51
|
+
design: z.ZodString;
|
|
52
|
+
state: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string | string[], string | string[]>>;
|
|
53
|
+
mode: z.ZodPipe<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>, z.ZodTransform<string | string[], string | string[]>>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
console: z.ZodObject<{
|
|
56
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
57
|
+
clear: z.ZodDefault<z.ZodBoolean>;
|
|
58
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
tokens: z.ZodObject<{
|
|
61
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
62
|
+
category: z.ZodOptional<z.ZodString>;
|
|
63
|
+
source: z.ZodOptional<z.ZodString>;
|
|
64
|
+
search: z.ZodOptional<z.ZodString>;
|
|
65
|
+
limit: z.ZodDefault<z.ZodInt>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
components: z.ZodObject<{
|
|
68
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>;
|
|
70
|
+
props: z.ZodObject<{
|
|
71
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
72
|
+
component: z.ZodString;
|
|
73
|
+
all: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
exec: z.ZodUnion<readonly [z.ZodObject<{
|
|
76
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
77
|
+
label: z.ZodDefault<z.ZodString>;
|
|
78
|
+
code: z.ZodString;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
tab: z.ZodOptional<z.ZodString>;
|
|
81
|
+
label: z.ZodDefault<z.ZodString>;
|
|
82
|
+
editId: z.ZodString;
|
|
83
|
+
edits: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
84
|
+
find: z.ZodString;
|
|
85
|
+
replace: z.ZodString;
|
|
86
|
+
all: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
}, z.core.$strict>>>;
|
|
88
|
+
}, z.core.$strict>]>;
|
|
89
|
+
};
|
|
39
90
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
91
|
+
* Each method's answer by RPC method, which the CLI checks before reading it. `copy` is what a copy says about itself,
|
|
92
|
+
* which calls are routed by (PAR-514): its tabs, and when its window last had focus, missing from a copy too old to
|
|
93
|
+
* say. A screenshot is a snippet Parity writes, so it answers as `exec` does.
|
|
42
94
|
*/
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
declare const replies: {
|
|
96
|
+
copy: z.ZodObject<{
|
|
97
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
root: z.ZodString;
|
|
101
|
+
active: z.ZodBoolean;
|
|
102
|
+
status: z.ZodEnum<{
|
|
103
|
+
error: "error";
|
|
104
|
+
loading: "loading";
|
|
105
|
+
ready: "ready";
|
|
106
|
+
}>;
|
|
107
|
+
error: z.ZodOptional<z.ZodString>;
|
|
108
|
+
designs: z.ZodInt;
|
|
109
|
+
}, z.core.$loose>>;
|
|
110
|
+
focusedAt: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
}, z.core.$loose>;
|
|
112
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
113
|
+
id: z.ZodString;
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
root: z.ZodString;
|
|
116
|
+
active: z.ZodBoolean;
|
|
117
|
+
status: z.ZodEnum<{
|
|
118
|
+
error: "error";
|
|
119
|
+
loading: "loading";
|
|
120
|
+
ready: "ready";
|
|
121
|
+
}>;
|
|
122
|
+
error: z.ZodOptional<z.ZodString>;
|
|
123
|
+
designs: z.ZodInt;
|
|
124
|
+
}, z.core.$loose>>;
|
|
125
|
+
state: z.ZodObject<{
|
|
126
|
+
tab: z.ZodObject<{
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
root: z.ZodString;
|
|
130
|
+
active: z.ZodBoolean;
|
|
131
|
+
status: z.ZodEnum<{
|
|
132
|
+
error: "error";
|
|
133
|
+
loading: "loading";
|
|
134
|
+
ready: "ready";
|
|
135
|
+
}>;
|
|
136
|
+
error: z.ZodOptional<z.ZodString>;
|
|
137
|
+
designs: z.ZodInt;
|
|
138
|
+
}, z.core.$loose>;
|
|
139
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
140
|
+
selection: z.ZodObject<{
|
|
141
|
+
design: z.ZodOptional<z.ZodString>;
|
|
142
|
+
node: z.ZodOptional<z.ZodString>;
|
|
143
|
+
mode: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$loose>;
|
|
145
|
+
designs: z.ZodArray<z.ZodObject<{
|
|
146
|
+
id: z.ZodString;
|
|
147
|
+
name: z.ZodString;
|
|
148
|
+
kind: z.ZodString;
|
|
149
|
+
file: z.ZodString;
|
|
150
|
+
x: z.ZodNumber;
|
|
151
|
+
y: z.ZodNumber;
|
|
152
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
states: z.ZodArray<z.ZodObject<{
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
name: z.ZodString;
|
|
157
|
+
}, z.core.$loose>>;
|
|
158
|
+
showing: z.ZodObject<{
|
|
159
|
+
state: z.ZodString;
|
|
160
|
+
mode: z.ZodString;
|
|
161
|
+
beside: z.ZodArray<z.ZodString>;
|
|
162
|
+
}, z.core.$loose>;
|
|
163
|
+
nodes: z.ZodInt;
|
|
164
|
+
}, z.core.$loose>>;
|
|
165
|
+
overlaps: z.ZodArray<z.ZodObject<{
|
|
166
|
+
designs: z.ZodArray<z.ZodString>;
|
|
167
|
+
names: z.ZodArray<z.ZodString>;
|
|
168
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
titleOnly: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
estimated: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
}, z.core.$loose>>;
|
|
173
|
+
modes: z.ZodArray<z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
name: z.ZodString;
|
|
176
|
+
width: z.ZodNumber;
|
|
177
|
+
primary: z.ZodBoolean;
|
|
178
|
+
}, z.core.$loose>>;
|
|
179
|
+
components: z.ZodArray<z.ZodString>;
|
|
180
|
+
tokens: z.ZodObject<{
|
|
181
|
+
count: z.ZodInt;
|
|
182
|
+
semantic: z.ZodArray<z.ZodString>;
|
|
183
|
+
themeCategories: z.ZodArray<z.ZodString>;
|
|
184
|
+
}, z.core.$loose>;
|
|
185
|
+
viewport: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
186
|
+
detection: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
187
|
+
}, z.core.$loose>;
|
|
188
|
+
status: z.ZodObject<{
|
|
189
|
+
tab: z.ZodObject<{
|
|
190
|
+
id: z.ZodString;
|
|
191
|
+
name: z.ZodString;
|
|
192
|
+
}, z.core.$loose>;
|
|
193
|
+
revision: z.ZodString;
|
|
194
|
+
dirty: z.ZodBoolean;
|
|
195
|
+
autosave: z.ZodBoolean;
|
|
196
|
+
unsaved: z.ZodArray<z.ZodObject<{
|
|
197
|
+
path: z.ZodString;
|
|
198
|
+
kind: z.ZodEnum<{
|
|
199
|
+
document: "document";
|
|
200
|
+
stylesheet: "stylesheet";
|
|
201
|
+
}>;
|
|
202
|
+
designs: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
added: z.ZodArray<z.ZodString>;
|
|
204
|
+
changed: z.ZodArray<z.ZodString>;
|
|
205
|
+
removed: z.ZodArray<z.ZodString>;
|
|
206
|
+
}, z.core.$loose>>;
|
|
207
|
+
modes: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
tokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
209
|
+
more: z.ZodOptional<z.ZodInt>;
|
|
210
|
+
}, z.core.$loose>>;
|
|
211
|
+
tokenEdits: z.ZodInt;
|
|
212
|
+
save: z.ZodObject<{
|
|
213
|
+
status: z.ZodEnum<{
|
|
214
|
+
failed: "failed";
|
|
215
|
+
saved: "saved";
|
|
216
|
+
saving: "saving";
|
|
217
|
+
unsaved: "unsaved";
|
|
218
|
+
}>;
|
|
219
|
+
error: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$loose>;
|
|
221
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
222
|
+
path: z.ZodString;
|
|
223
|
+
error: z.ZodString;
|
|
224
|
+
}, z.core.$loose>>;
|
|
225
|
+
undo: z.ZodObject<{
|
|
226
|
+
count: z.ZodInt;
|
|
227
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
228
|
+
}, z.core.$loose>;
|
|
229
|
+
redo: z.ZodObject<{
|
|
230
|
+
count: z.ZodInt;
|
|
231
|
+
labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
232
|
+
}, z.core.$loose>;
|
|
233
|
+
}, z.core.$loose>;
|
|
234
|
+
modes: z.ZodObject<{
|
|
235
|
+
tab: z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
name: z.ZodString;
|
|
238
|
+
}, z.core.$loose>;
|
|
239
|
+
variables: z.ZodArray<z.ZodObject<{
|
|
240
|
+
id: z.ZodString;
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
kind: z.ZodEnum<{
|
|
243
|
+
custom: "custom";
|
|
244
|
+
locale: "locale";
|
|
245
|
+
theme: "theme";
|
|
246
|
+
viewport: "viewport";
|
|
247
|
+
}>;
|
|
248
|
+
options: z.ZodArray<z.ZodObject<{
|
|
249
|
+
id: z.ZodString;
|
|
250
|
+
name: z.ZodString;
|
|
251
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
device: z.ZodOptional<z.ZodString>;
|
|
254
|
+
className: z.ZodOptional<z.ZodString>;
|
|
255
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
256
|
+
}, z.core.$loose>>;
|
|
257
|
+
}, z.core.$loose>>;
|
|
258
|
+
viewports: z.ZodArray<z.ZodObject<{
|
|
259
|
+
id: z.ZodString;
|
|
260
|
+
name: z.ZodString;
|
|
261
|
+
width: z.ZodNumber;
|
|
262
|
+
height: z.ZodNumber;
|
|
263
|
+
device: z.ZodOptional<z.ZodString>;
|
|
264
|
+
}, z.core.$loose>>;
|
|
265
|
+
modes: z.ZodArray<z.ZodObject<{
|
|
266
|
+
id: z.ZodString;
|
|
267
|
+
name: z.ZodString;
|
|
268
|
+
primary: z.ZodBoolean;
|
|
269
|
+
viewport: z.ZodString;
|
|
270
|
+
width: z.ZodNumber;
|
|
271
|
+
height: z.ZodNumber;
|
|
272
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
273
|
+
classNames: z.ZodArray<z.ZodString>;
|
|
274
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
275
|
+
}, z.core.$loose>>;
|
|
276
|
+
designs: z.ZodArray<z.ZodObject<{
|
|
277
|
+
id: z.ZodString;
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
state: z.ZodString;
|
|
280
|
+
states: z.ZodArray<z.ZodString>;
|
|
281
|
+
main: z.ZodString;
|
|
282
|
+
beside: z.ZodArray<z.ZodString>;
|
|
283
|
+
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
284
|
+
mode: z.ZodString;
|
|
285
|
+
width: z.ZodNumber;
|
|
286
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
287
|
+
window: z.ZodObject<{
|
|
288
|
+
width: z.ZodNumber;
|
|
289
|
+
height: z.ZodNumber;
|
|
290
|
+
}, z.core.$loose>;
|
|
291
|
+
}, z.core.$loose>>>;
|
|
292
|
+
}, z.core.$loose>>;
|
|
293
|
+
}, z.core.$loose>;
|
|
294
|
+
open: z.ZodObject<{
|
|
295
|
+
id: z.ZodString;
|
|
296
|
+
name: z.ZodString;
|
|
297
|
+
root: z.ZodString;
|
|
298
|
+
active: z.ZodBoolean;
|
|
299
|
+
status: z.ZodEnum<{
|
|
300
|
+
error: "error";
|
|
301
|
+
loading: "loading";
|
|
302
|
+
ready: "ready";
|
|
303
|
+
}>;
|
|
304
|
+
error: z.ZodOptional<z.ZodString>;
|
|
305
|
+
designs: z.ZodInt;
|
|
306
|
+
}, z.core.$loose>;
|
|
307
|
+
exec: z.ZodObject<{
|
|
308
|
+
ok: z.ZodBoolean;
|
|
309
|
+
applied: z.ZodBoolean;
|
|
310
|
+
output: z.ZodArray<z.ZodString>;
|
|
311
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
312
|
+
warningGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
313
|
+
category: z.ZodString;
|
|
314
|
+
severity: z.ZodEnum<{
|
|
315
|
+
error: "error";
|
|
316
|
+
suggestion: "suggestion";
|
|
317
|
+
warning: "warning";
|
|
318
|
+
}>;
|
|
319
|
+
message: z.ZodString;
|
|
320
|
+
count: z.ZodInt;
|
|
321
|
+
at: z.ZodArray<z.ZodString>;
|
|
322
|
+
}, z.core.$loose>>>;
|
|
323
|
+
error: z.ZodOptional<z.ZodString>;
|
|
324
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
325
|
+
editId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
created: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
327
|
+
discarded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
328
|
+
design: z.ZodString;
|
|
329
|
+
replaced: z.ZodString;
|
|
330
|
+
replacement: z.ZodString;
|
|
331
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
name: z.ZodOptional<z.ZodString>;
|
|
334
|
+
viewports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
|
+
states: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
336
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
337
|
+
}, z.core.$loose>>;
|
|
338
|
+
}, z.core.$loose>>>;
|
|
339
|
+
screenshots: z.ZodArray<z.ZodObject<{
|
|
340
|
+
path: z.ZodString;
|
|
341
|
+
png: z.ZodString;
|
|
342
|
+
design: z.ZodString;
|
|
343
|
+
state: z.ZodString;
|
|
344
|
+
mode: z.ZodString;
|
|
345
|
+
}, z.core.$loose>>;
|
|
346
|
+
}, z.core.$loose>;
|
|
347
|
+
screenshot: z.ZodObject<{
|
|
348
|
+
ok: z.ZodBoolean;
|
|
349
|
+
applied: z.ZodBoolean;
|
|
350
|
+
output: z.ZodArray<z.ZodString>;
|
|
351
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
352
|
+
warningGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
353
|
+
category: z.ZodString;
|
|
354
|
+
severity: z.ZodEnum<{
|
|
355
|
+
error: "error";
|
|
356
|
+
suggestion: "suggestion";
|
|
357
|
+
warning: "warning";
|
|
358
|
+
}>;
|
|
359
|
+
message: z.ZodString;
|
|
360
|
+
count: z.ZodInt;
|
|
361
|
+
at: z.ZodArray<z.ZodString>;
|
|
362
|
+
}, z.core.$loose>>>;
|
|
363
|
+
error: z.ZodOptional<z.ZodString>;
|
|
364
|
+
details: z.ZodOptional<z.ZodUnknown>;
|
|
365
|
+
editId: z.ZodOptional<z.ZodString>;
|
|
366
|
+
created: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
367
|
+
discarded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
368
|
+
design: z.ZodString;
|
|
369
|
+
replaced: z.ZodString;
|
|
370
|
+
replacement: z.ZodString;
|
|
371
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
372
|
+
id: z.ZodString;
|
|
373
|
+
name: z.ZodOptional<z.ZodString>;
|
|
374
|
+
viewports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
states: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
376
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
377
|
+
}, z.core.$loose>>;
|
|
378
|
+
}, z.core.$loose>>>;
|
|
379
|
+
screenshots: z.ZodArray<z.ZodObject<{
|
|
380
|
+
path: z.ZodString;
|
|
381
|
+
png: z.ZodString;
|
|
382
|
+
design: z.ZodString;
|
|
383
|
+
state: z.ZodString;
|
|
384
|
+
mode: z.ZodString;
|
|
385
|
+
}, z.core.$loose>>;
|
|
386
|
+
}, z.core.$loose>;
|
|
387
|
+
problems: z.ZodObject<{
|
|
388
|
+
tab: z.ZodObject<{
|
|
389
|
+
id: z.ZodString;
|
|
390
|
+
name: z.ZodString;
|
|
391
|
+
}, z.core.$loose>;
|
|
392
|
+
design: z.ZodObject<{
|
|
393
|
+
id: z.ZodString;
|
|
394
|
+
name: z.ZodString;
|
|
395
|
+
}, z.core.$loose>;
|
|
396
|
+
problems: z.ZodArray<z.ZodObject<{
|
|
397
|
+
state: z.ZodString;
|
|
398
|
+
mode: z.ZodString;
|
|
399
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
400
|
+
clipped: "clipped";
|
|
401
|
+
"content-wider": "content-wider";
|
|
402
|
+
"frame-overflow": "frame-overflow";
|
|
403
|
+
"render-error": "render-error";
|
|
404
|
+
"unknown-component": "unknown-component";
|
|
405
|
+
}>>;
|
|
406
|
+
problem: z.ZodString;
|
|
407
|
+
node: z.ZodOptional<z.ZodString>;
|
|
408
|
+
name: z.ZodOptional<z.ZodString>;
|
|
409
|
+
box: z.ZodOptional<z.ZodObject<{
|
|
410
|
+
x: z.ZodNumber;
|
|
411
|
+
y: z.ZodNumber;
|
|
412
|
+
width: z.ZodNumber;
|
|
413
|
+
height: z.ZodNumber;
|
|
414
|
+
}, z.core.$loose>>;
|
|
415
|
+
container: z.ZodOptional<z.ZodObject<{
|
|
416
|
+
node: z.ZodOptional<z.ZodString>;
|
|
417
|
+
name: z.ZodOptional<z.ZodString>;
|
|
418
|
+
box: z.ZodObject<{
|
|
419
|
+
x: z.ZodNumber;
|
|
420
|
+
y: z.ZodNumber;
|
|
421
|
+
width: z.ZodNumber;
|
|
422
|
+
height: z.ZodNumber;
|
|
423
|
+
}, z.core.$loose>;
|
|
424
|
+
}, z.core.$loose>>;
|
|
425
|
+
overflow: z.ZodOptional<z.ZodObject<{
|
|
426
|
+
left: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
right: z.ZodOptional<z.ZodNumber>;
|
|
428
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
bottom: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
}, z.core.$loose>>;
|
|
431
|
+
}, z.core.$loose>>;
|
|
432
|
+
frames: z.ZodInt;
|
|
433
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
434
|
+
}, z.core.$loose>;
|
|
435
|
+
accessibility: z.ZodObject<{
|
|
436
|
+
tab: z.ZodObject<{
|
|
437
|
+
id: z.ZodString;
|
|
438
|
+
name: z.ZodString;
|
|
439
|
+
}, z.core.$loose>;
|
|
440
|
+
design: z.ZodObject<{
|
|
441
|
+
id: z.ZodString;
|
|
442
|
+
name: z.ZodString;
|
|
443
|
+
}, z.core.$loose>;
|
|
444
|
+
findings: z.ZodArray<z.ZodObject<{
|
|
445
|
+
state: z.ZodString;
|
|
446
|
+
mode: z.ZodString;
|
|
447
|
+
rule: z.ZodString;
|
|
448
|
+
impact: z.ZodEnum<{
|
|
449
|
+
critical: "critical";
|
|
450
|
+
minor: "minor";
|
|
451
|
+
moderate: "moderate";
|
|
452
|
+
serious: "serious";
|
|
453
|
+
}>;
|
|
454
|
+
help: z.ZodString;
|
|
455
|
+
helpUrl: z.ZodString;
|
|
456
|
+
node: z.ZodOptional<z.ZodString>;
|
|
457
|
+
name: z.ZodOptional<z.ZodString>;
|
|
458
|
+
detail: z.ZodString;
|
|
459
|
+
contrast: z.ZodOptional<z.ZodObject<{
|
|
460
|
+
fix: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"none">, z.ZodObject<{
|
|
461
|
+
token: z.ZodString;
|
|
462
|
+
ratio: z.ZodNumber;
|
|
463
|
+
}, z.core.$loose>]>>;
|
|
464
|
+
}, z.core.$loose>>;
|
|
465
|
+
}, z.core.$loose>>;
|
|
466
|
+
frames: z.ZodInt;
|
|
467
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
468
|
+
}, z.core.$loose>;
|
|
469
|
+
console: z.ZodObject<{
|
|
470
|
+
tab: z.ZodObject<{
|
|
471
|
+
id: z.ZodString;
|
|
472
|
+
name: z.ZodString;
|
|
473
|
+
}, z.core.$loose>;
|
|
474
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
475
|
+
level: z.ZodEnum<{
|
|
476
|
+
debug: "debug";
|
|
477
|
+
error: "error";
|
|
478
|
+
info: "info";
|
|
479
|
+
warning: "warning";
|
|
480
|
+
}>;
|
|
481
|
+
text: z.ZodString;
|
|
482
|
+
source: z.ZodString;
|
|
483
|
+
line: z.ZodInt;
|
|
484
|
+
where: z.ZodEnum<{
|
|
485
|
+
canvas: "canvas";
|
|
486
|
+
offscreen: "offscreen";
|
|
487
|
+
}>;
|
|
488
|
+
count: z.ZodInt;
|
|
489
|
+
first: z.ZodNumber;
|
|
490
|
+
last: z.ZodNumber;
|
|
491
|
+
}, z.core.$loose>>;
|
|
492
|
+
}, z.core.$loose>;
|
|
493
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
494
|
+
name: z.ZodString;
|
|
495
|
+
category: z.ZodString;
|
|
496
|
+
source: z.ZodString;
|
|
497
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
498
|
+
}, z.core.$loose>>;
|
|
499
|
+
components: z.ZodObject<{
|
|
500
|
+
components: z.ZodArray<z.ZodString>;
|
|
501
|
+
iconLibraries: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
502
|
+
leftOut: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
503
|
+
name: z.ZodString;
|
|
504
|
+
path: z.ZodString;
|
|
505
|
+
reason: z.ZodString;
|
|
506
|
+
undecided: z.ZodOptional<z.ZodBoolean>;
|
|
507
|
+
}, z.core.$loose>>>;
|
|
508
|
+
drawn: z.ZodOptional<z.ZodInt>;
|
|
509
|
+
failing: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
510
|
+
id: z.ZodString;
|
|
511
|
+
problem: z.ZodEnum<{
|
|
512
|
+
async: "async";
|
|
513
|
+
error: "error";
|
|
514
|
+
provider: "provider";
|
|
515
|
+
server: "server";
|
|
516
|
+
}>;
|
|
517
|
+
reason: z.ZodString;
|
|
518
|
+
}, z.core.$loose>>>;
|
|
519
|
+
corrections: z.ZodOptional<z.ZodObject<{
|
|
520
|
+
include: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
521
|
+
path: z.ZodString;
|
|
522
|
+
export: z.ZodString;
|
|
523
|
+
}, z.core.$loose>>>;
|
|
524
|
+
}, z.core.$loose>>;
|
|
525
|
+
}, z.core.$loose>;
|
|
526
|
+
props: z.ZodObject<{
|
|
527
|
+
component: z.ZodString;
|
|
528
|
+
path: z.ZodOptional<z.ZodString>;
|
|
529
|
+
import: z.ZodOptional<z.ZodString>;
|
|
530
|
+
known: z.ZodBoolean;
|
|
531
|
+
props: z.ZodArray<z.ZodObject<{
|
|
532
|
+
name: z.ZodString;
|
|
533
|
+
kind: z.ZodEnum<{
|
|
534
|
+
boolean: "boolean";
|
|
535
|
+
enum: "enum";
|
|
536
|
+
function: "function";
|
|
537
|
+
node: "node";
|
|
538
|
+
number: "number";
|
|
539
|
+
object: "object";
|
|
540
|
+
string: "string";
|
|
541
|
+
unknown: "unknown";
|
|
542
|
+
}>;
|
|
543
|
+
group: z.ZodEnum<{
|
|
544
|
+
aria: "aria";
|
|
545
|
+
event: "event";
|
|
546
|
+
html: "html";
|
|
547
|
+
own: "own";
|
|
548
|
+
variant: "variant";
|
|
549
|
+
}>;
|
|
550
|
+
options: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
551
|
+
default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
552
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
553
|
+
type: z.ZodOptional<z.ZodString>;
|
|
554
|
+
description: z.ZodOptional<z.ZodString>;
|
|
555
|
+
}, z.core.$loose>>;
|
|
556
|
+
composition: z.ZodOptional<z.ZodObject<{
|
|
557
|
+
role: z.ZodEnum<{
|
|
558
|
+
component: "component";
|
|
559
|
+
provider: "provider";
|
|
560
|
+
wrapper: "wrapper";
|
|
561
|
+
}>;
|
|
562
|
+
parents: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
563
|
+
status: z.ZodLiteral<"listed">;
|
|
564
|
+
chain: z.ZodArray<z.ZodObject<{
|
|
565
|
+
component: z.ZodString;
|
|
566
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
567
|
+
}, z.core.$loose>>;
|
|
568
|
+
from: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
570
|
+
status: z.ZodLiteral<"none">;
|
|
571
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
572
|
+
status: z.ZodLiteral<"unknown">;
|
|
573
|
+
reason: z.ZodString;
|
|
574
|
+
}, z.core.$loose>], "status">;
|
|
575
|
+
holds: z.ZodArray<z.ZodString>;
|
|
576
|
+
slots: z.ZodArray<z.ZodObject<{
|
|
577
|
+
name: z.ZodString;
|
|
578
|
+
key: z.ZodString;
|
|
579
|
+
kind: z.ZodEnum<{
|
|
580
|
+
children: "children";
|
|
581
|
+
element: "element";
|
|
582
|
+
render: "render";
|
|
583
|
+
}>;
|
|
584
|
+
}, z.core.$loose>>;
|
|
585
|
+
example: z.ZodObject<{
|
|
586
|
+
node: z.ZodUnknown;
|
|
587
|
+
status: z.ZodEnum<{
|
|
588
|
+
drawn: "drawn";
|
|
589
|
+
failing: "failing";
|
|
590
|
+
untried: "untried";
|
|
591
|
+
}>;
|
|
592
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
593
|
+
}, z.core.$loose>;
|
|
594
|
+
}, z.core.$loose>>;
|
|
595
|
+
}, z.core.$loose>;
|
|
596
|
+
};
|
|
597
|
+
declare const tabsResult: z.ZodObject<{
|
|
598
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
599
|
+
id: z.ZodString;
|
|
600
|
+
name: z.ZodString;
|
|
601
|
+
root: z.ZodString;
|
|
602
|
+
active: z.ZodBoolean;
|
|
603
|
+
status: z.ZodEnum<{
|
|
604
|
+
error: "error";
|
|
605
|
+
loading: "loading";
|
|
606
|
+
ready: "ready";
|
|
607
|
+
}>;
|
|
608
|
+
error: z.ZodOptional<z.ZodString>;
|
|
609
|
+
designs: z.ZodInt;
|
|
610
|
+
}, z.core.$loose>>;
|
|
611
|
+
}, z.core.$loose>;
|
|
612
|
+
declare const consoleResult: z.ZodObject<{
|
|
613
|
+
tab: z.ZodObject<{
|
|
614
|
+
id: z.ZodString;
|
|
615
|
+
name: z.ZodString;
|
|
616
|
+
}, z.core.$loose>;
|
|
617
|
+
total: z.ZodInt;
|
|
618
|
+
truncated: z.ZodBoolean;
|
|
619
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
620
|
+
level: z.ZodEnum<{
|
|
621
|
+
debug: "debug";
|
|
622
|
+
error: "error";
|
|
623
|
+
info: "info";
|
|
624
|
+
warning: "warning";
|
|
625
|
+
}>;
|
|
626
|
+
text: z.ZodString;
|
|
627
|
+
source: z.ZodString;
|
|
628
|
+
line: z.ZodInt;
|
|
629
|
+
where: z.ZodEnum<{
|
|
630
|
+
canvas: "canvas";
|
|
631
|
+
offscreen: "offscreen";
|
|
632
|
+
}>;
|
|
633
|
+
count: z.ZodInt;
|
|
634
|
+
first: z.ZodNumber;
|
|
635
|
+
last: z.ZodNumber;
|
|
636
|
+
}, z.core.$loose>>;
|
|
637
|
+
}, z.core.$loose>;
|
|
638
|
+
declare const tokensResult: z.ZodObject<{
|
|
639
|
+
total: z.ZodInt;
|
|
640
|
+
truncated: z.ZodBoolean;
|
|
641
|
+
tokens: z.ZodArray<z.ZodObject<{
|
|
642
|
+
name: z.ZodString;
|
|
643
|
+
category: z.ZodString;
|
|
644
|
+
source: z.ZodString;
|
|
645
|
+
values: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
646
|
+
}, z.core.$loose>>;
|
|
647
|
+
}, z.core.$loose>;
|
|
648
|
+
type TabsResponse = z.output<typeof tabsResult>;
|
|
649
|
+
type ConsoleResponse = z.output<typeof consoleResult>;
|
|
650
|
+
type TokensResponse = z.output<typeof tokensResult>;
|
|
651
|
+
/** What the app answers: a failure's message, with its details beside it when the app knew the cause. */
|
|
652
|
+
type ExecReply = z.output<typeof replies.exec>;
|
|
653
|
+
type Screenshot = ExecReply["screenshots"][number];
|
|
654
|
+
type Edit = z.output<(typeof requests.exec.options)[1]>["edits"][number];
|
|
655
|
+
/** The canonical result: the reply with its failure as one error, which carries the editId to retry a snippet by. */
|
|
656
|
+
declare const execResult: z.ZodObject<{
|
|
657
|
+
ok: z.ZodBoolean;
|
|
658
|
+
applied: z.ZodBoolean;
|
|
659
|
+
output: z.ZodArray<z.ZodString>;
|
|
660
|
+
warnings: z.ZodArray<z.ZodString>;
|
|
661
|
+
warningGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
662
|
+
category: z.ZodString;
|
|
663
|
+
severity: z.ZodEnum<{
|
|
664
|
+
error: "error";
|
|
665
|
+
suggestion: "suggestion";
|
|
666
|
+
warning: "warning";
|
|
667
|
+
}>;
|
|
668
|
+
message: z.ZodString;
|
|
669
|
+
count: z.ZodInt;
|
|
670
|
+
at: z.ZodArray<z.ZodString>;
|
|
671
|
+
}, z.core.$loose>>>;
|
|
672
|
+
created: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
673
|
+
discarded: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
674
|
+
design: z.ZodString;
|
|
675
|
+
replaced: z.ZodString;
|
|
676
|
+
replacement: z.ZodString;
|
|
677
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
678
|
+
id: z.ZodString;
|
|
679
|
+
name: z.ZodOptional<z.ZodString>;
|
|
680
|
+
viewports: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
681
|
+
states: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
682
|
+
variants: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
683
|
+
}, z.core.$loose>>;
|
|
684
|
+
}, z.core.$loose>>>;
|
|
685
|
+
screenshots: z.ZodArray<z.ZodObject<{
|
|
686
|
+
path: z.ZodString;
|
|
687
|
+
png: z.ZodString;
|
|
688
|
+
design: z.ZodString;
|
|
689
|
+
state: z.ZodString;
|
|
690
|
+
mode: z.ZodString;
|
|
691
|
+
}, z.core.$loose>>;
|
|
692
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
code: z.ZodEnum<{
|
|
694
|
+
ambiguous_reference: "ambiguous_reference";
|
|
695
|
+
app_error: "app_error";
|
|
696
|
+
conflict: "conflict";
|
|
697
|
+
execution_failed: "execution_failed";
|
|
698
|
+
invalid_input: "invalid_input";
|
|
699
|
+
not_answering: "not_answering";
|
|
700
|
+
not_running: "not_running";
|
|
701
|
+
tab_not_ready: "tab_not_ready";
|
|
702
|
+
unknown_component: "unknown_component";
|
|
703
|
+
unknown_design: "unknown_design";
|
|
704
|
+
unknown_edit_id: "unknown_edit_id";
|
|
705
|
+
unknown_icon_set: "unknown_icon_set";
|
|
706
|
+
unknown_mode: "unknown_mode";
|
|
707
|
+
unknown_node: "unknown_node";
|
|
708
|
+
unknown_state: "unknown_state";
|
|
709
|
+
unknown_tab: "unknown_tab";
|
|
710
|
+
unknown_viewport: "unknown_viewport";
|
|
711
|
+
}>;
|
|
712
|
+
message: z.ZodString;
|
|
713
|
+
retryable: z.ZodBoolean;
|
|
714
|
+
path: z.ZodOptional<z.ZodString>;
|
|
715
|
+
alternatives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
716
|
+
editId: z.ZodOptional<z.ZodString>;
|
|
717
|
+
}, z.core.$strip>>;
|
|
718
|
+
}, z.core.$loose>;
|
|
719
|
+
type ExecResponse = z.output<typeof execResult>;
|
|
80
720
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
721
|
+
* A failed call, the same in CLI `--json` and MCP `structuredContent`: a stable code to branch on, the message people
|
|
722
|
+
* read, whether the same request can succeed when sent again, the input at fault, and what to use instead. What each
|
|
723
|
+
* field means is in the CLI's README and the skill, too.
|
|
83
724
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
725
|
+
declare const failure: z.ZodObject<{
|
|
726
|
+
code: z.ZodEnum<{
|
|
727
|
+
ambiguous_reference: "ambiguous_reference";
|
|
728
|
+
app_error: "app_error";
|
|
729
|
+
conflict: "conflict";
|
|
730
|
+
execution_failed: "execution_failed";
|
|
731
|
+
invalid_input: "invalid_input";
|
|
732
|
+
not_answering: "not_answering";
|
|
733
|
+
not_running: "not_running";
|
|
734
|
+
tab_not_ready: "tab_not_ready";
|
|
735
|
+
unknown_component: "unknown_component";
|
|
736
|
+
unknown_design: "unknown_design";
|
|
737
|
+
unknown_edit_id: "unknown_edit_id";
|
|
738
|
+
unknown_icon_set: "unknown_icon_set";
|
|
739
|
+
unknown_mode: "unknown_mode";
|
|
740
|
+
unknown_node: "unknown_node";
|
|
741
|
+
unknown_state: "unknown_state";
|
|
742
|
+
unknown_tab: "unknown_tab";
|
|
743
|
+
unknown_viewport: "unknown_viewport";
|
|
744
|
+
}>;
|
|
745
|
+
message: z.ZodString;
|
|
746
|
+
retryable: z.ZodBoolean;
|
|
747
|
+
path: z.ZodOptional<z.ZodString>;
|
|
748
|
+
alternatives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
749
|
+
editId: z.ZodOptional<z.ZodString>;
|
|
750
|
+
}, z.core.$strip>;
|
|
751
|
+
type OperationError = z.output<typeof failure>;
|
|
105
752
|
/**
|
|
106
753
|
* Where running copies of the app say how to reach them: `~/.parity/agents`, or the one file `PARITY_AGENT_FILE` names
|
|
107
754
|
* for a copy kept apart from the person's.
|
|
108
755
|
*/
|
|
109
756
|
export declare const registry: Registry;
|
|
757
|
+
/** One open project. */
|
|
758
|
+
export type TabSummary = z.output<typeof replies.open>;
|
|
759
|
+
export type StateResponse = z.output<typeof replies.state>;
|
|
760
|
+
export type StatusResponse = z.output<typeof replies.status>;
|
|
761
|
+
export type ModesResponse = z.output<typeof replies.modes>;
|
|
762
|
+
export type AccessibilityResponse = z.output<typeof replies.accessibility>;
|
|
763
|
+
export type AccessibilityFinding = AccessibilityResponse["findings"][number];
|
|
764
|
+
export type ProblemsResponse = z.output<typeof replies.problems>;
|
|
765
|
+
export type Problem = ProblemsResponse["problems"][number];
|
|
766
|
+
/** A box in a frame, in CSS pixels from its top left corner. */
|
|
767
|
+
export type FrameBox = NonNullable<Problem["box"]>;
|
|
768
|
+
export type TokenInfo = z.output<typeof replies.tokens>[number];
|
|
769
|
+
export type ComponentsResponse = z.output<typeof replies.components>;
|
|
770
|
+
/** One of the app's exports, by its file and export name. */
|
|
771
|
+
export type ComponentRef = NonNullable<NonNullable<ComponentsResponse["corrections"]>["include"]>[number];
|
|
772
|
+
export type PropsResponse = z.output<typeof replies.props>;
|
|
773
|
+
/** A component's composition, as `@parity-app/editor`'s `componentComposition` reads it. */
|
|
774
|
+
export type Composition = NonNullable<PropsResponse["composition"]>;
|
|
775
|
+
export type ConsoleEntry = z.output<typeof replies.console>["entries"][number];
|
|
110
776
|
/**
|
|
111
777
|
* Names who's calling in later calls, so the canvas can say who's at work. The MCP server learns the name from its
|
|
112
778
|
* client, and is one session: its calls share an id, apart from any other session of the same agent.
|
|
@@ -119,327 +785,35 @@ export declare function setCaller(name: string | undefined, session?: boolean):
|
|
|
119
785
|
export type Routing = "tab" | "open" | "copies";
|
|
120
786
|
/**
|
|
121
787
|
* Calls the running Parity app: the copy that has the call's project open, with the exact tab it chose, by the rules
|
|
122
|
-
* in `@parity-app/agent/routing
|
|
123
|
-
* project, or the call fails: the app's own code when it gives one.
|
|
788
|
+
* in `@parity-app/agent/routing`, and returns its answer once `reply` has checked it. Fails with a clear message, and a
|
|
789
|
+
* code, when no copy is running, none has the project, or the call fails: the app's own code when it gives one.
|
|
124
790
|
*/
|
|
125
|
-
export declare function call<
|
|
791
|
+
export declare function call<Reply extends z.ZodType>(method: string, params: Record<string, unknown>, routing: Routing, reply: Reply): Promise<z.output<Reply>>;
|
|
126
792
|
/** A readable account of an exec call, for terminals and for agents. */
|
|
127
793
|
export declare function describeExec(result: ExecResponse): string;
|
|
128
|
-
/** One open project. */
|
|
129
|
-
export interface TabSummary {
|
|
130
|
-
id: string;
|
|
131
|
-
name: string;
|
|
132
|
-
root: string;
|
|
133
|
-
active: boolean;
|
|
134
|
-
status: "loading" | "ready" | "error";
|
|
135
|
-
error?: string;
|
|
136
|
-
designs: number;
|
|
137
|
-
}
|
|
138
|
-
export interface TabsResponse {
|
|
139
|
-
tabs: TabSummary[];
|
|
140
|
-
}
|
|
141
|
-
export interface StatusResponse {
|
|
142
|
-
tab: {
|
|
143
|
-
id: string;
|
|
144
|
-
name: string;
|
|
145
|
-
};
|
|
146
|
-
/** Opaque: the same only while nothing in the tab has changed. */
|
|
147
|
-
revision: string;
|
|
148
|
-
/** Something applied (and undoable) isn't on disk yet. */
|
|
149
|
-
dirty: boolean;
|
|
150
|
-
/** Changes save themselves a moment later; otherwise they wait for the person to save. */
|
|
151
|
-
autosave: boolean;
|
|
152
|
-
unsaved: {
|
|
153
|
-
path: string;
|
|
154
|
-
kind: "document" | "stylesheet";
|
|
155
|
-
designs?: {
|
|
156
|
-
added: string[];
|
|
157
|
-
changed: string[];
|
|
158
|
-
removed: string[];
|
|
159
|
-
};
|
|
160
|
-
modes?: boolean;
|
|
161
|
-
tokens?: string[];
|
|
162
|
-
more?: number;
|
|
163
|
-
}[];
|
|
164
|
-
tokenEdits: number;
|
|
165
|
-
save: {
|
|
166
|
-
status: "saved" | "unsaved" | "saving" | "failed";
|
|
167
|
-
error?: string;
|
|
168
|
-
};
|
|
169
|
-
errors: {
|
|
170
|
-
path: string;
|
|
171
|
-
error: string;
|
|
172
|
-
}[];
|
|
173
|
-
undo: {
|
|
174
|
-
count: number;
|
|
175
|
-
labels?: string[];
|
|
176
|
-
};
|
|
177
|
-
redo: {
|
|
178
|
-
count: number;
|
|
179
|
-
labels?: string[];
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
794
|
/** Where a tab's edits stand: the revision, what's applied and undoable, what's on disk, and what failed to write. */
|
|
183
795
|
export declare function describeStatus(result: StatusResponse): string;
|
|
184
|
-
export interface ModesResponse {
|
|
185
|
-
tab: {
|
|
186
|
-
id: string;
|
|
187
|
-
name: string;
|
|
188
|
-
};
|
|
189
|
-
variables: {
|
|
190
|
-
id: string;
|
|
191
|
-
name: string;
|
|
192
|
-
kind: "viewport" | "theme" | "locale" | "custom";
|
|
193
|
-
options: {
|
|
194
|
-
id: string;
|
|
195
|
-
name: string;
|
|
196
|
-
width?: number;
|
|
197
|
-
height?: number;
|
|
198
|
-
device?: string;
|
|
199
|
-
className?: string;
|
|
200
|
-
attributes?: Record<string, string>;
|
|
201
|
-
}[];
|
|
202
|
-
}[];
|
|
203
|
-
/** Viewport options: the ids Responsive takes, with the window each stands for. */
|
|
204
|
-
viewports: {
|
|
205
|
-
id: string;
|
|
206
|
-
name: string;
|
|
207
|
-
width: number;
|
|
208
|
-
height: number;
|
|
209
|
-
device?: string;
|
|
210
|
-
}[];
|
|
211
|
-
/** Modes: the ids renders take, each a combination of one option per variable. */
|
|
212
|
-
modes: {
|
|
213
|
-
id: string;
|
|
214
|
-
name: string;
|
|
215
|
-
primary: boolean;
|
|
216
|
-
viewport: string;
|
|
217
|
-
width: number;
|
|
218
|
-
height: number;
|
|
219
|
-
values: Record<string, string>;
|
|
220
|
-
classNames: string[];
|
|
221
|
-
attributes: Record<string, string>;
|
|
222
|
-
}[];
|
|
223
|
-
designs: {
|
|
224
|
-
id: string;
|
|
225
|
-
name: string;
|
|
226
|
-
state: string;
|
|
227
|
-
states: string[];
|
|
228
|
-
main: string;
|
|
229
|
-
beside: string[];
|
|
230
|
-
frames?: {
|
|
231
|
-
mode: string;
|
|
232
|
-
width: number;
|
|
233
|
-
height?: number;
|
|
234
|
-
window: {
|
|
235
|
-
width: number;
|
|
236
|
-
height: number;
|
|
237
|
-
};
|
|
238
|
-
}[];
|
|
239
|
-
}[];
|
|
240
|
-
}
|
|
241
796
|
/**
|
|
242
797
|
* The project's viewports (what Responsive takes), its other variables, its modes (what renders take) and what each
|
|
243
798
|
* design's board shows, with a named design's frames.
|
|
244
799
|
*/
|
|
245
800
|
export declare function describeModes(result: ModesResponse): string;
|
|
246
|
-
export interface AccessibilityFinding {
|
|
247
|
-
state: string;
|
|
248
|
-
mode: string;
|
|
249
|
-
rule: string;
|
|
250
|
-
impact: "critical" | "serious" | "moderate" | "minor";
|
|
251
|
-
help: string;
|
|
252
|
-
helpUrl: string;
|
|
253
|
-
node?: string;
|
|
254
|
-
name?: string;
|
|
255
|
-
detail: string;
|
|
256
|
-
/** For a contrast failure: the token to color the layer's text with, or `"none"` when none of the project's pass. */
|
|
257
|
-
contrast?: {
|
|
258
|
-
fix?: {
|
|
259
|
-
token: string;
|
|
260
|
-
ratio: number;
|
|
261
|
-
} | "none";
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
export interface AccessibilityResponse {
|
|
265
|
-
tab: {
|
|
266
|
-
id: string;
|
|
267
|
-
name: string;
|
|
268
|
-
};
|
|
269
|
-
design: {
|
|
270
|
-
id: string;
|
|
271
|
-
name: string;
|
|
272
|
-
};
|
|
273
|
-
findings: AccessibilityFinding[];
|
|
274
|
-
frames: number;
|
|
275
|
-
warnings: string[];
|
|
276
|
-
}
|
|
277
801
|
/**
|
|
278
802
|
* A readable account of an accessibility check: each rule broken, worst first, with the layers that break it, the
|
|
279
803
|
* frames they break it in and what's wrong. Alike layers, such as the rows of a list, share a line.
|
|
280
804
|
*/
|
|
281
805
|
export declare function describeAccessibility(result: AccessibilityResponse): string;
|
|
282
|
-
export interface ProblemsResponse {
|
|
283
|
-
tab: {
|
|
284
|
-
id: string;
|
|
285
|
-
name: string;
|
|
286
|
-
};
|
|
287
|
-
design: {
|
|
288
|
-
id: string;
|
|
289
|
-
name: string;
|
|
290
|
-
};
|
|
291
|
-
problems: Problem[];
|
|
292
|
-
frames: number;
|
|
293
|
-
warnings: string[];
|
|
294
|
-
}
|
|
295
|
-
/** A box in a frame, in CSS pixels from its top left corner. */
|
|
296
|
-
export interface FrameBox {
|
|
297
|
-
x: number;
|
|
298
|
-
y: number;
|
|
299
|
-
width: number;
|
|
300
|
-
height: number;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* One problem in one frame. Layout problems (`frame-overflow`, `clipped`) name the node, what it overflows (the node
|
|
304
|
-
* that clips it, or the frame, which has none), both boxes, and how far past each edge it reaches.
|
|
305
|
-
*/
|
|
306
|
-
export interface Problem {
|
|
307
|
-
state: string;
|
|
308
|
-
mode: string;
|
|
309
|
-
kind?: "render-error" | "unknown-component" | "content-wider" | "frame-overflow" | "clipped";
|
|
310
|
-
problem: string;
|
|
311
|
-
node?: string;
|
|
312
|
-
name?: string;
|
|
313
|
-
box?: FrameBox;
|
|
314
|
-
container?: {
|
|
315
|
-
node?: string;
|
|
316
|
-
name?: string;
|
|
317
|
-
box: FrameBox;
|
|
318
|
-
};
|
|
319
|
-
overflow?: {
|
|
320
|
-
left?: number;
|
|
321
|
-
right?: number;
|
|
322
|
-
top?: number;
|
|
323
|
-
bottom?: number;
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
806
|
/** A readable account of the layout problems in a design's frames, each once with the frames it's in. */
|
|
327
807
|
export declare function describeProblems(result: ProblemsResponse): string;
|
|
328
|
-
export interface TokenInfo {
|
|
329
|
-
name: string;
|
|
330
|
-
category: string;
|
|
331
|
-
source: string;
|
|
332
|
-
values: Record<string, string>;
|
|
333
|
-
}
|
|
334
|
-
export interface TokensResponse {
|
|
335
|
-
tokens: TokenInfo[];
|
|
336
|
-
/** How many matched, before the limit. */
|
|
337
|
-
total: number;
|
|
338
|
-
truncated: boolean;
|
|
339
|
-
}
|
|
340
808
|
/** Tokens by category, each with its value in every theme that sets one. */
|
|
341
809
|
export declare function describeTokens({ tokens, total, truncated }: TokensResponse): string;
|
|
342
|
-
export interface ComponentsResponse {
|
|
343
|
-
components: string[];
|
|
344
|
-
iconLibraries?: string[];
|
|
345
|
-
/** The app's capitalised exports the type checker left out, with why. */
|
|
346
|
-
leftOut?: {
|
|
347
|
-
name: string;
|
|
348
|
-
path: string;
|
|
349
|
-
reason: string;
|
|
350
|
-
undecided?: true;
|
|
351
|
-
}[];
|
|
352
|
-
/** How many components have drawn on the canvas without errors so far. */
|
|
353
|
-
drawn?: number;
|
|
354
|
-
/** Components failing to draw on the canvas now: why in words, and the kind of problem. */
|
|
355
|
-
failing?: {
|
|
356
|
-
id: string;
|
|
357
|
-
problem: "provider" | "server" | "async" | "error";
|
|
358
|
-
reason: string;
|
|
359
|
-
}[];
|
|
360
|
-
/** The person's corrections in the main project file, saved or not: exports listed by hand. */
|
|
361
|
-
corrections?: {
|
|
362
|
-
include?: ComponentRef[];
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
/** One of the app's exports, by its file and export name. */
|
|
366
|
-
export interface ComponentRef {
|
|
367
|
-
path: string;
|
|
368
|
-
export: string;
|
|
369
|
-
}
|
|
370
810
|
/**
|
|
371
811
|
* The project's own components, then each library's, then the icon libraries, then the exports left out and why, the
|
|
372
812
|
* components failing to draw and why, and what the person corrected by hand.
|
|
373
813
|
*/
|
|
374
814
|
export declare function describeComponents({ components, iconLibraries, leftOut, drawn, failing, corrections }: ComponentsResponse): string;
|
|
375
|
-
export interface PropsResponse {
|
|
376
|
-
component: string;
|
|
377
|
-
path?: string;
|
|
378
|
-
/** What the project's code imports it from: a package, or the file through the app's alias. */
|
|
379
|
-
import?: string;
|
|
380
|
-
known: boolean;
|
|
381
|
-
props: {
|
|
382
|
-
name: string;
|
|
383
|
-
kind: string;
|
|
384
|
-
group?: string;
|
|
385
|
-
options?: (string | number | boolean)[];
|
|
386
|
-
default?: string | number | boolean | null;
|
|
387
|
-
required?: boolean;
|
|
388
|
-
}[];
|
|
389
|
-
/** What it needs around it and holds inside it, read from its library's metadata (PAR-454). */
|
|
390
|
-
composition?: Composition;
|
|
391
|
-
}
|
|
392
|
-
/** A component's composition, as `@parity-app/editor`'s `componentComposition` reads it. */
|
|
393
|
-
export interface Composition {
|
|
394
|
-
role: "provider" | "wrapper" | "component";
|
|
395
|
-
parents: {
|
|
396
|
-
status: "listed";
|
|
397
|
-
chain: {
|
|
398
|
-
component: string;
|
|
399
|
-
optional?: true;
|
|
400
|
-
}[];
|
|
401
|
-
from?: string;
|
|
402
|
-
} | {
|
|
403
|
-
status: "none";
|
|
404
|
-
} | {
|
|
405
|
-
status: "unknown";
|
|
406
|
-
reason: string;
|
|
407
|
-
};
|
|
408
|
-
holds: string[];
|
|
409
|
-
slots: {
|
|
410
|
-
name: string;
|
|
411
|
-
key: string;
|
|
412
|
-
kind: "children" | "element" | "render";
|
|
413
|
-
}[];
|
|
414
|
-
example: {
|
|
415
|
-
node: unknown;
|
|
416
|
-
status: "drawn" | "failing" | "untried";
|
|
417
|
-
reason?: string;
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
815
|
/** A component's props, with each variant's options and default, then what it needs around it and holds. */
|
|
421
816
|
export declare function describeProps(result: PropsResponse): string;
|
|
422
|
-
export interface ConsoleEntry {
|
|
423
|
-
level: "info" | "warning" | "error" | "debug";
|
|
424
|
-
text: string;
|
|
425
|
-
source: string;
|
|
426
|
-
line: number;
|
|
427
|
-
where: "canvas" | "offscreen";
|
|
428
|
-
count: number;
|
|
429
|
-
first: number;
|
|
430
|
-
last: number;
|
|
431
|
-
}
|
|
432
|
-
export interface ConsoleResponse {
|
|
433
|
-
tab: {
|
|
434
|
-
id: string;
|
|
435
|
-
name: string;
|
|
436
|
-
};
|
|
437
|
-
/** The newest entries, up to the limit, oldest first. */
|
|
438
|
-
entries: ConsoleEntry[];
|
|
439
|
-
/** How many there were, before the limit. */
|
|
440
|
-
total: number;
|
|
441
|
-
truncated: boolean;
|
|
442
|
-
}
|
|
443
817
|
/** A readable account of what a project's code wrote to the console, oldest first, with where each came from. */
|
|
444
818
|
export declare function describeConsole(result: ConsoleResponse): string;
|
|
445
|
-
export type { Edit, ExecResponse, OperationError, Screenshot };
|
|
819
|
+
export type { ConsoleResponse, Edit, ExecResponse, OperationError, Screenshot, TabsResponse, TokensResponse };
|