@fugood/bricks-ctor 2.25.0-beta.6 → 2.25.0-beta.61

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 (133) hide show
  1. package/package.json +4 -24
  2. package/tools/deploy.ts +19 -165
  3. package/tools/mcp-server.ts +17 -26
  4. package/tools/postinstall.ts +21 -235
  5. package/tools/pull.ts +18 -121
  6. package/tools/push-config.ts +19 -0
  7. package/tools/simulator.ts +21 -0
  8. package/compile/action-name-map.ts +0 -1015
  9. package/compile/index.ts +0 -1278
  10. package/compile/util.ts +0 -358
  11. package/index.ts +0 -6
  12. package/skills/bricks-ctor/SKILL.md +0 -32
  13. package/skills/bricks-ctor/rules/animation.md +0 -159
  14. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  15. package/skills/bricks-ctor/rules/automations.md +0 -221
  16. package/skills/bricks-ctor/rules/buttress.md +0 -156
  17. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  18. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  19. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  20. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  21. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  22. package/skills/bricks-design/LICENSE.txt +0 -180
  23. package/skills/bricks-design/SKILL.md +0 -66
  24. package/skills/rive-marketplace/SKILL.md +0 -99
  25. package/tools/_git-author.ts +0 -29
  26. package/tools/_shell.ts +0 -173
  27. package/tools/icons/.gitattributes +0 -1
  28. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  29. package/tools/icons/fa6pro-meta.json +0 -1
  30. package/tools/mcp-tools/compile.ts +0 -92
  31. package/tools/mcp-tools/huggingface.ts +0 -762
  32. package/tools/mcp-tools/icons.ts +0 -81
  33. package/tools/mcp-tools/lottie.ts +0 -102
  34. package/tools/mcp-tools/media.ts +0 -110
  35. package/tools/preview-main.mjs +0 -293
  36. package/tools/preview.ts +0 -150
  37. package/types/animation.ts +0 -100
  38. package/types/automation.ts +0 -235
  39. package/types/brick-base.ts +0 -80
  40. package/types/bricks/Camera.ts +0 -246
  41. package/types/bricks/Chart.ts +0 -372
  42. package/types/bricks/GenerativeMedia.ts +0 -290
  43. package/types/bricks/Icon.ts +0 -98
  44. package/types/bricks/Image.ts +0 -114
  45. package/types/bricks/Items.ts +0 -476
  46. package/types/bricks/Lottie.ts +0 -168
  47. package/types/bricks/Maps.ts +0 -262
  48. package/types/bricks/QrCode.ts +0 -117
  49. package/types/bricks/Rect.ts +0 -150
  50. package/types/bricks/RichText.ts +0 -128
  51. package/types/bricks/Rive.ts +0 -220
  52. package/types/bricks/Sketch.ts +0 -254
  53. package/types/bricks/Slideshow.ts +0 -201
  54. package/types/bricks/Svg.ts +0 -99
  55. package/types/bricks/Text.ts +0 -148
  56. package/types/bricks/TextInput.ts +0 -242
  57. package/types/bricks/Video.ts +0 -175
  58. package/types/bricks/VideoStreaming.ts +0 -112
  59. package/types/bricks/WebRtcStream.ts +0 -65
  60. package/types/bricks/WebView.ts +0 -168
  61. package/types/bricks/index.ts +0 -22
  62. package/types/canvas.ts +0 -82
  63. package/types/common.ts +0 -144
  64. package/types/data-calc-command.ts +0 -7005
  65. package/types/data-calc-script.ts +0 -21
  66. package/types/data-calc.ts +0 -11
  67. package/types/data.ts +0 -95
  68. package/types/generators/AlarmClock.ts +0 -110
  69. package/types/generators/Assistant.ts +0 -621
  70. package/types/generators/BleCentral.ts +0 -247
  71. package/types/generators/BlePeripheral.ts +0 -208
  72. package/types/generators/CanvasMap.ts +0 -74
  73. package/types/generators/CastlesPay.ts +0 -87
  74. package/types/generators/DataBank.ts +0 -160
  75. package/types/generators/File.ts +0 -432
  76. package/types/generators/GraphQl.ts +0 -132
  77. package/types/generators/Http.ts +0 -222
  78. package/types/generators/HttpServer.ts +0 -176
  79. package/types/generators/Information.ts +0 -103
  80. package/types/generators/Intent.ts +0 -168
  81. package/types/generators/Iterator.ts +0 -108
  82. package/types/generators/Keyboard.ts +0 -105
  83. package/types/generators/LlmAnthropicCompat.ts +0 -212
  84. package/types/generators/LlmAppleBuiltin.ts +0 -159
  85. package/types/generators/LlmGgml.ts +0 -861
  86. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  87. package/types/generators/LlmMlx.ts +0 -227
  88. package/types/generators/LlmOnnx.ts +0 -213
  89. package/types/generators/LlmOpenAiCompat.ts +0 -312
  90. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  91. package/types/generators/Mcp.ts +0 -637
  92. package/types/generators/McpServer.ts +0 -289
  93. package/types/generators/MediaFlow.ts +0 -170
  94. package/types/generators/MqttBroker.ts +0 -141
  95. package/types/generators/MqttClient.ts +0 -141
  96. package/types/generators/Question.ts +0 -408
  97. package/types/generators/RealtimeTranscription.ts +0 -287
  98. package/types/generators/RerankerGgml.ts +0 -191
  99. package/types/generators/SerialPort.ts +0 -151
  100. package/types/generators/SoundPlayer.ts +0 -94
  101. package/types/generators/SoundRecorder.ts +0 -130
  102. package/types/generators/SpeechToTextGgml.ts +0 -419
  103. package/types/generators/SpeechToTextOnnx.ts +0 -236
  104. package/types/generators/SpeechToTextPlatform.ts +0 -85
  105. package/types/generators/SqLite.ts +0 -159
  106. package/types/generators/Step.ts +0 -107
  107. package/types/generators/SttAppleBuiltin.ts +0 -130
  108. package/types/generators/Tcp.ts +0 -126
  109. package/types/generators/TcpServer.ts +0 -147
  110. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  111. package/types/generators/TextToSpeechGgml.ts +0 -221
  112. package/types/generators/TextToSpeechOnnx.ts +0 -178
  113. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  114. package/types/generators/ThermalPrinter.ts +0 -191
  115. package/types/generators/Tick.ts +0 -83
  116. package/types/generators/Udp.ts +0 -120
  117. package/types/generators/VadGgml.ts +0 -250
  118. package/types/generators/VadOnnx.ts +0 -231
  119. package/types/generators/VadTraditional.ts +0 -138
  120. package/types/generators/VectorStore.ts +0 -257
  121. package/types/generators/Watchdog.ts +0 -107
  122. package/types/generators/WebCrawler.ts +0 -103
  123. package/types/generators/WebRtc.ts +0 -181
  124. package/types/generators/WebSocket.ts +0 -148
  125. package/types/generators/index.ts +0 -57
  126. package/types/index.ts +0 -13
  127. package/types/subspace.ts +0 -60
  128. package/types/switch.ts +0 -51
  129. package/types/system.ts +0 -707
  130. package/utils/calc.ts +0 -126
  131. package/utils/data.ts +0 -497
  132. package/utils/event-props.ts +0 -886
  133. package/utils/id.ts +0 -80
@@ -1,637 +0,0 @@
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
- }