@vue/devtools-agent 0.0.0-stage → 9.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +180 -2
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +37 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/devframe.d.mts +7 -0
- package/dist/devframe.mjs +15 -0
- package/dist/devframe.mjs.map +1 -0
- package/dist/index.d.mts +498 -0
- package/dist/index.mjs +2 -0
- package/dist/node.d.mts +6 -0
- package/dist/node.mjs +15 -0
- package/dist/node.mjs.map +1 -0
- package/dist/session-1Buaf6lK.d.mts +28 -0
- package/dist/session-D7L9Vjbr.mjs +482 -0
- package/dist/session-D7L9Vjbr.mjs.map +1 -0
- package/package.json +57 -3
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import { a as VueDevtoolsAgentSnapshot, i as VueDevtoolsAgentPage, n as createVueDevtoolsAgentSession, r as VueDevtoolsAgentConnection, t as VueDevtoolsAgentSession } from "./session-1Buaf6lK.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/mcp/tools.d.ts
|
|
4
|
+
export declare function createVueDevtoolsAgentTools(connection: VueDevtoolsAgentConnection, page: VueDevtoolsAgentPage): {
|
|
5
|
+
'expand-value': {
|
|
6
|
+
type: "query" | "action";
|
|
7
|
+
jsonSerializable: true;
|
|
8
|
+
args: [z.ZodObject<{
|
|
9
|
+
appId: z.ZodString;
|
|
10
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
handle: z.ZodString;
|
|
14
|
+
path: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
}, z.core.$strict>];
|
|
16
|
+
returns: z.ZodObject<{
|
|
17
|
+
page: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
url: z.ZodString;
|
|
20
|
+
title: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
capturedAt: z.ZodNumber;
|
|
23
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
agent: {
|
|
26
|
+
description: string;
|
|
27
|
+
safety: "action" | "read";
|
|
28
|
+
};
|
|
29
|
+
handler(input: {
|
|
30
|
+
appId: string;
|
|
31
|
+
handle: string;
|
|
32
|
+
pageSize?: number | undefined;
|
|
33
|
+
page?: number | undefined;
|
|
34
|
+
snapshotId?: string | undefined;
|
|
35
|
+
path?: string[] | undefined;
|
|
36
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
37
|
+
};
|
|
38
|
+
'edit-component-state'?: {
|
|
39
|
+
type: "query" | "action";
|
|
40
|
+
jsonSerializable: true;
|
|
41
|
+
args: [z.ZodObject<{
|
|
42
|
+
appId: z.ZodString;
|
|
43
|
+
componentId: z.ZodString;
|
|
44
|
+
sectionId: z.ZodString;
|
|
45
|
+
path: z.ZodArray<z.ZodString>;
|
|
46
|
+
value: z.ZodJSONSchema;
|
|
47
|
+
}, z.core.$strict>];
|
|
48
|
+
returns: z.ZodObject<{
|
|
49
|
+
page: z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
url: z.ZodString;
|
|
52
|
+
title: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
capturedAt: z.ZodNumber;
|
|
55
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
agent: {
|
|
58
|
+
description: string;
|
|
59
|
+
safety: "action" | "read";
|
|
60
|
+
};
|
|
61
|
+
handler(input: {
|
|
62
|
+
appId: string;
|
|
63
|
+
componentId: string;
|
|
64
|
+
sectionId: string;
|
|
65
|
+
path: string[];
|
|
66
|
+
value: z.core.util.JSONType;
|
|
67
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
68
|
+
} | undefined;
|
|
69
|
+
'edit-inspector-state'?: {
|
|
70
|
+
type: "query" | "action";
|
|
71
|
+
jsonSerializable: true;
|
|
72
|
+
args: [z.ZodObject<{
|
|
73
|
+
appId: z.ZodString;
|
|
74
|
+
inspectorId: z.ZodString;
|
|
75
|
+
sectionId: z.ZodString;
|
|
76
|
+
path: z.ZodArray<z.ZodString>;
|
|
77
|
+
nodeId: z.ZodString;
|
|
78
|
+
value: z.ZodJSONSchema;
|
|
79
|
+
}, z.core.$strict>];
|
|
80
|
+
returns: z.ZodObject<{
|
|
81
|
+
page: z.ZodObject<{
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
url: z.ZodString;
|
|
84
|
+
title: z.ZodString;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
capturedAt: z.ZodNumber;
|
|
87
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
agent: {
|
|
90
|
+
description: string;
|
|
91
|
+
safety: "action" | "read";
|
|
92
|
+
};
|
|
93
|
+
handler(input: {
|
|
94
|
+
appId: string;
|
|
95
|
+
inspectorId: string;
|
|
96
|
+
sectionId: string;
|
|
97
|
+
path: string[];
|
|
98
|
+
nodeId: string;
|
|
99
|
+
value: z.core.util.JSONType;
|
|
100
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
101
|
+
} | undefined;
|
|
102
|
+
'list-apps': {
|
|
103
|
+
args: never[];
|
|
104
|
+
handler: () => Promise<VueDevtoolsAgentSnapshot>;
|
|
105
|
+
type: "query" | "action";
|
|
106
|
+
jsonSerializable: true;
|
|
107
|
+
returns: z.ZodObject<{
|
|
108
|
+
page: z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
url: z.ZodString;
|
|
111
|
+
title: z.ZodString;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
capturedAt: z.ZodNumber;
|
|
114
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
agent: {
|
|
117
|
+
description: string;
|
|
118
|
+
safety: "action" | "read";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
'list-plugins': {
|
|
122
|
+
args: never[];
|
|
123
|
+
handler: () => Promise<VueDevtoolsAgentSnapshot>;
|
|
124
|
+
type: "query" | "action";
|
|
125
|
+
jsonSerializable: true;
|
|
126
|
+
returns: z.ZodObject<{
|
|
127
|
+
page: z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
url: z.ZodString;
|
|
130
|
+
title: z.ZodString;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
capturedAt: z.ZodNumber;
|
|
133
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
agent: {
|
|
136
|
+
description: string;
|
|
137
|
+
safety: "action" | "read";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
'runtime-health': {
|
|
141
|
+
args: never[];
|
|
142
|
+
handler: () => Promise<VueDevtoolsAgentSnapshot>;
|
|
143
|
+
type: "query" | "action";
|
|
144
|
+
jsonSerializable: true;
|
|
145
|
+
returns: z.ZodObject<{
|
|
146
|
+
page: z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
url: z.ZodString;
|
|
149
|
+
title: z.ZodString;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
capturedAt: z.ZodNumber;
|
|
152
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
agent: {
|
|
155
|
+
description: string;
|
|
156
|
+
safety: "action" | "read";
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
'component-tree': {
|
|
160
|
+
type: "query" | "action";
|
|
161
|
+
jsonSerializable: true;
|
|
162
|
+
args: [z.ZodObject<{
|
|
163
|
+
appId: z.ZodString;
|
|
164
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, z.core.$strict>];
|
|
166
|
+
returns: z.ZodObject<{
|
|
167
|
+
page: z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
url: z.ZodString;
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
capturedAt: z.ZodNumber;
|
|
173
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
agent: {
|
|
176
|
+
description: string;
|
|
177
|
+
safety: "action" | "read";
|
|
178
|
+
};
|
|
179
|
+
handler(input: {
|
|
180
|
+
appId: string;
|
|
181
|
+
filter?: string | undefined;
|
|
182
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
183
|
+
};
|
|
184
|
+
'component-children': {
|
|
185
|
+
type: "query" | "action";
|
|
186
|
+
jsonSerializable: true;
|
|
187
|
+
args: [z.ZodObject<{
|
|
188
|
+
appId: z.ZodString;
|
|
189
|
+
componentId: z.ZodString;
|
|
190
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strict>];
|
|
192
|
+
returns: z.ZodObject<{
|
|
193
|
+
page: z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
url: z.ZodString;
|
|
196
|
+
title: z.ZodString;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
capturedAt: z.ZodNumber;
|
|
199
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
agent: {
|
|
202
|
+
description: string;
|
|
203
|
+
safety: "action" | "read";
|
|
204
|
+
};
|
|
205
|
+
handler(input: {
|
|
206
|
+
appId: string;
|
|
207
|
+
componentId: string;
|
|
208
|
+
cursor?: string | undefined;
|
|
209
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
210
|
+
};
|
|
211
|
+
'cancel-component-children': {
|
|
212
|
+
type: "query" | "action";
|
|
213
|
+
jsonSerializable: true;
|
|
214
|
+
args: [z.ZodObject<{
|
|
215
|
+
appId: z.ZodString;
|
|
216
|
+
cursor: z.ZodString;
|
|
217
|
+
}, z.core.$strict>];
|
|
218
|
+
returns: z.ZodObject<{
|
|
219
|
+
page: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
url: z.ZodString;
|
|
222
|
+
title: z.ZodString;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
capturedAt: z.ZodNumber;
|
|
225
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
agent: {
|
|
228
|
+
description: string;
|
|
229
|
+
safety: "action" | "read";
|
|
230
|
+
};
|
|
231
|
+
handler(input: {
|
|
232
|
+
appId: string;
|
|
233
|
+
cursor: string;
|
|
234
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
235
|
+
};
|
|
236
|
+
'component-state': {
|
|
237
|
+
type: "query" | "action";
|
|
238
|
+
jsonSerializable: true;
|
|
239
|
+
args: [z.ZodObject<{
|
|
240
|
+
appId: z.ZodString;
|
|
241
|
+
componentId: z.ZodString;
|
|
242
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
243
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
244
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strict>];
|
|
246
|
+
returns: z.ZodObject<{
|
|
247
|
+
page: z.ZodObject<{
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
url: z.ZodString;
|
|
250
|
+
title: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
capturedAt: z.ZodNumber;
|
|
253
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
254
|
+
}, z.core.$strip>;
|
|
255
|
+
agent: {
|
|
256
|
+
description: string;
|
|
257
|
+
safety: "action" | "read";
|
|
258
|
+
};
|
|
259
|
+
handler(input: {
|
|
260
|
+
appId: string;
|
|
261
|
+
componentId: string;
|
|
262
|
+
page?: number | undefined;
|
|
263
|
+
pageSize?: number | undefined;
|
|
264
|
+
snapshotId?: string | undefined;
|
|
265
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
266
|
+
};
|
|
267
|
+
'list-inspectors': {
|
|
268
|
+
type: "query" | "action";
|
|
269
|
+
jsonSerializable: true;
|
|
270
|
+
args: [z.ZodObject<{
|
|
271
|
+
appId: z.ZodString;
|
|
272
|
+
}, z.core.$strict>];
|
|
273
|
+
returns: z.ZodObject<{
|
|
274
|
+
page: z.ZodObject<{
|
|
275
|
+
id: z.ZodString;
|
|
276
|
+
url: z.ZodString;
|
|
277
|
+
title: z.ZodString;
|
|
278
|
+
}, z.core.$strip>;
|
|
279
|
+
capturedAt: z.ZodNumber;
|
|
280
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
281
|
+
}, z.core.$strip>;
|
|
282
|
+
agent: {
|
|
283
|
+
description: string;
|
|
284
|
+
safety: "action" | "read";
|
|
285
|
+
};
|
|
286
|
+
handler(input: {
|
|
287
|
+
appId: string;
|
|
288
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
289
|
+
};
|
|
290
|
+
'inspector-tree': {
|
|
291
|
+
type: "query" | "action";
|
|
292
|
+
jsonSerializable: true;
|
|
293
|
+
args: [z.ZodObject<{
|
|
294
|
+
appId: z.ZodString;
|
|
295
|
+
inspectorId: z.ZodString;
|
|
296
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
297
|
+
}, z.core.$strict>];
|
|
298
|
+
returns: z.ZodObject<{
|
|
299
|
+
page: z.ZodObject<{
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
url: z.ZodString;
|
|
302
|
+
title: z.ZodString;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
capturedAt: z.ZodNumber;
|
|
305
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
306
|
+
}, z.core.$strip>;
|
|
307
|
+
agent: {
|
|
308
|
+
description: string;
|
|
309
|
+
safety: "action" | "read";
|
|
310
|
+
};
|
|
311
|
+
handler(input: {
|
|
312
|
+
appId: string;
|
|
313
|
+
inspectorId: string;
|
|
314
|
+
filter?: string | undefined;
|
|
315
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
316
|
+
};
|
|
317
|
+
'inspector-state': {
|
|
318
|
+
type: "query" | "action";
|
|
319
|
+
jsonSerializable: true;
|
|
320
|
+
args: [z.ZodObject<{
|
|
321
|
+
appId: z.ZodString;
|
|
322
|
+
inspectorId: z.ZodString;
|
|
323
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
324
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
325
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
326
|
+
nodeId: z.ZodString;
|
|
327
|
+
}, z.core.$strict>];
|
|
328
|
+
returns: z.ZodObject<{
|
|
329
|
+
page: z.ZodObject<{
|
|
330
|
+
id: z.ZodString;
|
|
331
|
+
url: z.ZodString;
|
|
332
|
+
title: z.ZodString;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
capturedAt: z.ZodNumber;
|
|
335
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
336
|
+
}, z.core.$strip>;
|
|
337
|
+
agent: {
|
|
338
|
+
description: string;
|
|
339
|
+
safety: "action" | "read";
|
|
340
|
+
};
|
|
341
|
+
handler(input: {
|
|
342
|
+
appId: string;
|
|
343
|
+
inspectorId: string;
|
|
344
|
+
nodeId: string;
|
|
345
|
+
page?: number | undefined;
|
|
346
|
+
pageSize?: number | undefined;
|
|
347
|
+
snapshotId?: string | undefined;
|
|
348
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
349
|
+
};
|
|
350
|
+
'component-render-code': {
|
|
351
|
+
type: "query" | "action";
|
|
352
|
+
jsonSerializable: true;
|
|
353
|
+
args: [z.ZodObject<{
|
|
354
|
+
appId: z.ZodString;
|
|
355
|
+
componentId: z.ZodString;
|
|
356
|
+
}, z.core.$strict>];
|
|
357
|
+
returns: z.ZodObject<{
|
|
358
|
+
page: z.ZodObject<{
|
|
359
|
+
id: z.ZodString;
|
|
360
|
+
url: z.ZodString;
|
|
361
|
+
title: z.ZodString;
|
|
362
|
+
}, z.core.$strip>;
|
|
363
|
+
capturedAt: z.ZodNumber;
|
|
364
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
365
|
+
}, z.core.$strip>;
|
|
366
|
+
agent: {
|
|
367
|
+
description: string;
|
|
368
|
+
safety: "action" | "read";
|
|
369
|
+
};
|
|
370
|
+
handler(input: {
|
|
371
|
+
appId: string;
|
|
372
|
+
componentId: string;
|
|
373
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
374
|
+
};
|
|
375
|
+
'router-state': {
|
|
376
|
+
type: "query" | "action";
|
|
377
|
+
jsonSerializable: true;
|
|
378
|
+
args: [z.ZodObject<{
|
|
379
|
+
appId: z.ZodString;
|
|
380
|
+
}, z.core.$strict>];
|
|
381
|
+
returns: z.ZodObject<{
|
|
382
|
+
page: z.ZodObject<{
|
|
383
|
+
id: z.ZodString;
|
|
384
|
+
url: z.ZodString;
|
|
385
|
+
title: z.ZodString;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
capturedAt: z.ZodNumber;
|
|
388
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
agent: {
|
|
391
|
+
description: string;
|
|
392
|
+
safety: "action" | "read";
|
|
393
|
+
};
|
|
394
|
+
handler(input: {
|
|
395
|
+
appId: string;
|
|
396
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
397
|
+
};
|
|
398
|
+
'router-matches': {
|
|
399
|
+
type: "query" | "action";
|
|
400
|
+
jsonSerializable: true;
|
|
401
|
+
args: [z.ZodObject<{
|
|
402
|
+
appId: z.ZodString;
|
|
403
|
+
path: z.ZodString;
|
|
404
|
+
}, z.core.$strict>];
|
|
405
|
+
returns: z.ZodObject<{
|
|
406
|
+
page: z.ZodObject<{
|
|
407
|
+
id: z.ZodString;
|
|
408
|
+
url: z.ZodString;
|
|
409
|
+
title: z.ZodString;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
capturedAt: z.ZodNumber;
|
|
412
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
413
|
+
}, z.core.$strip>;
|
|
414
|
+
agent: {
|
|
415
|
+
description: string;
|
|
416
|
+
safety: "action" | "read";
|
|
417
|
+
};
|
|
418
|
+
handler(input: {
|
|
419
|
+
appId: string;
|
|
420
|
+
path: string;
|
|
421
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
422
|
+
};
|
|
423
|
+
'component-value': {
|
|
424
|
+
type: "query" | "action";
|
|
425
|
+
jsonSerializable: true;
|
|
426
|
+
args: [z.ZodObject<{
|
|
427
|
+
appId: z.ZodString;
|
|
428
|
+
componentId: z.ZodString;
|
|
429
|
+
sectionId: z.ZodString;
|
|
430
|
+
path: z.ZodArray<z.ZodString>;
|
|
431
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
433
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
434
|
+
}, z.core.$strict>];
|
|
435
|
+
returns: z.ZodObject<{
|
|
436
|
+
page: z.ZodObject<{
|
|
437
|
+
id: z.ZodString;
|
|
438
|
+
url: z.ZodString;
|
|
439
|
+
title: z.ZodString;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
capturedAt: z.ZodNumber;
|
|
442
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
443
|
+
}, z.core.$strip>;
|
|
444
|
+
agent: {
|
|
445
|
+
description: string;
|
|
446
|
+
safety: "action" | "read";
|
|
447
|
+
};
|
|
448
|
+
handler(input: {
|
|
449
|
+
appId: string;
|
|
450
|
+
componentId: string;
|
|
451
|
+
sectionId: string;
|
|
452
|
+
path: string[];
|
|
453
|
+
page?: number | undefined;
|
|
454
|
+
pageSize?: number | undefined;
|
|
455
|
+
snapshotId?: string | undefined;
|
|
456
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
457
|
+
};
|
|
458
|
+
'inspector-value': {
|
|
459
|
+
type: "query" | "action";
|
|
460
|
+
jsonSerializable: true;
|
|
461
|
+
args: [z.ZodObject<{
|
|
462
|
+
appId: z.ZodString;
|
|
463
|
+
inspectorId: z.ZodString;
|
|
464
|
+
sectionId: z.ZodString;
|
|
465
|
+
path: z.ZodArray<z.ZodString>;
|
|
466
|
+
nodeId: z.ZodString;
|
|
467
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
snapshotId: z.ZodOptional<z.ZodString>;
|
|
470
|
+
}, z.core.$strict>];
|
|
471
|
+
returns: z.ZodObject<{
|
|
472
|
+
page: z.ZodObject<{
|
|
473
|
+
id: z.ZodString;
|
|
474
|
+
url: z.ZodString;
|
|
475
|
+
title: z.ZodString;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
capturedAt: z.ZodNumber;
|
|
478
|
+
result: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
479
|
+
}, z.core.$strip>;
|
|
480
|
+
agent: {
|
|
481
|
+
description: string;
|
|
482
|
+
safety: "action" | "read";
|
|
483
|
+
};
|
|
484
|
+
handler(input: {
|
|
485
|
+
appId: string;
|
|
486
|
+
inspectorId: string;
|
|
487
|
+
sectionId: string;
|
|
488
|
+
path: string[];
|
|
489
|
+
nodeId: string;
|
|
490
|
+
page?: number | undefined;
|
|
491
|
+
pageSize?: number | undefined;
|
|
492
|
+
snapshotId?: string | undefined;
|
|
493
|
+
}): Promise<VueDevtoolsAgentSnapshot>;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
//#endregion
|
|
497
|
+
export { type VueDevtoolsAgentConnection, type VueDevtoolsAgentPage, type VueDevtoolsAgentSession, type VueDevtoolsAgentSnapshot, createVueDevtoolsAgentSession };
|
|
498
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
ADDED
package/dist/node.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DevframeNodeContext } from "devframe/types";
|
|
2
|
+
//#region src/mcp/host.d.ts
|
|
3
|
+
/** Prime the host agent surface so its automatic MCP route exists before the page connects. */
|
|
4
|
+
export declare function registerVueDevtoolsAgentHost(ctx: Pick<DevframeNodeContext, 'agent'>): () => void;
|
|
5
|
+
//#endregion
|
|
6
|
+
//# sourceMappingURL=node.d.mts.map
|
package/dist/node.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/mcp/host.ts
|
|
2
|
+
/** Prime the host agent surface so its automatic MCP route exists before the page connects. */
|
|
3
|
+
function registerVueDevtoolsAgentHost(ctx) {
|
|
4
|
+
const handle = ctx.agent.registerTool({
|
|
5
|
+
id: "vue-devtools:agent:help",
|
|
6
|
+
description: "Explain how to discover Vue runtime tools. Call if Vue page tools are missing or to understand page selection.",
|
|
7
|
+
safety: "read",
|
|
8
|
+
handler: () => ({ instructions: "Open the application in a browser and allow the Vite DevTools connection. List tools again to discover page-specific Vue tools. Each page has a unique namespace; use list-apps to identify its URL and app IDs before querying. Reloading the page invalidates its old namespace, component IDs and value handles. Paging rules are in each paginated tool description." })
|
|
9
|
+
});
|
|
10
|
+
return () => handle.unregister();
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { registerVueDevtoolsAgentHost };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=node.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.mjs","names":[],"sources":["../src/mcp/host.ts"],"sourcesContent":["import type { DevframeNodeContext } from 'devframe/types'\n\n/** Prime the host agent surface so its automatic MCP route exists before the page connects. */\nexport function registerVueDevtoolsAgentHost(ctx: Pick<DevframeNodeContext, 'agent'>): () => void {\n const handle = ctx.agent.registerTool({\n id: 'vue-devtools:agent:help',\n description:\n 'Explain how to discover Vue runtime tools. Call if Vue page tools are missing or to understand page selection.',\n safety: 'read',\n handler: () => ({\n instructions:\n 'Open the application in a browser and allow the Vite DevTools connection. List tools again to discover page-specific Vue tools. Each page has a unique namespace; use list-apps to identify its URL and app IDs before querying. Reloading the page invalidates its old namespace, component IDs and value handles. Paging rules are in each paginated tool description.',\n }),\n })\n return () => handle.unregister()\n}\n"],"mappings":";;AAGA,SAAgB,6BAA6B,KAAqD;CAChG,MAAM,SAAS,IAAI,MAAM,aAAa;EACpC,IAAI;EACJ,aACE;EACF,QAAQ;EACR,gBAAgB,EACd,cACE,2WACJ;CACF,CAAC;CACD,aAAa,OAAO,WAAW;AACjC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RuntimeCommandRequest, RuntimeCommandResult, RuntimeRequests } from "@vue/devtools-kit";
|
|
2
|
+
//#region src/types.d.ts
|
|
3
|
+
/** A host supplies a connection to its existing Vue runtime. `command` enables state editing and cursor cleanup. */
|
|
4
|
+
type VueDevtoolsAgentConnection = Pick<RuntimeRequests, 'query'> & Partial<Pick<RuntimeRequests, 'command'>>;
|
|
5
|
+
interface VueDevtoolsAgentPage {
|
|
6
|
+
/** Unique per document: component IDs and value handles expire on reload. */
|
|
7
|
+
id: string;
|
|
8
|
+
url: string;
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
interface VueDevtoolsAgentSnapshot {
|
|
12
|
+
page: VueDevtoolsAgentPage;
|
|
13
|
+
capturedAt: number;
|
|
14
|
+
result: unknown;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/session.d.ts
|
|
18
|
+
interface VueDevtoolsAgentSession extends VueDevtoolsAgentConnection {
|
|
19
|
+
command(request: RuntimeCommandRequest): Promise<RuntimeCommandResult>;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|
|
22
|
+
/** Connect on the first call and retain the connection until the host disposes it. */
|
|
23
|
+
declare function createVueDevtoolsAgentSession(connect: () => VueDevtoolsAgentConnection & {
|
|
24
|
+
dispose(): void;
|
|
25
|
+
}): VueDevtoolsAgentSession;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { VueDevtoolsAgentSnapshot as a, VueDevtoolsAgentPage as i, createVueDevtoolsAgentSession as n, VueDevtoolsAgentConnection as r, VueDevtoolsAgentSession as t };
|
|
28
|
+
//# sourceMappingURL=session-1Buaf6lK.d.mts.map
|