@fugood/bricks-project 2.22.0-beta.3 → 2.22.0-beta.30

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 (87) hide show
  1. package/compile/action-name-map.ts +176 -1
  2. package/compile/index.ts +1 -0
  3. package/package.json +3 -3
  4. package/tools/postinstall.ts +17 -11
  5. package/types/animation.ts +2 -1
  6. package/types/brick-base.ts +77 -0
  7. package/types/bricks/3DViewer.ts +200 -0
  8. package/types/bricks/Camera.ts +195 -0
  9. package/types/bricks/Chart.ts +362 -0
  10. package/types/bricks/GenerativeMedia.ts +237 -0
  11. package/types/bricks/Icon.ts +90 -0
  12. package/types/bricks/Image.ts +101 -0
  13. package/types/bricks/Items.ts +461 -0
  14. package/types/bricks/Lottie.ts +156 -0
  15. package/types/bricks/QrCode.ts +109 -0
  16. package/types/bricks/Rect.ts +107 -0
  17. package/types/bricks/RichText.ts +120 -0
  18. package/types/bricks/Rive.ts +209 -0
  19. package/types/bricks/Slideshow.ts +155 -0
  20. package/types/bricks/Svg.ts +91 -0
  21. package/types/bricks/Text.ts +140 -0
  22. package/types/bricks/TextInput.ts +231 -0
  23. package/types/bricks/Video.ts +167 -0
  24. package/types/bricks/VideoStreaming.ts +104 -0
  25. package/types/bricks/WebRtcStream.ts +60 -0
  26. package/types/bricks/WebView.ts +157 -0
  27. package/types/bricks/index.ts +20 -0
  28. package/types/canvas.ts +1 -1
  29. package/types/common.ts +3 -3
  30. package/types/data.ts +6 -0
  31. package/types/generators/AlarmClock.ts +102 -0
  32. package/types/generators/Assistant.ts +546 -0
  33. package/types/generators/BleCentral.ts +225 -0
  34. package/types/generators/BlePeripheral.ts +202 -0
  35. package/types/generators/CanvasMap.ts +57 -0
  36. package/types/generators/CastlesPay.ts +77 -0
  37. package/types/generators/DataBank.ts +123 -0
  38. package/types/generators/File.ts +351 -0
  39. package/types/generators/GraphQl.ts +124 -0
  40. package/types/generators/Http.ts +117 -0
  41. package/types/generators/HttpServer.ts +156 -0
  42. package/types/generators/Information.ts +97 -0
  43. package/types/generators/Intent.ts +107 -0
  44. package/types/generators/Iterator.ts +95 -0
  45. package/types/generators/Keyboard.ts +85 -0
  46. package/types/generators/LlmAnthropicCompat.ts +188 -0
  47. package/types/generators/LlmGgml.ts +719 -0
  48. package/types/generators/LlmOnnx.ts +184 -0
  49. package/types/generators/LlmOpenAiCompat.ts +206 -0
  50. package/types/generators/LlmQualcommAiEngine.ts +213 -0
  51. package/types/generators/Mcp.ts +294 -0
  52. package/types/generators/McpServer.ts +245 -0
  53. package/types/generators/MediaFlow.ts +142 -0
  54. package/types/generators/MqttBroker.ts +121 -0
  55. package/types/generators/MqttClient.ts +129 -0
  56. package/types/generators/Question.ts +395 -0
  57. package/types/generators/RealtimeTranscription.ts +172 -0
  58. package/types/generators/RerankerGgml.ts +153 -0
  59. package/types/generators/SerialPort.ts +141 -0
  60. package/types/generators/SoundPlayer.ts +86 -0
  61. package/types/generators/SoundRecorder.ts +113 -0
  62. package/types/generators/SpeechToTextGgml.ts +462 -0
  63. package/types/generators/SpeechToTextOnnx.ts +227 -0
  64. package/types/generators/SpeechToTextPlatform.ts +75 -0
  65. package/types/generators/SqLite.ts +118 -0
  66. package/types/generators/Step.ts +101 -0
  67. package/types/generators/TapToPayOnIPhone.ts +175 -0
  68. package/types/generators/Tcp.ts +120 -0
  69. package/types/generators/TcpServer.ts +137 -0
  70. package/types/generators/TextToSpeechGgml.ts +182 -0
  71. package/types/generators/TextToSpeechOnnx.ts +169 -0
  72. package/types/generators/TextToSpeechOpenAiLike.ts +113 -0
  73. package/types/generators/ThermalPrinter.ts +185 -0
  74. package/types/generators/Tick.ts +75 -0
  75. package/types/generators/Udp.ts +109 -0
  76. package/types/generators/VadGgml.ts +211 -0
  77. package/types/generators/VectorStore.ts +223 -0
  78. package/types/generators/Watchdog.ts +96 -0
  79. package/types/generators/WebCrawler.ts +97 -0
  80. package/types/generators/WebRtc.ts +165 -0
  81. package/types/generators/WebSocket.ts +142 -0
  82. package/types/generators/index.ts +51 -0
  83. package/types/system.ts +64 -0
  84. package/utils/data.ts +45 -0
  85. package/utils/event-props.ts +210 -0
  86. package/types/bricks.ts +0 -3166
  87. package/types/generators.ts +0 -6671
@@ -0,0 +1,142 @@
1
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
2
+ import type { Data, DataLink } from '../data'
3
+ import type {
4
+ Generator,
5
+ EventAction,
6
+ ActionWithDataParams,
7
+ ActionWithParams,
8
+ Action,
9
+ EventProperty,
10
+ } from '../common'
11
+
12
+ /* Connect */
13
+ export type GeneratorWebSocketActionConnect = Action & {
14
+ __actionName: 'GENERATOR_WEB_SOCKET_CONNECT'
15
+ }
16
+
17
+ /* Disconnect */
18
+ export type GeneratorWebSocketActionDisconnect = Action & {
19
+ __actionName: 'GENERATOR_WEB_SOCKET_DISCONNECT'
20
+ }
21
+
22
+ /* Emit event (Acknowledgement: It's callback, the channel of Socket.IO server can used it as last argument) */
23
+ export type GeneratorWebSocketActionEmit = ActionWithParams & {
24
+ __actionName: 'GENERATOR_WEB_SOCKET_EMIT'
25
+ params?: Array<
26
+ | {
27
+ input: 'eventName'
28
+ value?: string | DataLink | EventProperty
29
+ mapping?: string
30
+ }
31
+ | {
32
+ input: 'arguments'
33
+ value?: Array<any> | DataLink | EventProperty
34
+ mapping?: string
35
+ }
36
+ | {
37
+ input: 'acknowledgementType'
38
+ value?: 'text' | 'json' | DataLink | EventProperty
39
+ mapping?: string
40
+ }
41
+ | {
42
+ input: 'withAcknowledgement'
43
+ value?: boolean | DataLink | EventProperty
44
+ mapping?: string
45
+ }
46
+ >
47
+ }
48
+
49
+ /* Emit `message` */
50
+ export type GeneratorWebSocketActionSend = ActionWithParams & {
51
+ __actionName: 'GENERATOR_WEB_SOCKET_SEND'
52
+ params?: Array<{
53
+ input: 'value'
54
+ value?: string | DataLink | EventProperty
55
+ mapping?: string
56
+ }>
57
+ }
58
+
59
+ interface GeneratorWebSocketDef {
60
+ /*
61
+ Default property:
62
+ {}
63
+ */
64
+ property?: {
65
+ /* Try to connect on generator initialized */
66
+ init?: boolean | DataLink
67
+ /* Endpoint URL (support namespace) */
68
+ url?: string | DataLink
69
+ /* Name of the path that is captured on the server side */
70
+ path?: string | DataLink
71
+ /* URL query parameters */
72
+ query?: {} | DataLink
73
+ /* Whether to reconnect automatically */
74
+ reconnection?: boolean | DataLink
75
+ /* Number of reconnection attempts before giving up */
76
+ attemptTimes?: number | DataLink
77
+ /* How long to initially wait before attempting a new reconnection (1000). Affected by +/- randomizationFactor, for example the default initial delay will be between 500 to 1500ms. */
78
+ delayBase?: number | DataLink
79
+ /* Maximum amount of time to wait between reconnections (5000). Each attempt increases the reconnection delay by 2x along with a randomization as above */
80
+ delayMax?: number | DataLink
81
+ /* Randomization factor 0 <= deplayRandom <= 1 */
82
+ delayRandom?: number | DataLink
83
+ /* Message type, if type is json it's will auto transform to object */
84
+ messageType?: 'json' | 'text' | DataLink
85
+ /* Use Socket.IO as transport channel */
86
+ socketIoEnable?: boolean | DataLink
87
+ /* Socket.IO Version */
88
+ socketIoVersion?: 'latest' | 'v4' | 'v2' | DataLink
89
+ /* Whether to reuse an existing connection */
90
+ socketIoForceNew?: boolean | DataLink
91
+ /* Connection timeout before a connect_error and connect_timeout events are emitted */
92
+ socketIoTimeout?: number | DataLink
93
+ /* Event name to be subscribe */
94
+ socketIoEventName?: string | DataLink
95
+ /* Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side) */
96
+ socketIoQuery?: {} | DataLink
97
+ /* Protocols to be used in the WebSocket connection */
98
+ wsProtocols?: Array<string | DataLink> | DataLink | string | DataLink | DataLink
99
+ }
100
+ events?: {
101
+ /* Event for connected to server */
102
+ onOpen?: Array<EventAction>
103
+ /* Event for disconnect from server */
104
+ onClose?: Array<EventAction>
105
+ /* Event for receive message */
106
+ onMessage?: Array<EventAction>
107
+ /* Event for error occurred */
108
+ onError?: Array<EventAction>
109
+ }
110
+ outlets?: {
111
+ /* Show socket.io connected or not */
112
+ readyState?: () => Data
113
+ /* Results of each countdown change, it will save to Data */
114
+ message?: () => Data
115
+ /* When Socket.IO mode server can response acknowledgemnt with data to client */
116
+ acknowledgeData?: () => Data
117
+ /* Error message */
118
+ errorMessage?: () => Data
119
+ }
120
+ }
121
+
122
+ /* WebSocket or Socket.IO Generator */
123
+ export type GeneratorWebSocket = Generator &
124
+ GeneratorWebSocketDef & {
125
+ templateKey: 'GENERATOR_WEB_SOCKET'
126
+ switches: Array<
127
+ SwitchDef &
128
+ GeneratorWebSocketDef & {
129
+ conds?: Array<{
130
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
131
+ cond:
132
+ | SwitchCondInnerStateCurrentCanvas
133
+ | SwitchCondData
134
+ | {
135
+ __typename: 'SwitchCondInnerStateOutlet'
136
+ outlet: 'readyState' | 'message' | 'acknowledgeData' | 'errorMessage'
137
+ value: any
138
+ }
139
+ }>
140
+ }
141
+ >
142
+ }
@@ -0,0 +1,51 @@
1
+ export * from './Tick'
2
+ export * from './AlarmClock'
3
+ export * from './File'
4
+ export * from './MediaFlow'
5
+ export * from './DataBank'
6
+ export * from './GraphQl'
7
+ export * from './Http'
8
+ export * from './SoundPlayer'
9
+ export * from './Keyboard'
10
+ export * from './WebSocket'
11
+ export * from './CanvasMap'
12
+ export * from './Step'
13
+ export * from './Iterator'
14
+ export * from './Watchdog'
15
+ export * from './MqttClient'
16
+ export * from './MqttBroker'
17
+ export * from './BleCentral'
18
+ export * from './SerialPort'
19
+ export * from './Tcp'
20
+ export * from './TcpServer'
21
+ export * from './Udp'
22
+ export * from './HttpServer'
23
+ export * from './WebRtc'
24
+ export * from './WebCrawler'
25
+ export * from './SoundRecorder'
26
+ export * from './BlePeripheral'
27
+ export * from './Question'
28
+ export * from './Information'
29
+ export * from './Intent'
30
+ export * from './TapToPayOnIPhone'
31
+ export * from './CastlesPay'
32
+ export * from './SpeechToTextPlatform'
33
+ export * from './ThermalPrinter'
34
+ export * from './SqLite'
35
+ export * from './McpServer'
36
+ export * from './Mcp'
37
+ export * from './TextToSpeechOnnx'
38
+ export * from './LlmOnnx'
39
+ export * from './SpeechToTextOnnx'
40
+ export * from './SpeechToTextGgml'
41
+ export * from './VadGgml'
42
+ export * from './RealtimeTranscription'
43
+ export * from './LlmGgml'
44
+ export * from './TextToSpeechGgml'
45
+ export * from './RerankerGgml'
46
+ export * from './LlmQualcommAiEngine'
47
+ export * from './LlmOpenAiCompat'
48
+ export * from './TextToSpeechOpenAiLike'
49
+ export * from './LlmAnthropicCompat'
50
+ export * from './Assistant'
51
+ export * from './VectorStore'
package/types/system.ts CHANGED
@@ -467,6 +467,16 @@ export type SystemActionChannelPublish = ActionWithParams & {
467
467
  >
468
468
  }
469
469
 
470
+ /* Delay for a certain time between actions */
471
+ export type SystemActionDelay = ActionWithParams & {
472
+ __actionName: 'DELAY'
473
+ params?: Array<{
474
+ input: 'time'
475
+ value?: number | DataLink | EventProperty
476
+ mapping?: string
477
+ }>
478
+ }
479
+
470
480
  /* [Internal] Use a shared application */
471
481
  export type SystemActionUseShareApplication = ActionWithParams & {
472
482
  __actionName: 'USE_SHARE_APPLICATION'
@@ -599,3 +609,57 @@ export type SystemActionThrowException = ActionWithParams & {
599
609
  export type SystemActionDismissKeyboard = Action & {
600
610
  __actionName: 'DISMISS_KEYBOARD'
601
611
  }
612
+
613
+ /* Trigger application AI filter */
614
+ export type SystemActionTriggerApplicationFilter = ActionWithParams & {
615
+ __actionName: 'TRIGGER_APPLICATION_FILTER'
616
+ params?: Array<
617
+ | {
618
+ input: 'name'
619
+ value?: string | DataLink | EventProperty
620
+ mapping?: string
621
+ }
622
+ | {
623
+ input: 'variables'
624
+ value?: any | EventProperty
625
+ mapping?: string
626
+ }
627
+ | {
628
+ input: 'result'
629
+ value?: string | DataLink | (() => Data) | EventProperty
630
+ mapping?: string
631
+ }
632
+ | {
633
+ input: 'error'
634
+ value?: string | DataLink | (() => Data) | EventProperty
635
+ mapping?: string
636
+ }
637
+ >
638
+ }
639
+
640
+ /* Stop running application AI filter */
641
+ export type SystemActionStopApplicationFilter = Action & {
642
+ __actionName: 'STOP_APPLICATION_FILTER'
643
+ }
644
+
645
+ /* Save update snapshot (from Application Filter or DevTools MCP Server) to media system */
646
+ export type SystemActionSaveUpdateSnapshot = ActionWithParams & {
647
+ __actionName: 'SAVE_UPDATE_SNAPSHOT'
648
+ params?: Array<
649
+ | {
650
+ input: 'snapshotFileIndentifier'
651
+ value?: string | DataLink | EventProperty
652
+ mapping?: string
653
+ }
654
+ | {
655
+ input: 'snapshotSaveResult'
656
+ value?: string | DataLink | (() => Data) | EventProperty
657
+ mapping?: string
658
+ }
659
+ | {
660
+ input: 'snapshotErrorResult'
661
+ value?: string | DataLink | (() => Data) | EventProperty
662
+ mapping?: string
663
+ }
664
+ >
665
+ }
package/utils/data.ts CHANGED
@@ -64,6 +64,7 @@ type SystemDataName =
64
64
  | 'workspaceName'
65
65
  | 'applicationInfo'
66
66
  | 'applicationName'
67
+ | 'deviceID'
67
68
  | 'macAddress'
68
69
  | 'bindDeviceCode'
69
70
  | 'bindDeviceCodeExpire'
@@ -74,6 +75,10 @@ type SystemDataName =
74
75
  | 'env'
75
76
  | 'isViewDebugModeEnabled'
76
77
  | 'language'
78
+ | 'aiFilters'
79
+ | 'systemOpenAIApiKey'
80
+ | 'systemAnthropicApiKey'
81
+ | 'systemGeminiApiKey'
77
82
 
78
83
  type SystemDataInfo = {
79
84
  name: SystemDataName
@@ -343,6 +348,14 @@ export const systemDataList: Array<SystemDataInfo> = [
343
348
  type: 'string',
344
349
  value: '',
345
350
  },
351
+ {
352
+ name: 'deviceID',
353
+ id: 'PROPERTY_BANK_DATA_NODE_8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e',
354
+ title: 'SYSTEM: Device ID',
355
+ description: 'Device ID of current device',
356
+ type: 'string',
357
+ value: 'unknown',
358
+ },
346
359
  {
347
360
  name: 'macAddress',
348
361
  id: 'PROPERTY_BANK_DATA_NODE_f01fcc78-0723-11ed-ac00-877339de1030',
@@ -423,6 +436,38 @@ export const systemDataList: Array<SystemDataInfo> = [
423
436
  type: 'string',
424
437
  value: '',
425
438
  },
439
+ {
440
+ name: 'aiFilters',
441
+ id: 'PROPERTY_BANK_DATA_NODE_3ffc1e98-8f65-4cc8-a949-3da8d2092ccb',
442
+ title: 'SYSTEM: AI Filters',
443
+ description: 'AI filters configuration from the application',
444
+ type: 'array',
445
+ value: [],
446
+ },
447
+ {
448
+ name: 'systemOpenAIApiKey',
449
+ id: 'PROPERTY_BANK_DATA_NODE_a1b2c3d4-5e6f-7890-abcd-ef1234567890',
450
+ title: 'SYSTEM: OpenAI API Key',
451
+ description: 'System OpenAI API Key (only available if application enabled)',
452
+ type: 'string',
453
+ value: '',
454
+ },
455
+ {
456
+ name: 'systemAnthropicApiKey',
457
+ id: 'PROPERTY_BANK_DATA_NODE_b2c3d4e5-6f78-9012-bcde-f23456789012',
458
+ title: 'SYSTEM: Anthropic API Key',
459
+ description: 'System Anthropic API Key (only available if application enabled)',
460
+ type: 'string',
461
+ value: '',
462
+ },
463
+ {
464
+ name: 'systemGeminiApiKey',
465
+ id: 'PROPERTY_BANK_DATA_NODE_c3d4e5f6-7890-1234-cdef-345678901234',
466
+ title: 'SYSTEM: Gemini API Key',
467
+ description: 'System Gemini API Key (only available if application enabled)',
468
+ type: 'string',
469
+ value: '',
470
+ },
426
471
  ]
427
472
 
428
473
  export const useSystemData = (name: SystemDataName): Data => {
@@ -615,6 +615,103 @@ export const templateEventPropsMap = {
615
615
  'GENERATOR_SQLITE_QUERY_RESULT', // type: array
616
616
  ],
617
617
  },
618
+ GENERATOR_MCP_SERVER: {
619
+ onError: [
620
+ 'GENERATOR_MCP_SERVER_ERROR_MESSAGE', // type: string
621
+ ],
622
+ onClientError: [
623
+ 'GENERATOR_MCP_SERVER_CLIENT_ADDRESS', // type: string
624
+ 'GENERATOR_MCP_SERVER_SESSION_ID', // type: string
625
+ 'GENERATOR_MCP_SERVER_ERROR_MESSAGE', // type: string
626
+ ],
627
+ onClientClose: [
628
+ 'GENERATOR_MCP_SERVER_CLIENT_ADDRESS', // type: string
629
+ 'GENERATOR_MCP_SERVER_SESSION_ID', // type: string
630
+ ],
631
+ onRequestResource: [
632
+ 'GENERATOR_MCP_SERVER_REQUEST_ID', // type: string
633
+ 'GENERATOR_MCP_SERVER_REQUEST_NAME', // type: string
634
+ 'GENERATOR_MCP_SERVER_REQUEST_URI', // type: string
635
+ 'GENERATOR_MCP_SERVER_REQUEST_VARIABLES', // type: object
636
+ 'GENERATOR_MCP_SERVER_REQUEST_TIMEOUT', // type: number
637
+ 'GENERATOR_MCP_SERVER_REQUEST', // type: object
638
+ ],
639
+ onCallTool: [
640
+ 'GENERATOR_MCP_SERVER_REQUEST_ID', // type: string
641
+ 'GENERATOR_MCP_SERVER_REQUEST_NAME', // type: string
642
+ 'GENERATOR_MCP_SERVER_REQUEST_VARIABLES', // type: object
643
+ 'GENERATOR_MCP_SERVER_REQUEST_TIMEOUT', // type: number
644
+ 'GENERATOR_MCP_SERVER_REQUEST', // type: object
645
+ ],
646
+ onGetPrompt: [
647
+ 'GENERATOR_MCP_SERVER_REQUEST_ID', // type: string
648
+ 'GENERATOR_MCP_SERVER_REQUEST_NAME', // type: string
649
+ 'GENERATOR_MCP_SERVER_REQUEST_VARIABLES', // type: object
650
+ 'GENERATOR_MCP_SERVER_REQUEST_TIMEOUT', // type: number
651
+ 'GENERATOR_MCP_SERVER_REQUEST', // type: object
652
+ ],
653
+ },
654
+ GENERATOR_MCP: {
655
+ onConnectionError: [
656
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
657
+ ],
658
+ onListResources: [
659
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
660
+ 'GENERATOR_MCP_RESPONSE', // type: object
661
+ ],
662
+ onListResourcesError: [
663
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
664
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
665
+ ],
666
+ onListResourceTemplates: [
667
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
668
+ 'GENERATOR_MCP_RESPONSE', // type: object
669
+ ],
670
+ onListResourceTemplatesError: [
671
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
672
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
673
+ ],
674
+ onReadResource: [
675
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
676
+ 'GENERATOR_MCP_RESPONSE', // type: object
677
+ ],
678
+ onReadResourceError: [
679
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
680
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
681
+ ],
682
+ onListTools: [
683
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
684
+ 'GENERATOR_MCP_RESPONSE', // type: object
685
+ ],
686
+ onListToolsError: [
687
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
688
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
689
+ ],
690
+ onCallTool: [
691
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
692
+ 'GENERATOR_MCP_RESPONSE', // type: object
693
+ ],
694
+ onCallToolError: [
695
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
696
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
697
+ ],
698
+ onListPrompts: [
699
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
700
+ 'GENERATOR_MCP_RESPONSE', // type: object
701
+ ],
702
+ onListPromptsError: [
703
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
704
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
705
+ ],
706
+ onGetPrompt: [
707
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
708
+ 'GENERATOR_MCP_RESPONSE', // type: object
709
+ ],
710
+ onGetPromptError: [
711
+ 'GENERATOR_MCP_REQUEST_ID', // type: string
712
+ 'GENERATOR_MCP_ERROR_MESSAGE', // type: string
713
+ ],
714
+ },
618
715
  GENERATOR_TTS: {
619
716
  onContextStateChange: [
620
717
  'GENERATOR_TTS_CONTEXT_STATE', // type: string
@@ -627,6 +724,16 @@ export const templateEventPropsMap = {
627
724
  onContextStateChange: [
628
725
  'GENERATOR_ONNX_LLM_CONTEXT_STATE', // type: string
629
726
  ],
727
+ onFunctionCall: [
728
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_NAME', // type: string
729
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_ARGUMENTS', // type: object
730
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_DETAILS', // type: object
731
+ ],
732
+ onCompletionFinished: [
733
+ 'GENERATOR_ONNX_LLM_COMPLETION_RESULT', // type: string
734
+ 'GENERATOR_ONNX_LLM_COMPLETION_TOOL_CALLS', // type: array
735
+ 'GENERATOR_ONNX_LLM_COMPLETION_FULL_CONTEXT', // type: string
736
+ ],
630
737
  onError: [
631
738
  'GENERATOR_ONNX_LLM_ERROR', // type: string
632
739
  ],
@@ -654,6 +761,52 @@ export const templateEventPropsMap = {
654
761
  'GENERATOR_SPEECH_INFERENCE_TRANSCRIBE_TIME', // type: number
655
762
  ],
656
763
  },
764
+ GENERATOR_VAD_INFERENCE: {
765
+ onContextStateChange: [
766
+ 'GENERATOR_VAD_INFERENCE_CONTEXT_STATE', // type: string
767
+ 'GENERATOR_VAD_INFERENCE_CONTEXT_DETAILS', // type: object
768
+ ],
769
+ onError: [
770
+ 'GENERATOR_VAD_INFERENCE_ERROR', // type: string
771
+ ],
772
+ onDetected: [
773
+ 'GENERATOR_VAD_INFERENCE_DETECTION_SEGMENTS', // type: array
774
+ 'GENERATOR_VAD_INFERENCE_DETECTION_TIME', // type: number
775
+ ],
776
+ },
777
+ GENERATOR_REALTIME_TRANSCRIPTION: {
778
+ onTranscribe: [
779
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_EVENT', // type: object
780
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_TYPE', // type: string
781
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_SLICE_INDEX', // type: number
782
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_RESULT_TEXT', // type: string
783
+ 'GENERATOR_REALTIME_TRANSCRIPTION_TRANSCRIBE_IS_CAPTURING', // type: bool
784
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object
785
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_TYPE', // type: string
786
+ ],
787
+ onVad: [
788
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT', // type: object
789
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT_TYPE', // type: string
790
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT_CONFIDENCE', // type: number
791
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT_DURATION', // type: number
792
+ 'GENERATOR_REALTIME_TRANSCRIPTION_VAD_EVENT_SLICE_INDEX', // type: number
793
+ ],
794
+ onError: [
795
+ 'GENERATOR_REALTIME_TRANSCRIPTION_ERROR', // type: string
796
+ ],
797
+ onStatusChange: [
798
+ 'GENERATOR_REALTIME_TRANSCRIPTION_IS_ACTIVE', // type: bool
799
+ ],
800
+ onStatsUpdate: [
801
+ 'GENERATOR_REALTIME_TRANSCRIPTION_STATS_TYPE', // type: string
802
+ 'GENERATOR_REALTIME_TRANSCRIPTION_STATS_TIMESTAMP', // type: number
803
+ 'GENERATOR_REALTIME_TRANSCRIPTION_STATS', // type: object
804
+ ],
805
+ onEnd: [
806
+ 'GENERATOR_REALTIME_TRANSCRIPTION_END_RESULTS', // type: array
807
+ 'GENERATOR_REALTIME_TRANSCRIPTION_END_AUDIO_OUTPUT_PATH', // type: string
808
+ ],
809
+ },
657
810
  GENERATOR_LLM: {
658
811
  onContextStateChange: [
659
812
  'GENERATOR_LLM_CONTEXT_STATE', // type: string
@@ -665,23 +818,55 @@ export const templateEventPropsMap = {
665
818
  onCompletion: [
666
819
  'GENERATOR_LLM_COMPLETION_SESSION_KEY', // type: string
667
820
  'GENERATOR_LLM_COMPLETION_RESULT', // type: string
821
+ 'GENERATOR_LLM_COMPLETION_REASONING_CONTENT', // type: string
668
822
  'GENERATOR_LLM_COMPLETION_FULL_CONTEXT', // type: string
669
823
  'GENERATOR_LLM_COMPLETION_RESULT_DETAILS', // type: object
670
824
  ],
671
825
  onCompletionFinished: [
672
826
  'GENERATOR_LLM_COMPLETION_SESSION_KEY', // type: string
673
827
  'GENERATOR_LLM_COMPLETION_RESULT', // type: string
828
+ 'GENERATOR_LLM_COMPLETION_REASONING_CONTENT', // type: string
674
829
  'GENERATOR_LLM_COMPLETION_TOOL_CALLS', // type: array
675
830
  'GENERATOR_LLM_COMPLETION_FULL_CONTEXT', // type: string
831
+ 'GENERATOR_LLM_COMPLETION_IS_CONTEXT_FULL', // type: bool
832
+ 'GENERATOR_LLM_COMPLETION_IS_TRUNCATED', // type: bool
676
833
  'GENERATOR_LLM_COMPLETION_RESULT_DETAILS', // type: object
677
834
  ],
678
835
  onCompletionFunctionCall: [
679
836
  'GENERATOR_LLM_COMPLETION_SESSION_KEY', // type: string
837
+ 'GENERATOR_LLM_COMPLETION_FUNCTION_CALL_ID', // type: string
680
838
  'GENERATOR_LLM_COMPLETION_FUNCTION_CALL_NAME', // type: string
681
839
  'GENERATOR_LLM_COMPLETION_FUNCTION_ARGUMENTS', // type: object
682
840
  'GENERATOR_LLM_COMPLETION_FUNCTION_DETAILS', // type: object
683
841
  ],
684
842
  },
843
+ GENERATOR_GGML_TTS: {
844
+ onContextStateChange: [
845
+ 'GENERATOR_GGML_TTS_CONTEXT_STATE', // type: string
846
+ ],
847
+ onError: [
848
+ 'GENERATOR_GGML_TTS_ERROR', // type: string
849
+ ],
850
+ },
851
+ GENERATOR_RERANKER: {},
852
+ GENERATOR_QNN_LLM: {
853
+ onContextStateChange: [
854
+ 'GENERATOR_QNN_LLM_CONTEXT_STATE', // type: string
855
+ ],
856
+ onGenerate: [
857
+ 'GENERATOR_QNN_LLM_RESULT', // type: string
858
+ 'GENERATOR_QNN_LLM_FULL_CONTEXT', // type: string
859
+ 'GENERATOR_QNN_LLM_TOOL_CALLS', // type: array
860
+ ],
861
+ onFunctionCall: [
862
+ 'GENERATOR_QNN_LLM_FUNCTION_CALL_NAME', // type: string
863
+ 'GENERATOR_QNN_LLM_FUNCTION_CALL_ARGUMENTS', // type: object
864
+ 'GENERATOR_QNN_LLM_FUNCTION_CALL_DETAILS', // type: object
865
+ ],
866
+ onError: [
867
+ 'GENERATOR_QNN_LLM_ERROR', // type: string
868
+ ],
869
+ },
685
870
  GENERATOR_OPENAI_LLM: {
686
871
  onError: [
687
872
  'GENERATOR_OPENAI_LLM_ERROR', // type: string
@@ -699,6 +884,31 @@ export const templateEventPropsMap = {
699
884
  'GENERATOR_OPENAI_LLM_COMPLETION_FUNCTION_ARGUMENTS', // type: string
700
885
  ],
701
886
  },
887
+ GENERATOR_OPENAI_TTS: {
888
+ onContextStateChange: [
889
+ 'GENERATOR_OPENAI_TTS_CONTEXT_STATE', // type: string
890
+ ],
891
+ onError: [
892
+ 'GENERATOR_OPENAI_TTS_ERROR', // type: string
893
+ ],
894
+ },
895
+ GENERATOR_ANTHROPIC_LLM: {
896
+ onError: [
897
+ 'GENERATOR_ANTHROPIC_LLM_ERROR', // type: string
898
+ ],
899
+ onCompletion: [
900
+ 'GENERATOR_ANTHROPIC_LLM_COMPLETION_RESULT', // type: string
901
+ 'GENERATOR_ANTHROPIC_LLM_COMPLETION_DETAILS', // type: object
902
+ ],
903
+ onCompletionFinished: [
904
+ 'GENERATOR_ANTHROPIC_LLM_COMPLETION_RESULT', // type: string
905
+ 'GENERATOR_ANTHROPIC_LLM_TOOL_USES', // type: array
906
+ ],
907
+ onToolUse: [
908
+ 'GENERATOR_ANTHROPIC_LLM_TOOL_USE_NAME', // type: string
909
+ 'GENERATOR_ANTHROPIC_LLM_TOOL_USE_INPUT', // type: object
910
+ ],
911
+ },
702
912
  GENERATOR_ASSISTANT: {
703
913
  onError: [
704
914
  'GENERATOR_ASSISTANT_ERROR', // type: string