@fugood/bricks-ctor 2.24.0-beta.40

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.
Files changed (129) hide show
  1. package/compile/action-name-map.ts +988 -0
  2. package/compile/index.ts +1245 -0
  3. package/compile/util.ts +358 -0
  4. package/index.ts +6 -0
  5. package/package.json +28 -0
  6. package/skills/bricks-design/LICENSE.txt +180 -0
  7. package/skills/bricks-design/SKILL.md +66 -0
  8. package/skills/bricks-project/SKILL.md +32 -0
  9. package/skills/bricks-project/rules/animation.md +159 -0
  10. package/skills/bricks-project/rules/architecture-patterns.md +69 -0
  11. package/skills/bricks-project/rules/automations.md +221 -0
  12. package/skills/bricks-project/rules/buttress.md +156 -0
  13. package/skills/bricks-project/rules/data-calculation.md +208 -0
  14. package/skills/bricks-project/rules/local-sync.md +129 -0
  15. package/skills/bricks-project/rules/media-flow.md +158 -0
  16. package/skills/bricks-project/rules/remote-data-bank.md +196 -0
  17. package/skills/bricks-project/rules/standby-transition.md +124 -0
  18. package/skills/rive-marketplace/SKILL.md +99 -0
  19. package/tools/deploy.ts +151 -0
  20. package/tools/icons/.gitattributes +1 -0
  21. package/tools/icons/fa6pro-glyphmap.json +4686 -0
  22. package/tools/icons/fa6pro-meta.json +3671 -0
  23. package/tools/mcp-server.ts +28 -0
  24. package/tools/mcp-tools/compile.ts +91 -0
  25. package/tools/mcp-tools/huggingface.ts +762 -0
  26. package/tools/mcp-tools/icons.ts +70 -0
  27. package/tools/mcp-tools/lottie.ts +102 -0
  28. package/tools/mcp-tools/media.ts +110 -0
  29. package/tools/postinstall.ts +229 -0
  30. package/tools/preview-main.mjs +293 -0
  31. package/tools/preview.ts +143 -0
  32. package/tools/pull.ts +116 -0
  33. package/tsconfig.json +16 -0
  34. package/types/animation.ts +100 -0
  35. package/types/automation.ts +235 -0
  36. package/types/brick-base.ts +80 -0
  37. package/types/bricks/Camera.ts +246 -0
  38. package/types/bricks/Chart.ts +372 -0
  39. package/types/bricks/GenerativeMedia.ts +276 -0
  40. package/types/bricks/Icon.ts +98 -0
  41. package/types/bricks/Image.ts +114 -0
  42. package/types/bricks/Items.ts +476 -0
  43. package/types/bricks/Lottie.ts +168 -0
  44. package/types/bricks/Maps.ts +262 -0
  45. package/types/bricks/QrCode.ts +117 -0
  46. package/types/bricks/Rect.ts +150 -0
  47. package/types/bricks/RichText.ts +128 -0
  48. package/types/bricks/Rive.ts +220 -0
  49. package/types/bricks/Slideshow.ts +201 -0
  50. package/types/bricks/Svg.ts +99 -0
  51. package/types/bricks/Text.ts +148 -0
  52. package/types/bricks/TextInput.ts +242 -0
  53. package/types/bricks/Video.ts +175 -0
  54. package/types/bricks/VideoStreaming.ts +112 -0
  55. package/types/bricks/WebRtcStream.ts +65 -0
  56. package/types/bricks/WebView.ts +168 -0
  57. package/types/bricks/index.ts +21 -0
  58. package/types/canvas.ts +82 -0
  59. package/types/common.ts +144 -0
  60. package/types/data-calc-command.ts +7005 -0
  61. package/types/data-calc-script.ts +21 -0
  62. package/types/data-calc.ts +11 -0
  63. package/types/data.ts +95 -0
  64. package/types/generators/AlarmClock.ts +110 -0
  65. package/types/generators/Assistant.ts +621 -0
  66. package/types/generators/BleCentral.ts +247 -0
  67. package/types/generators/BlePeripheral.ts +208 -0
  68. package/types/generators/CanvasMap.ts +74 -0
  69. package/types/generators/CastlesPay.ts +87 -0
  70. package/types/generators/DataBank.ts +160 -0
  71. package/types/generators/File.ts +432 -0
  72. package/types/generators/GraphQl.ts +132 -0
  73. package/types/generators/Http.ts +222 -0
  74. package/types/generators/HttpServer.ts +176 -0
  75. package/types/generators/Information.ts +103 -0
  76. package/types/generators/Intent.ts +168 -0
  77. package/types/generators/Iterator.ts +108 -0
  78. package/types/generators/Keyboard.ts +105 -0
  79. package/types/generators/LlmAnthropicCompat.ts +212 -0
  80. package/types/generators/LlmAppleBuiltin.ts +159 -0
  81. package/types/generators/LlmGgml.ts +861 -0
  82. package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
  83. package/types/generators/LlmMlx.ts +227 -0
  84. package/types/generators/LlmOnnx.ts +213 -0
  85. package/types/generators/LlmOpenAiCompat.ts +244 -0
  86. package/types/generators/LlmQualcommAiEngine.ts +247 -0
  87. package/types/generators/Mcp.ts +637 -0
  88. package/types/generators/McpServer.ts +289 -0
  89. package/types/generators/MediaFlow.ts +170 -0
  90. package/types/generators/MqttBroker.ts +141 -0
  91. package/types/generators/MqttClient.ts +141 -0
  92. package/types/generators/Question.ts +408 -0
  93. package/types/generators/RealtimeTranscription.ts +279 -0
  94. package/types/generators/RerankerGgml.ts +191 -0
  95. package/types/generators/SerialPort.ts +151 -0
  96. package/types/generators/SoundPlayer.ts +94 -0
  97. package/types/generators/SoundRecorder.ts +130 -0
  98. package/types/generators/SpeechToTextGgml.ts +415 -0
  99. package/types/generators/SpeechToTextOnnx.ts +236 -0
  100. package/types/generators/SpeechToTextPlatform.ts +85 -0
  101. package/types/generators/SqLite.ts +159 -0
  102. package/types/generators/Step.ts +107 -0
  103. package/types/generators/SttAppleBuiltin.ts +130 -0
  104. package/types/generators/Tcp.ts +126 -0
  105. package/types/generators/TcpServer.ts +147 -0
  106. package/types/generators/TextToSpeechAppleBuiltin.ts +127 -0
  107. package/types/generators/TextToSpeechGgml.ts +221 -0
  108. package/types/generators/TextToSpeechOnnx.ts +178 -0
  109. package/types/generators/TextToSpeechOpenAiLike.ts +121 -0
  110. package/types/generators/ThermalPrinter.ts +191 -0
  111. package/types/generators/Tick.ts +83 -0
  112. package/types/generators/Udp.ts +120 -0
  113. package/types/generators/VadGgml.ts +250 -0
  114. package/types/generators/VadOnnx.ts +231 -0
  115. package/types/generators/VadTraditional.ts +138 -0
  116. package/types/generators/VectorStore.ts +257 -0
  117. package/types/generators/Watchdog.ts +107 -0
  118. package/types/generators/WebCrawler.ts +103 -0
  119. package/types/generators/WebRtc.ts +181 -0
  120. package/types/generators/WebSocket.ts +148 -0
  121. package/types/generators/index.ts +57 -0
  122. package/types/index.ts +13 -0
  123. package/types/subspace.ts +59 -0
  124. package/types/switch.ts +51 -0
  125. package/types/system.ts +707 -0
  126. package/utils/calc.ts +126 -0
  127. package/utils/data.ts +497 -0
  128. package/utils/event-props.ts +836 -0
  129. package/utils/id.ts +80 -0
@@ -0,0 +1,637 @@
1
+ /* Auto generated by build script
2
+ *
3
+ * MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant
4
+ */
5
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
+ import type { Data, DataLink } from '../data'
7
+ import type {
8
+ Brick,
9
+ Generator,
10
+ EventAction,
11
+ ActionWithDataParams,
12
+ ActionWithParams,
13
+ Action,
14
+ EventProperty,
15
+ } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
+
18
+ /* Connect to MCP server */
19
+ export type GeneratorMCPActionConnect = Action & {
20
+ __actionName: 'GENERATOR_MCP_CONNECT'
21
+ }
22
+
23
+ /* Disconnect from MCP server */
24
+ export type GeneratorMCPActionDisconnect = Action & {
25
+ __actionName: 'GENERATOR_MCP_DISCONNECT'
26
+ }
27
+
28
+ /* List resources */
29
+ export type GeneratorMCPActionListResources = ActionWithParams & {
30
+ __actionName: 'GENERATOR_MCP_LIST_RESOURCES'
31
+ params?: Array<{
32
+ input: 'requestId'
33
+ value?: string | DataLink | EventProperty
34
+ mapping?: string
35
+ }>
36
+ }
37
+
38
+ /* List resource templates */
39
+ export type GeneratorMCPActionListResourceTemplates = ActionWithParams & {
40
+ __actionName: 'GENERATOR_MCP_LIST_RESOURCE_TEMPLATES'
41
+ params?: Array<{
42
+ input: 'requestId'
43
+ value?: string | DataLink | EventProperty
44
+ mapping?: string
45
+ }>
46
+ }
47
+
48
+ /* Read resource */
49
+ export type GeneratorMCPActionReadResource = ActionWithParams & {
50
+ __actionName: 'GENERATOR_MCP_READ_RESOURCE'
51
+ params?: Array<
52
+ | {
53
+ input: 'requestId'
54
+ value?: string | DataLink | EventProperty
55
+ mapping?: string
56
+ }
57
+ | {
58
+ input: 'uri'
59
+ value?: string | DataLink | EventProperty
60
+ mapping?: string
61
+ }
62
+ | {
63
+ input: 'variables'
64
+ value?: { [key: string]: any } | DataLink | EventProperty
65
+ mapping?: string
66
+ }
67
+ >
68
+ }
69
+
70
+ /* List tools */
71
+ export type GeneratorMCPActionListTools = ActionWithParams & {
72
+ __actionName: 'GENERATOR_MCP_LIST_TOOLS'
73
+ params?: Array<{
74
+ input: 'requestId'
75
+ value?: string | DataLink | EventProperty
76
+ mapping?: string
77
+ }>
78
+ }
79
+
80
+ /* Call tool */
81
+ export type GeneratorMCPActionCallTool = ActionWithParams & {
82
+ __actionName: 'GENERATOR_MCP_CALL_TOOL'
83
+ params?: Array<
84
+ | {
85
+ input: 'requestId'
86
+ value?: string | DataLink | EventProperty
87
+ mapping?: string
88
+ }
89
+ | {
90
+ input: 'name'
91
+ value?: string | DataLink | EventProperty
92
+ mapping?: string
93
+ }
94
+ | {
95
+ input: 'variables'
96
+ value?: { [key: string]: any } | DataLink | EventProperty
97
+ mapping?: string
98
+ }
99
+ >
100
+ }
101
+
102
+ /* List prompts */
103
+ export type GeneratorMCPActionListPrompts = ActionWithParams & {
104
+ __actionName: 'GENERATOR_MCP_LIST_PROMPTS'
105
+ params?: Array<{
106
+ input: 'requestId'
107
+ value?: string | DataLink | EventProperty
108
+ mapping?: string
109
+ }>
110
+ }
111
+
112
+ /* Request prompt */
113
+ export type GeneratorMCPActionGetPrompt = ActionWithParams & {
114
+ __actionName: 'GENERATOR_MCP_GET_PROMPT'
115
+ params?: Array<
116
+ | {
117
+ input: 'requestId'
118
+ value?: string | DataLink | EventProperty
119
+ mapping?: string
120
+ }
121
+ | {
122
+ input: 'name'
123
+ value?: string | DataLink | EventProperty
124
+ mapping?: string
125
+ }
126
+ | {
127
+ input: 'variables'
128
+ value?: { [key: string]: any } | DataLink | EventProperty
129
+ mapping?: string
130
+ }
131
+ >
132
+ }
133
+
134
+ interface GeneratorMCPDef {
135
+ /*
136
+ Default property:
137
+ {
138
+ "init": false,
139
+ "type": "streamable-http",
140
+ "url": "",
141
+ "autoReconnect": true,
142
+ "maxReconnectAttempts": 10,
143
+ "reconnectInterval": 1000,
144
+ "generatorId": "",
145
+ "generatorKey": "",
146
+ "name": "bricks-foundation-mcp-client-default",
147
+ "version": "1.0.0",
148
+ "ignoreResourceInList": [],
149
+ "ignoreToolInList": [],
150
+ "ignorePromptInList": [],
151
+ "requestTimeout": 60000
152
+ }
153
+ */
154
+ property?: {
155
+ /* Application-scoped generator key, key cannot be the same with other application-scoped generators */
156
+ globalGeneratorKey?: string | DataLink
157
+ /* Initialize the MCP client on start */
158
+ init?: boolean | DataLink
159
+ /* Type of the MCP connection, e.g. sse or direct-link (generator) */
160
+ type?: 'streamable-http' | 'sse' | 'direct-link' | DataLink
161
+ /* URL of the MCP server, e.g. http://localhost:19853/sse */
162
+ url?: string | DataLink
163
+ /* Whether to automatically reconnect to the MCP server */
164
+ autoReconnect?: boolean | DataLink
165
+ /* Maximum number of reconnection attempts */
166
+ maxReconnectAttempts?: number | DataLink
167
+ /* Reconnection interval in milliseconds */
168
+ reconnectInterval?: number | DataLink
169
+ /* SSE connection headers */
170
+ sseHeaders?: {} | DataLink
171
+ /* Send request headers */
172
+ sendHeaders?: {} | DataLink
173
+ /* Bearer token for authentication */
174
+ bearerToken?: string | DataLink
175
+ /* Generator MCP Server ID for direct link */
176
+ generatorId?: string | DataLink | (() => Generator)
177
+ /* Application-scoped key of Generator MCP Server for direct link (If ID is not provided) */
178
+ generatorKey?: string | DataLink
179
+ /* Name of the MCP client */
180
+ name?: string | DataLink
181
+ /* Version of the MCP client */
182
+ version?: string | DataLink
183
+ /* Ignore resources in list response */
184
+ ignoreResourceInList?: Array<string | DataLink> | DataLink
185
+ /* Ignore tools in list response */
186
+ ignoreToolInList?: Array<string | DataLink> | DataLink
187
+ /* Ignore prompts in list response */
188
+ ignorePromptInList?: Array<string | DataLink> | DataLink
189
+ /* Request timeout in milliseconds */
190
+ requestTimeout?: number | DataLink
191
+ }
192
+ events?: {
193
+ /* On connected */
194
+ onConnected?: Array<EventAction>
195
+ /* On connection error */
196
+ onConnectionError?: Array<
197
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onConnectionError']>
198
+ >
199
+ /* On disconnected */
200
+ onDisconnected?: Array<EventAction>
201
+ /* On list resources */
202
+ onListResources?: Array<
203
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResources']>
204
+ >
205
+ /* On list resources error */
206
+ onListResourcesError?: Array<
207
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourcesError']>
208
+ >
209
+ /* On list resource templates */
210
+ onListResourceTemplates?: Array<
211
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplates']>
212
+ >
213
+ /* On list resource templates error */
214
+ onListResourceTemplatesError?: Array<
215
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplatesError']>
216
+ >
217
+ /* On read resource */
218
+ onReadResource?: Array<
219
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResource']>
220
+ >
221
+ /* On read resource error */
222
+ onReadResourceError?: Array<
223
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResourceError']>
224
+ >
225
+ /* On list tools */
226
+ onListTools?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListTools']>>
227
+ /* On list tools error */
228
+ onListToolsError?: Array<
229
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListToolsError']>
230
+ >
231
+ /* On call tool */
232
+ onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallTool']>>
233
+ /* On call tool error */
234
+ onCallToolError?: Array<
235
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallToolError']>
236
+ >
237
+ /* On list prompts */
238
+ onListPrompts?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPrompts']>>
239
+ /* On list prompts error */
240
+ onListPromptsError?: Array<
241
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPromptsError']>
242
+ >
243
+ /* On get prompt */
244
+ onGetPrompt?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPrompt']>>
245
+ /* On get prompt error */
246
+ onGetPromptError?: Array<
247
+ EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPromptError']>
248
+ >
249
+ }
250
+ outlets?: {
251
+ /* Connection state */
252
+ connectionState?: () => Data<string>
253
+ /* List resources response */
254
+ listResourcesResponse?: () => Data<{
255
+ id?: string
256
+ response?: {
257
+ resources?: Array<{
258
+ name?: string
259
+ [key: string]: any
260
+ }>
261
+ resourceTemplates?: Array<{
262
+ name?: string
263
+ [key: string]: any
264
+ }>
265
+ contents?: Array<{
266
+ uri?: string
267
+ text?: string
268
+ blob?: string
269
+ mimeType?: string
270
+ [key: string]: any
271
+ }>
272
+ tools?: Array<{
273
+ name?: string
274
+ description?: string
275
+ inputSchema?: { [key: string]: any }
276
+ [key: string]: any
277
+ }>
278
+ content?: Array<{
279
+ type?: string
280
+ text?: string
281
+ [key: string]: any
282
+ }>
283
+ prompts?: Array<{
284
+ name?: string
285
+ [key: string]: any
286
+ }>
287
+ messages?: Array<{
288
+ role?: string
289
+ content?: any
290
+ [key: string]: any
291
+ }>
292
+ [key: string]: any
293
+ }
294
+ [key: string]: any
295
+ }>
296
+ /* List resources error */
297
+ listResourcesError?: () => Data<{
298
+ id?: string
299
+ error?: string
300
+ [key: string]: any
301
+ }>
302
+ /* List resource templates response */
303
+ listResourceTemplatesResponse?: () => Data<{
304
+ id?: string
305
+ response?: {
306
+ resources?: Array<{
307
+ name?: string
308
+ [key: string]: any
309
+ }>
310
+ resourceTemplates?: Array<{
311
+ name?: string
312
+ [key: string]: any
313
+ }>
314
+ contents?: Array<{
315
+ uri?: string
316
+ text?: string
317
+ blob?: string
318
+ mimeType?: string
319
+ [key: string]: any
320
+ }>
321
+ tools?: Array<{
322
+ name?: string
323
+ description?: string
324
+ inputSchema?: { [key: string]: any }
325
+ [key: string]: any
326
+ }>
327
+ content?: Array<{
328
+ type?: string
329
+ text?: string
330
+ [key: string]: any
331
+ }>
332
+ prompts?: Array<{
333
+ name?: string
334
+ [key: string]: any
335
+ }>
336
+ messages?: Array<{
337
+ role?: string
338
+ content?: any
339
+ [key: string]: any
340
+ }>
341
+ [key: string]: any
342
+ }
343
+ [key: string]: any
344
+ }>
345
+ /* List resource templates error */
346
+ listResourceTemplatesError?: () => Data<{
347
+ id?: string
348
+ error?: string
349
+ [key: string]: any
350
+ }>
351
+ /* Read resource response */
352
+ readResourceResponse?: () => Data<{
353
+ id?: string
354
+ response?: {
355
+ resources?: Array<{
356
+ name?: string
357
+ [key: string]: any
358
+ }>
359
+ resourceTemplates?: Array<{
360
+ name?: string
361
+ [key: string]: any
362
+ }>
363
+ contents?: Array<{
364
+ uri?: string
365
+ text?: string
366
+ blob?: string
367
+ mimeType?: string
368
+ [key: string]: any
369
+ }>
370
+ tools?: Array<{
371
+ name?: string
372
+ description?: string
373
+ inputSchema?: { [key: string]: any }
374
+ [key: string]: any
375
+ }>
376
+ content?: Array<{
377
+ type?: string
378
+ text?: string
379
+ [key: string]: any
380
+ }>
381
+ prompts?: Array<{
382
+ name?: string
383
+ [key: string]: any
384
+ }>
385
+ messages?: Array<{
386
+ role?: string
387
+ content?: any
388
+ [key: string]: any
389
+ }>
390
+ [key: string]: any
391
+ }
392
+ [key: string]: any
393
+ }>
394
+ /* Read resource error */
395
+ readResourceError?: () => Data<{
396
+ id?: string
397
+ error?: string
398
+ [key: string]: any
399
+ }>
400
+ /* List tools response */
401
+ listToolsResponse?: () => Data<{
402
+ id?: string
403
+ response?: {
404
+ resources?: Array<{
405
+ name?: string
406
+ [key: string]: any
407
+ }>
408
+ resourceTemplates?: Array<{
409
+ name?: string
410
+ [key: string]: any
411
+ }>
412
+ contents?: Array<{
413
+ uri?: string
414
+ text?: string
415
+ blob?: string
416
+ mimeType?: string
417
+ [key: string]: any
418
+ }>
419
+ tools?: Array<{
420
+ name?: string
421
+ description?: string
422
+ inputSchema?: { [key: string]: any }
423
+ [key: string]: any
424
+ }>
425
+ content?: Array<{
426
+ type?: string
427
+ text?: string
428
+ [key: string]: any
429
+ }>
430
+ prompts?: Array<{
431
+ name?: string
432
+ [key: string]: any
433
+ }>
434
+ messages?: Array<{
435
+ role?: string
436
+ content?: any
437
+ [key: string]: any
438
+ }>
439
+ [key: string]: any
440
+ }
441
+ [key: string]: any
442
+ }>
443
+ /* List tools error */
444
+ listToolsError?: () => Data<{
445
+ id?: string
446
+ error?: string
447
+ [key: string]: any
448
+ }>
449
+ /* Call tool response */
450
+ callToolResponse?: () => Data<{
451
+ id?: string
452
+ response?: {
453
+ resources?: Array<{
454
+ name?: string
455
+ [key: string]: any
456
+ }>
457
+ resourceTemplates?: Array<{
458
+ name?: string
459
+ [key: string]: any
460
+ }>
461
+ contents?: Array<{
462
+ uri?: string
463
+ text?: string
464
+ blob?: string
465
+ mimeType?: string
466
+ [key: string]: any
467
+ }>
468
+ tools?: Array<{
469
+ name?: string
470
+ description?: string
471
+ inputSchema?: { [key: string]: any }
472
+ [key: string]: any
473
+ }>
474
+ content?: Array<{
475
+ type?: string
476
+ text?: string
477
+ [key: string]: any
478
+ }>
479
+ prompts?: Array<{
480
+ name?: string
481
+ [key: string]: any
482
+ }>
483
+ messages?: Array<{
484
+ role?: string
485
+ content?: any
486
+ [key: string]: any
487
+ }>
488
+ [key: string]: any
489
+ }
490
+ [key: string]: any
491
+ }>
492
+ /* Call tool error */
493
+ callToolError?: () => Data<{
494
+ id?: string
495
+ error?: string
496
+ [key: string]: any
497
+ }>
498
+ /* List prompts response */
499
+ listPromptsResponse?: () => Data<{
500
+ id?: string
501
+ response?: {
502
+ resources?: Array<{
503
+ name?: string
504
+ [key: string]: any
505
+ }>
506
+ resourceTemplates?: Array<{
507
+ name?: string
508
+ [key: string]: any
509
+ }>
510
+ contents?: Array<{
511
+ uri?: string
512
+ text?: string
513
+ blob?: string
514
+ mimeType?: string
515
+ [key: string]: any
516
+ }>
517
+ tools?: Array<{
518
+ name?: string
519
+ description?: string
520
+ inputSchema?: { [key: string]: any }
521
+ [key: string]: any
522
+ }>
523
+ content?: Array<{
524
+ type?: string
525
+ text?: string
526
+ [key: string]: any
527
+ }>
528
+ prompts?: Array<{
529
+ name?: string
530
+ [key: string]: any
531
+ }>
532
+ messages?: Array<{
533
+ role?: string
534
+ content?: any
535
+ [key: string]: any
536
+ }>
537
+ [key: string]: any
538
+ }
539
+ [key: string]: any
540
+ }>
541
+ /* List prompts error */
542
+ listPromptsError?: () => Data<{
543
+ id?: string
544
+ error?: string
545
+ [key: string]: any
546
+ }>
547
+ /* Get prompt response */
548
+ getPromptResponse?: () => Data<{
549
+ id?: string
550
+ response?: {
551
+ resources?: Array<{
552
+ name?: string
553
+ [key: string]: any
554
+ }>
555
+ resourceTemplates?: Array<{
556
+ name?: string
557
+ [key: string]: any
558
+ }>
559
+ contents?: Array<{
560
+ uri?: string
561
+ text?: string
562
+ blob?: string
563
+ mimeType?: string
564
+ [key: string]: any
565
+ }>
566
+ tools?: Array<{
567
+ name?: string
568
+ description?: string
569
+ inputSchema?: { [key: string]: any }
570
+ [key: string]: any
571
+ }>
572
+ content?: Array<{
573
+ type?: string
574
+ text?: string
575
+ [key: string]: any
576
+ }>
577
+ prompts?: Array<{
578
+ name?: string
579
+ [key: string]: any
580
+ }>
581
+ messages?: Array<{
582
+ role?: string
583
+ content?: any
584
+ [key: string]: any
585
+ }>
586
+ [key: string]: any
587
+ }
588
+ [key: string]: any
589
+ }>
590
+ /* Request prompt error */
591
+ getPromptError?: () => Data<{
592
+ id?: string
593
+ error?: string
594
+ [key: string]: any
595
+ }>
596
+ /* Last error */
597
+ lastError?: () => Data<string>
598
+ }
599
+ }
600
+
601
+ /* MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant */
602
+ export type GeneratorMCP = Generator &
603
+ GeneratorMCPDef & {
604
+ templateKey: 'GENERATOR_MCP'
605
+ switches?: Array<
606
+ SwitchDef &
607
+ GeneratorMCPDef & {
608
+ conds?: Array<{
609
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
610
+ cond:
611
+ | SwitchCondInnerStateCurrentCanvas
612
+ | SwitchCondData
613
+ | {
614
+ __typename: 'SwitchCondInnerStateOutlet'
615
+ outlet:
616
+ | 'connectionState'
617
+ | 'listResourcesResponse'
618
+ | 'listResourcesError'
619
+ | 'listResourceTemplatesResponse'
620
+ | 'listResourceTemplatesError'
621
+ | 'readResourceResponse'
622
+ | 'readResourceError'
623
+ | 'listToolsResponse'
624
+ | 'listToolsError'
625
+ | 'callToolResponse'
626
+ | 'callToolError'
627
+ | 'listPromptsResponse'
628
+ | 'listPromptsError'
629
+ | 'getPromptResponse'
630
+ | 'getPromptError'
631
+ | 'lastError'
632
+ value: any
633
+ }
634
+ }>
635
+ }
636
+ >
637
+ }