@fugood/bricks-ctor 2.25.0-beta.8 → 2.25.0-beta.80

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 (137) hide show
  1. package/package.json +4 -24
  2. package/tools/__tests__/legacy-forwarder.test.js +91 -0
  3. package/tools/_forward.ts +26 -0
  4. package/tools/deploy.ts +3 -164
  5. package/tools/mcp-server.ts +3 -27
  6. package/tools/postinstall.ts +3 -234
  7. package/tools/pull.ts +3 -121
  8. package/tools/push-config.ts +4 -0
  9. package/tools/simulator.ts +4 -0
  10. package/compile/__tests__/index.test.js +0 -115
  11. package/compile/action-name-map.ts +0 -1015
  12. package/compile/index.ts +0 -1458
  13. package/compile/util.ts +0 -358
  14. package/index.ts +0 -6
  15. package/skills/bricks-ctor/SKILL.md +0 -32
  16. package/skills/bricks-ctor/rules/animation.md +0 -160
  17. package/skills/bricks-ctor/rules/architecture-patterns.md +0 -69
  18. package/skills/bricks-ctor/rules/automations.md +0 -221
  19. package/skills/bricks-ctor/rules/buttress.md +0 -156
  20. package/skills/bricks-ctor/rules/data-calculation.md +0 -209
  21. package/skills/bricks-ctor/rules/local-sync.md +0 -129
  22. package/skills/bricks-ctor/rules/media-flow.md +0 -158
  23. package/skills/bricks-ctor/rules/remote-data-bank.md +0 -196
  24. package/skills/bricks-ctor/rules/standby-transition.md +0 -124
  25. package/skills/bricks-design/LICENSE.txt +0 -180
  26. package/skills/bricks-design/SKILL.md +0 -66
  27. package/skills/rive-marketplace/SKILL.md +0 -99
  28. package/tools/_git-author.ts +0 -29
  29. package/tools/_shell.ts +0 -173
  30. package/tools/icons/.gitattributes +0 -1
  31. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  32. package/tools/icons/fa6pro-meta.json +0 -1
  33. package/tools/mcp-tools/compile.ts +0 -92
  34. package/tools/mcp-tools/huggingface.ts +0 -762
  35. package/tools/mcp-tools/icons.ts +0 -81
  36. package/tools/mcp-tools/lottie.ts +0 -102
  37. package/tools/mcp-tools/media.ts +0 -110
  38. package/tools/preview-main.mjs +0 -306
  39. package/tools/preview.ts +0 -150
  40. package/types/animation.ts +0 -111
  41. package/types/automation.ts +0 -235
  42. package/types/brick-base.ts +0 -80
  43. package/types/bricks/Camera.ts +0 -246
  44. package/types/bricks/Chart.ts +0 -372
  45. package/types/bricks/GenerativeMedia.ts +0 -290
  46. package/types/bricks/Icon.ts +0 -98
  47. package/types/bricks/Image.ts +0 -126
  48. package/types/bricks/Items.ts +0 -476
  49. package/types/bricks/Lottie.ts +0 -168
  50. package/types/bricks/Maps.ts +0 -262
  51. package/types/bricks/QrCode.ts +0 -117
  52. package/types/bricks/Rect.ts +0 -150
  53. package/types/bricks/RichText.ts +0 -128
  54. package/types/bricks/Rive.ts +0 -220
  55. package/types/bricks/Sketch.ts +0 -254
  56. package/types/bricks/Slideshow.ts +0 -201
  57. package/types/bricks/Svg.ts +0 -99
  58. package/types/bricks/Text.ts +0 -148
  59. package/types/bricks/TextInput.ts +0 -242
  60. package/types/bricks/Video.ts +0 -175
  61. package/types/bricks/VideoStreaming.ts +0 -112
  62. package/types/bricks/WebRtcStream.ts +0 -65
  63. package/types/bricks/WebView.ts +0 -168
  64. package/types/bricks/index.ts +0 -22
  65. package/types/canvas.ts +0 -82
  66. package/types/common.ts +0 -144
  67. package/types/data-calc-command.ts +0 -7005
  68. package/types/data-calc-script.ts +0 -21
  69. package/types/data-calc.ts +0 -11
  70. package/types/data.ts +0 -95
  71. package/types/generators/AlarmClock.ts +0 -110
  72. package/types/generators/Assistant.ts +0 -621
  73. package/types/generators/BleCentral.ts +0 -247
  74. package/types/generators/BlePeripheral.ts +0 -208
  75. package/types/generators/CanvasMap.ts +0 -74
  76. package/types/generators/CastlesPay.ts +0 -87
  77. package/types/generators/DataBank.ts +0 -160
  78. package/types/generators/File.ts +0 -432
  79. package/types/generators/GraphQl.ts +0 -132
  80. package/types/generators/Http.ts +0 -222
  81. package/types/generators/HttpServer.ts +0 -176
  82. package/types/generators/Information.ts +0 -103
  83. package/types/generators/Intent.ts +0 -168
  84. package/types/generators/Iterator.ts +0 -108
  85. package/types/generators/Keyboard.ts +0 -105
  86. package/types/generators/LlmAnthropicCompat.ts +0 -212
  87. package/types/generators/LlmAppleBuiltin.ts +0 -159
  88. package/types/generators/LlmGgml.ts +0 -861
  89. package/types/generators/LlmMediaTekNeuroPilot.ts +0 -235
  90. package/types/generators/LlmMlx.ts +0 -227
  91. package/types/generators/LlmOnnx.ts +0 -213
  92. package/types/generators/LlmOpenAiCompat.ts +0 -312
  93. package/types/generators/LlmQualcommAiEngine.ts +0 -247
  94. package/types/generators/Mcp.ts +0 -637
  95. package/types/generators/McpServer.ts +0 -289
  96. package/types/generators/MediaFlow.ts +0 -170
  97. package/types/generators/MqttBroker.ts +0 -141
  98. package/types/generators/MqttClient.ts +0 -141
  99. package/types/generators/Question.ts +0 -408
  100. package/types/generators/RealtimeTranscription.ts +0 -287
  101. package/types/generators/RerankerGgml.ts +0 -191
  102. package/types/generators/SerialPort.ts +0 -151
  103. package/types/generators/SoundPlayer.ts +0 -94
  104. package/types/generators/SoundRecorder.ts +0 -130
  105. package/types/generators/SpeechToTextGgml.ts +0 -419
  106. package/types/generators/SpeechToTextOnnx.ts +0 -236
  107. package/types/generators/SpeechToTextPlatform.ts +0 -85
  108. package/types/generators/SqLite.ts +0 -159
  109. package/types/generators/Step.ts +0 -107
  110. package/types/generators/SttAppleBuiltin.ts +0 -130
  111. package/types/generators/Tcp.ts +0 -126
  112. package/types/generators/TcpServer.ts +0 -147
  113. package/types/generators/TextToSpeechAppleBuiltin.ts +0 -127
  114. package/types/generators/TextToSpeechGgml.ts +0 -221
  115. package/types/generators/TextToSpeechOnnx.ts +0 -178
  116. package/types/generators/TextToSpeechOpenAiLike.ts +0 -121
  117. package/types/generators/ThermalPrinter.ts +0 -191
  118. package/types/generators/Tick.ts +0 -83
  119. package/types/generators/Udp.ts +0 -120
  120. package/types/generators/VadGgml.ts +0 -250
  121. package/types/generators/VadOnnx.ts +0 -231
  122. package/types/generators/VadTraditional.ts +0 -138
  123. package/types/generators/VectorStore.ts +0 -257
  124. package/types/generators/Watchdog.ts +0 -107
  125. package/types/generators/WebCrawler.ts +0 -103
  126. package/types/generators/WebRtc.ts +0 -181
  127. package/types/generators/WebSocket.ts +0 -148
  128. package/types/generators/index.ts +0 -57
  129. package/types/index.ts +0 -13
  130. package/types/subspace.ts +0 -60
  131. package/types/switch.ts +0 -51
  132. package/types/system.ts +0 -707
  133. package/utils/__tests__/id.test.js +0 -58
  134. package/utils/calc.ts +0 -126
  135. package/utils/data.ts +0 -497
  136. package/utils/event-props.ts +0 -886
  137. package/utils/id.ts +0 -80
@@ -1,621 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary
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
- /* Add a message to the assistant */
19
- export type GeneratorAssistantActionAddMessage = ActionWithParams & {
20
- __actionName: 'GENERATOR_ASSISTANT_ADD_MESSAGE'
21
- params?: Array<
22
- | {
23
- input: 'role'
24
- value?: string | DataLink | EventProperty
25
- mapping?: string
26
- }
27
- | {
28
- input: 'content'
29
- value?: string | DataLink | EventProperty
30
- mapping?: string
31
- }
32
- | {
33
- input: 'image'
34
- value?: string | DataLink | EventProperty
35
- mapping?: string
36
- }
37
- | {
38
- input: 'payload'
39
- value?: {} | DataLink | EventProperty
40
- mapping?: string
41
- }
42
- | {
43
- input: 'useFileSearch'
44
- value?: boolean | DataLink | EventProperty
45
- mapping?: string
46
- }
47
- | {
48
- input: 'filePath'
49
- value?: string | DataLink | EventProperty
50
- mapping?: string
51
- }
52
- | {
53
- input: 'fileName'
54
- value?: string | DataLink | EventProperty
55
- mapping?: string
56
- }
57
- | {
58
- input: 'fileExtension'
59
- value?: string | DataLink | EventProperty
60
- mapping?: string
61
- }
62
- | {
63
- input: 'filePayload'
64
- value?: {} | DataLink | EventProperty
65
- mapping?: string
66
- }
67
- | {
68
- input: 'fileSearchCitationCount'
69
- value?: number | DataLink | EventProperty
70
- mapping?: string
71
- }
72
- | {
73
- input: 'fileSearchInsertMethod'
74
- value?: 'in-user-message' | 'new-assistant-message' | DataLink | EventProperty
75
- mapping?: string
76
- }
77
- >
78
- }
79
-
80
- /* Initialize messages from MCP prompt */
81
- export type GeneratorAssistantActionInitMcpPrompt = ActionWithParams & {
82
- __actionName: 'GENERATOR_ASSISTANT_INIT_MCP_PROMPT'
83
- params?: Array<
84
- | {
85
- input: 'mcpClientName'
86
- value?: string | DataLink | EventProperty
87
- mapping?: string
88
- }
89
- | {
90
- input: 'mcpPromptName'
91
- value?: string | DataLink | EventProperty
92
- mapping?: string
93
- }
94
- | {
95
- input: 'mcpArguments'
96
- value?: {} | DataLink | EventProperty
97
- mapping?: string
98
- }
99
- | {
100
- input: 'firstMessageAsSystem'
101
- value?: boolean | DataLink | EventProperty
102
- mapping?: string
103
- }
104
- >
105
- }
106
-
107
- /* Add messages from MCP prompt */
108
- export type GeneratorAssistantActionAddMcpPromptMessage = ActionWithParams & {
109
- __actionName: 'GENERATOR_ASSISTANT_ADD_MCP_PROMPT_MESSAGE'
110
- params?: Array<
111
- | {
112
- input: 'mcpClientName'
113
- value?: string | DataLink | EventProperty
114
- mapping?: string
115
- }
116
- | {
117
- input: 'mcpPromptName'
118
- value?: string | DataLink | EventProperty
119
- mapping?: string
120
- }
121
- | {
122
- input: 'mcpArguments'
123
- value?: {} | DataLink | EventProperty
124
- mapping?: string
125
- }
126
- >
127
- }
128
-
129
- /* Update a message at a specific index */
130
- export type GeneratorAssistantActionUpdateMessageAtIndex = ActionWithParams & {
131
- __actionName: 'GENERATOR_ASSISTANT_UPDATE_MESSAGE_AT_INDEX'
132
- params?: Array<
133
- | {
134
- input: 'index'
135
- value?: number | DataLink | EventProperty
136
- mapping?: string
137
- }
138
- | {
139
- input: 'content'
140
- value?: string | DataLink | EventProperty
141
- mapping?: string
142
- }
143
- | {
144
- input: 'image'
145
- value?: string | DataLink | EventProperty
146
- mapping?: string
147
- }
148
- | {
149
- input: 'payload'
150
- value?: {} | DataLink | EventProperty
151
- mapping?: string
152
- }
153
- >
154
- }
155
-
156
- /* Add an audio message and convert it to text to the assistant (if STT enabled) */
157
- export type GeneratorAssistantActionAddAudioMessage = ActionWithParams & {
158
- __actionName: 'GENERATOR_ASSISTANT_ADD_AUDIO_MESSAGE'
159
- params?: Array<
160
- | {
161
- input: 'role'
162
- value?: string | DataLink | EventProperty
163
- mapping?: string
164
- }
165
- | {
166
- input: 'contentFile'
167
- value?: string | DataLink | EventProperty
168
- mapping?: string
169
- }
170
- | {
171
- input: 'contentBase64'
172
- value?: string | DataLink | EventProperty
173
- mapping?: string
174
- }
175
- | {
176
- input: 'image'
177
- value?: string | DataLink | EventProperty
178
- mapping?: string
179
- }
180
- | {
181
- input: 'useFileSearch'
182
- value?: boolean | DataLink | EventProperty
183
- mapping?: string
184
- }
185
- | {
186
- input: 'payload'
187
- value?: {} | DataLink | EventProperty
188
- mapping?: string
189
- }
190
- | {
191
- input: 'filePath'
192
- value?: string | DataLink | EventProperty
193
- mapping?: string
194
- }
195
- | {
196
- input: 'fileName'
197
- value?: string | DataLink | EventProperty
198
- mapping?: string
199
- }
200
- | {
201
- input: 'fileExtension'
202
- value?: string | DataLink | EventProperty
203
- mapping?: string
204
- }
205
- | {
206
- input: 'filePayload'
207
- value?: {} | DataLink | EventProperty
208
- mapping?: string
209
- }
210
- | {
211
- input: 'fileSearchCitationCount'
212
- value?: number | DataLink | EventProperty
213
- mapping?: string
214
- }
215
- | {
216
- input: 'fileSearchInsertMethod'
217
- value?: 'in-user-message' | 'new-assistant-message' | DataLink | EventProperty
218
- mapping?: string
219
- }
220
- >
221
- }
222
-
223
- /* Add a file to File Search (Vector Store) */
224
- export type GeneratorAssistantActionAddFile = ActionWithParams & {
225
- __actionName: 'GENERATOR_ASSISTANT_ADD_FILE'
226
- params?: Array<
227
- | {
228
- input: 'filePath'
229
- value?: string | DataLink | EventProperty
230
- mapping?: string
231
- }
232
- | {
233
- input: 'fileName'
234
- value?: string | DataLink | EventProperty
235
- mapping?: string
236
- }
237
- | {
238
- input: 'fileExtension'
239
- value?: string | DataLink | EventProperty
240
- mapping?: string
241
- }
242
- | {
243
- input: 'filePayload'
244
- value?: {} | DataLink | EventProperty
245
- mapping?: string
246
- }
247
- >
248
- }
249
-
250
- /* Remove a file from File Search (Vector Store) */
251
- export type GeneratorAssistantActionRemoveFile = ActionWithParams & {
252
- __actionName: 'GENERATOR_ASSISTANT_REMOVE_FILE'
253
- params?: Array<{
254
- input: 'fileName'
255
- value?: string | DataLink | EventProperty
256
- mapping?: string
257
- }>
258
- }
259
-
260
- /* Update a audio message at a specific index */
261
- export type GeneratorAssistantActionUpdateAudioMessageAtIndex = ActionWithParams & {
262
- __actionName: 'GENERATOR_ASSISTANT_UPDATE_AUDIO_MESSAGE_AT_INDEX'
263
- params?: Array<
264
- | {
265
- input: 'index'
266
- value?: number | DataLink | EventProperty
267
- mapping?: string
268
- }
269
- | {
270
- input: 'contentFile'
271
- value?: string | DataLink | EventProperty
272
- mapping?: string
273
- }
274
- | {
275
- input: 'contentBase64'
276
- value?: string | DataLink | EventProperty
277
- mapping?: string
278
- }
279
- | {
280
- input: 'image'
281
- value?: string | DataLink | EventProperty
282
- mapping?: string
283
- }
284
- | {
285
- input: 'payload'
286
- value?: {} | DataLink | EventProperty
287
- mapping?: string
288
- }
289
- >
290
- }
291
-
292
- /* Remove a message at a specific index */
293
- export type GeneratorAssistantActionRemoveMessageAtIndex = ActionWithParams & {
294
- __actionName: 'GENERATOR_ASSISTANT_REMOVE_MESSAGE_AT_INDEX'
295
- params?: Array<{
296
- input: 'index'
297
- value?: number | DataLink | EventProperty
298
- mapping?: string
299
- }>
300
- }
301
-
302
- /* Reset all messages of the assistant */
303
- export type GeneratorAssistantActionResetMessages = Action & {
304
- __actionName: 'GENERATOR_ASSISTANT_RESET_MESSAGES'
305
- }
306
-
307
- /* Reset assistant (Reset all messages and files) */
308
- export type GeneratorAssistantActionReset = Action & {
309
- __actionName: 'GENERATOR_ASSISTANT_RESET'
310
- }
311
-
312
- /* Submit the assistant */
313
- export type GeneratorAssistantActionSubmit = ActionWithParams & {
314
- __actionName: 'GENERATOR_ASSISTANT_SUBMIT'
315
- params?: Array<
316
- | {
317
- input: 'continueOnToolCallConfirm'
318
- value?: boolean | DataLink | EventProperty
319
- mapping?: string
320
- }
321
- | {
322
- input: 'continueOnToolCallStrategy'
323
- value?: 'never' | 'success' | 'always' | DataLink | EventProperty
324
- mapping?: string
325
- }
326
- | {
327
- input: 'continueOnToolCallLimit'
328
- value?: number | DataLink | EventProperty
329
- mapping?: string
330
- }
331
- >
332
- }
333
-
334
- /* Cancel the assistant responding */
335
- export type GeneratorAssistantActionCancel = Action & {
336
- __actionName: 'GENERATOR_ASSISTANT_CANCEL'
337
- }
338
-
339
- /* Check the enabled MCP clients connection status and available tools */
340
- export type GeneratorAssistantActionCheckMcpServers = Action & {
341
- __actionName: 'GENERATOR_ASSISTANT_CHECK_MCP_SERVERS'
342
- }
343
-
344
- /* Insert an MCP resource as a new assistant message */
345
- export type GeneratorAssistantActionInsertMcpResource = ActionWithParams & {
346
- __actionName: 'GENERATOR_ASSISTANT_INSERT_MCP_RESOURCE'
347
- params?: Array<
348
- | {
349
- input: 'mcpClientName'
350
- value?: string | DataLink | EventProperty
351
- mapping?: string
352
- }
353
- | {
354
- input: 'mcpResourceUri'
355
- value?: string | DataLink | EventProperty
356
- mapping?: string
357
- }
358
- | {
359
- input: 'mcpVariables'
360
- value?: {} | DataLink | EventProperty
361
- mapping?: string
362
- }
363
- | {
364
- input: 'role'
365
- value?: string | DataLink | EventProperty
366
- mapping?: string
367
- }
368
- >
369
- }
370
-
371
- /* Summarize messages based on the conversation
372
-
373
- Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
374
- export type GeneratorAssistantActionSummaryMessages = ActionWithParams & {
375
- __actionName: 'GENERATOR_ASSISTANT_SUMMARY_MESSAGES'
376
- params?: Array<
377
- | {
378
- input: 'summaryMessages'
379
- value?: Array<any> | DataLink | EventProperty
380
- mapping?: string
381
- }
382
- | {
383
- input: 'summarySessionKey'
384
- value?: string | DataLink | EventProperty
385
- mapping?: string
386
- }
387
- >
388
- }
389
-
390
- interface GeneratorAssistantDef {
391
- /*
392
- Default property:
393
- {
394
- "initialMessages": [
395
- {
396
- "role": "system",
397
- "content": "You are a helpful assistant."
398
- }
399
- ],
400
- "cacheMessages": false,
401
- "llmLivePolicy": "only-in-use",
402
- "llmSessionKey": "default-assistant",
403
- "llmAutoSummaryMessages": false,
404
- "llmSummaryMessages": [
405
- {
406
- "role": "system",
407
- "content": "You are a helpful assistant specialized in summarizing conversations. Create a concise summary of the conversation that captures the key points while maintaining important context. The summary should be clear, accurate, and briefer than the original conversation."
408
- },
409
- {
410
- "role": "user",
411
- "content": "Please summarize the following conversation into a concise system message that can replace the previous conversation context while maintaining all important information. Here is the conversation to summarize:\n\n"
412
- }
413
- ],
414
- "llmSummarySessionKey": "assistant-default-summary",
415
- "fileSearchEnabled": false,
416
- "fileSearchLivePolicy": "only-in-use",
417
- "sttEnabled": true,
418
- "sttLivePolicy": "only-in-use",
419
- "ttsEnabled": false,
420
- "ttsLivePolicy": "only-in-use",
421
- "mcpResourceAnnotationEnabled": false,
422
- "mcpResourceAnnotationKeyword": "@resource:",
423
- "mcpResourceAnnotationFallback": ""
424
- }
425
- */
426
- property?: {
427
- /* Whether to heat up generators on initialization for better performance */
428
- heatup?: boolean | DataLink
429
- /* Messages */
430
- initialMessages?:
431
- | Array<
432
- | DataLink
433
- | {
434
- role?: string | DataLink
435
- content?: string | DataLink
436
- }
437
- >
438
- | DataLink
439
- /* Whether to cache messages */
440
- cacheMessages?: boolean | DataLink
441
- /* LLM Generator (Supports `LLM (GGML)`, `LLM (MLX)`, `OpenAI LLM`, `LLM (Qualcomm AI Engine)`, `LLM (ONNX)`, `LLM (Anthropic-compat)`, and `LLM (MediaTek NeuroPilot)` generators) */
442
- llmGeneratorId?: string | DataLink | (() => Generator)
443
- /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
444
-
445
- Note: LLM (Qualcomm AI Engine) recommend use `manual` and loaded constantly. */
446
- llmLivePolicy?: 'only-in-use' | 'manual' | DataLink
447
- /* LLM main session key */
448
- llmSessionKey?: string | DataLink
449
- /* Auto Summary Messages (Automatically summarize messages when the LLM context is full or content gets truncated, currently only supported with LLM (GGML) generators)
450
-
451
- Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
452
- llmAutoSummaryMessages?: boolean | DataLink
453
- /* Summary Messages (Messages used for summarization prompt, conversation will be appended to the last message) */
454
- llmSummaryMessages?:
455
- | Array<
456
- | DataLink
457
- | {
458
- role?: string | DataLink
459
- content?: string | DataLink
460
- }
461
- >
462
- | DataLink
463
- /* Summary Session Key (Custom session key for summarization) */
464
- llmSummarySessionKey?: string | DataLink
465
- /* Generate fallback content for tool calls when LLM returns tool calls without text content. When enabled, creates a message like "Call:
466
- functionName(args)" to keep the conversation readable. */
467
- llmToolCallFallbackContent?: boolean | DataLink
468
- /* File Search (Vector Store) Enabled */
469
- fileSearchEnabled?: boolean | DataLink
470
- /* File Search (Vector Store) Generator */
471
- fileSearchGeneratorId?: string | DataLink | (() => Generator)
472
- /* File Search (Vector Store) Live Policy. If the policy is `only-in-use`, the File Search (Vector Store) context will be released when the assistant is not in use. */
473
- fileSearchLivePolicy?: 'only-in-use' | 'manual' | DataLink
474
- /* File Search Citation Count. (Default: 3) */
475
- fileSearchCitationCount?: number | DataLink
476
- /* File Search Threshold. (Default: 1.0) */
477
- fileSearchThreshold?: number | DataLink
478
- /* File Search Ignore Threshold. (Default: false) */
479
- fileSearchIgnoreThreshold?: boolean | DataLink
480
- /* STT Generator use for transcribing audio message (Supports `STT (GGML)` generators) */
481
- sttGeneratorId?: string | DataLink | (() => Generator)
482
- /* STT Enabled */
483
- sttEnabled?: boolean | DataLink
484
- /* STT Live Policy. If the policy is `only-in-use`, the STT context will be released when the assistant is not in use. */
485
- sttLivePolicy?: 'only-in-use' | 'manual' | DataLink
486
- /* TTS Generator use for generating LLM response audio message (Supports `TTS (ONNX)` and `OpenAI TTS` generators) */
487
- ttsGeneratorId?: string | DataLink | (() => Generator)
488
- /* TTS Enabled */
489
- ttsEnabled?: boolean | DataLink
490
- /* TTS Live Policy. If the policy is `only-in-use`, the TTS context will be released when the assistant is not in use. */
491
- ttsLivePolicy?: 'only-in-use' | 'manual' | DataLink
492
- /* MCP Generators (Add a unique name if generator name property are duplicate) */
493
- mcpGenerators?:
494
- | Array<
495
- | DataLink
496
- | {
497
- generatorId?: string | DataLink | (() => Generator)
498
- generatorKey?: string | DataLink
499
- name?: string | DataLink
500
- enabled?: boolean | DataLink
501
- includeTools?: Array<string | DataLink> | DataLink
502
- excludeTools?: Array<string | DataLink> | DataLink
503
- blockTools?: Array<string | DataLink> | DataLink
504
- blockToolMessage?: string | DataLink
505
- }
506
- >
507
- | DataLink
508
- /* Enable MCP resource annotation in messages. When enabled, users can use keyboard shortcuts to include MCP resources using the format: @resource:<server-name>:<resource-uri> */
509
- mcpResourceAnnotationEnabled?: boolean | DataLink
510
- /* MCP resource annotation keyword (Default: @resource:) */
511
- mcpResourceAnnotationKeyword?: string | DataLink
512
- /* Fallback text when MCP server or resource is not found. If empty, an error will be thrown. */
513
- mcpResourceAnnotationFallback?: string | DataLink
514
- }
515
- events?: {
516
- /* Error event */
517
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onError']>>
518
- /* Log event */
519
- onLogs?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onLogs']>>
520
- /* Messages update event */
521
- onMessagesUpdate?: Array<
522
- EventAction<string & keyof TemplateEventPropsMap['Assistant']['onMessagesUpdate']>
523
- >
524
- /* Heatup finished event */
525
- onHeatupFinished?: Array<EventAction>
526
- /* Generating event (triggered when assistant starts generating response) */
527
- onGenerating?: Array<EventAction>
528
- /* Finished event (triggered when assistant finishes generating response) */
529
- onFinished?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onFinished']>>
530
- }
531
- outlets?: {
532
- /* Whether the assistant is heating up */
533
- isHeatingUp?: () => Data<boolean>
534
- /* Whether the assistant is file processing */
535
- isFileProcessing?: () => Data<boolean>
536
- /* Whether the assistant is responding */
537
- isResponding?: () => Data<boolean>
538
- /* Whether the assistant is busy */
539
- isBusy?: () => Data<boolean>
540
- /* Embedding files of the assistant */
541
- files?: () => Data<Array<any>>
542
- /* Messages of the assistant */
543
- messages?: () => Data<
544
- Array<{
545
- role?: string
546
- name?: string
547
- content?: any
548
- tool_call_id?: string
549
- tool_calls?: Array<{
550
- id?: string
551
- type?: string
552
- function?: {
553
- name?: string
554
- arguments?: string
555
- [key: string]: any
556
- }
557
- [key: string]: any
558
- }>
559
- reasoning_content?: string
560
- audio?: {
561
- generating?: boolean
562
- [key: string]: any
563
- }
564
- last_generated_at?: number
565
- responding?: boolean
566
- is_summary?: boolean
567
- summary_created_at?: number
568
- [key: string]: any
569
- }>
570
- >
571
- /* MCP servers status and available tools */
572
- mcpServers?: () => Data<
573
- Array<{
574
- generatorId?: string
575
- generatorKey?: string
576
- name?: string
577
- version?: string
578
- connected?: boolean
579
- error?: string
580
- resources?: Array<{
581
- name?: string
582
- [key: string]: any
583
- }>
584
- tools?: Array<{
585
- name?: string
586
- [key: string]: any
587
- }>
588
- [key: string]: any
589
- }>
590
- >
591
- }
592
- }
593
-
594
- /* Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary */
595
- export type GeneratorAssistant = Generator &
596
- GeneratorAssistantDef & {
597
- templateKey: 'GENERATOR_ASSISTANT'
598
- switches?: Array<
599
- SwitchDef &
600
- GeneratorAssistantDef & {
601
- conds?: Array<{
602
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
603
- cond:
604
- | SwitchCondInnerStateCurrentCanvas
605
- | SwitchCondData
606
- | {
607
- __typename: 'SwitchCondInnerStateOutlet'
608
- outlet:
609
- | 'isHeatingUp'
610
- | 'isFileProcessing'
611
- | 'isResponding'
612
- | 'isBusy'
613
- | 'files'
614
- | 'messages'
615
- | 'mcpServers'
616
- value: any
617
- }
618
- }>
619
- }
620
- >
621
- }