@fugood/bricks-project 2.23.7 → 2.23.9

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 (85) hide show
  1. package/compile/index.ts +59 -25
  2. package/package.json +2 -2
  3. package/skills/bricks-design/LICENSE.txt +180 -0
  4. package/skills/bricks-design/SKILL.md +66 -0
  5. package/types/automation.ts +1 -1
  6. package/types/bricks/Camera.ts +10 -5
  7. package/types/bricks/Chart.ts +5 -2
  8. package/types/bricks/GenerativeMedia.ts +20 -7
  9. package/types/bricks/Icon.ts +3 -2
  10. package/types/bricks/Image.ts +2 -1
  11. package/types/bricks/Items.ts +19 -8
  12. package/types/bricks/Lottie.ts +9 -4
  13. package/types/bricks/Maps.ts +10 -5
  14. package/types/bricks/QrCode.ts +1 -0
  15. package/types/bricks/Rect.ts +1 -0
  16. package/types/bricks/RichText.ts +3 -2
  17. package/types/bricks/Rive.ts +17 -10
  18. package/types/bricks/Slideshow.ts +12 -5
  19. package/types/bricks/Svg.ts +1 -0
  20. package/types/bricks/Text.ts +1 -0
  21. package/types/bricks/TextInput.ts +8 -5
  22. package/types/bricks/Video.ts +3 -2
  23. package/types/bricks/VideoStreaming.ts +1 -0
  24. package/types/bricks/WebRtcStream.ts +1 -0
  25. package/types/bricks/WebView.ts +6 -5
  26. package/types/common.ts +10 -8
  27. package/types/generators/AlarmClock.ts +7 -4
  28. package/types/generators/Assistant.ts +9 -6
  29. package/types/generators/BleCentral.ts +14 -5
  30. package/types/generators/BlePeripheral.ts +1 -0
  31. package/types/generators/CanvasMap.ts +2 -1
  32. package/types/generators/CastlesPay.ts +7 -2
  33. package/types/generators/DataBank.ts +8 -3
  34. package/types/generators/File.ts +41 -14
  35. package/types/generators/GraphQl.ts +6 -3
  36. package/types/generators/Http.ts +3 -2
  37. package/types/generators/HttpServer.ts +11 -6
  38. package/types/generators/Information.ts +2 -1
  39. package/types/generators/Intent.ts +3 -2
  40. package/types/generators/Iterator.ts +5 -4
  41. package/types/generators/Keyboard.ts +4 -3
  42. package/types/generators/LlmAnthropicCompat.ts +11 -4
  43. package/types/generators/LlmAppleBuiltin.ts +8 -3
  44. package/types/generators/LlmGgml.ts +12 -5
  45. package/types/generators/LlmMediaTekNeuroPilot.ts +11 -4
  46. package/types/generators/LlmMlx.ts +11 -4
  47. package/types/generators/LlmOnnx.ts +11 -4
  48. package/types/generators/LlmOpenAiCompat.ts +11 -4
  49. package/types/generators/LlmQualcommAiEngine.ts +9 -4
  50. package/types/generators/Mcp.ts +40 -17
  51. package/types/generators/McpServer.ts +17 -8
  52. package/types/generators/MediaFlow.ts +8 -3
  53. package/types/generators/MqttBroker.ts +16 -7
  54. package/types/generators/MqttClient.ts +5 -4
  55. package/types/generators/Question.ts +2 -1
  56. package/types/generators/RealtimeTranscription.ts +22 -7
  57. package/types/generators/RerankerGgml.ts +5 -2
  58. package/types/generators/SerialPort.ts +7 -2
  59. package/types/generators/SoundPlayer.ts +4 -1
  60. package/types/generators/SoundRecorder.ts +3 -2
  61. package/types/generators/SpeechToTextGgml.ts +8 -3
  62. package/types/generators/SpeechToTextOnnx.ts +5 -2
  63. package/types/generators/SpeechToTextPlatform.ts +7 -2
  64. package/types/generators/SqLite.ts +5 -2
  65. package/types/generators/Step.ts +2 -1
  66. package/types/generators/SttAppleBuiltin.ts +5 -2
  67. package/types/generators/Tcp.ts +5 -4
  68. package/types/generators/TcpServer.ts +10 -7
  69. package/types/generators/TextToSpeechAppleBuiltin.ts +5 -2
  70. package/types/generators/TextToSpeechGgml.ts +5 -2
  71. package/types/generators/TextToSpeechOnnx.ts +5 -2
  72. package/types/generators/TextToSpeechOpenAiLike.ts +5 -2
  73. package/types/generators/ThermalPrinter.ts +2 -1
  74. package/types/generators/Tick.ts +3 -2
  75. package/types/generators/Udp.ts +3 -2
  76. package/types/generators/VadGgml.ts +8 -3
  77. package/types/generators/VadOnnx.ts +6 -3
  78. package/types/generators/VadTraditional.ts +8 -3
  79. package/types/generators/VectorStore.ts +4 -3
  80. package/types/generators/Watchdog.ts +3 -2
  81. package/types/generators/WebCrawler.ts +3 -2
  82. package/types/generators/WebRtc.ts +8 -3
  83. package/types/generators/WebSocket.ts +2 -1
  84. package/types/subspace.ts +1 -0
  85. package/utils/event-props.ts +833 -1059
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Model Context Protocol (MCP) Server (https://docs.anthropic.com/en/docs/agents-and-tools/mcp)
3
+ * MCP server exposing tools, resources (static/detect-data-change/script), and prompts. Supports HTTP listening with Bearer auth or direct-link from in-app MCP client
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Refresh tools and resources, used for case if tools or resources are changed. Note that the current connections will be closed. */
18
19
  export type GeneratorMCPServerActionRefreshResources = Action & {
@@ -193,17 +194,25 @@ Default property:
193
194
  /* Listening of HTTP server */
194
195
  onListening?: Array<EventAction>
195
196
  /* Error of HTTP server */
196
- onError?: Array<EventAction>
197
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onError']>>
197
198
  /* Client error of HTTP server */
198
- onClientError?: Array<EventAction>
199
+ onClientError?: Array<
200
+ EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientError']>
201
+ >
199
202
  /* Client close of HTTP server */
200
- onClientClose?: Array<EventAction>
203
+ onClientClose?: Array<
204
+ EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientClose']>
205
+ >
201
206
  /* On request resource (Request: { name: string, uri: string, params: object }) */
202
- onRequestResource?: Array<EventAction>
207
+ onRequestResource?: Array<
208
+ EventAction<string & keyof TemplateEventPropsMap['McpServer']['onRequestResource']>
209
+ >
203
210
  /* On call tool (Request: { name: string, params: object }) */
204
- onCallTool?: Array<EventAction>
211
+ onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onCallTool']>>
205
212
  /* On get prompt (Request: { name: string, arguments: object }) */
206
- onGetPrompt?: Array<EventAction>
213
+ onGetPrompt?: Array<
214
+ EventAction<string & keyof TemplateEventPropsMap['McpServer']['onGetPrompt']>
215
+ >
207
216
  }
208
217
  outlets?: {
209
218
  /* Whether the HTTP server is listening */
@@ -250,7 +259,7 @@ Default property:
250
259
  }
251
260
  }
252
261
 
253
- /* Model Context Protocol (MCP) Server (https://docs.anthropic.com/en/docs/agents-and-tools/mcp) */
262
+ /* MCP server exposing tools, resources (static/detect-data-change/script), and prompts. Supports HTTP listening with Bearer auth or direct-link from in-app MCP client */
254
263
  export type GeneratorMCPServer = Generator &
255
264
  GeneratorMCPServerDef & {
256
265
  templateKey: 'GENERATOR_MCP_SERVER'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start fetcn Media box file list */
18
19
  export type GeneratorMediaFlowActionFetch = Action & {
@@ -90,13 +91,17 @@ Default property:
90
91
  }
91
92
  events?: {
92
93
  /* Event of media box fetch error */
93
- fetchError?: Array<EventAction>
94
+ fetchError?: Array<EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['fetchError']>>
94
95
  /* Event of subscribe box change connected (If set `Subscribe Box Change`) */
95
96
  subscribeBoxConnect?: Array<EventAction>
96
97
  /* Event of subscribe box change error (If set `Subscribe Box Change`) */
97
- subscribeBoxError?: Array<EventAction>
98
+ subscribeBoxError?: Array<
99
+ EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxError']>
100
+ >
98
101
  /* Event of subscribe box change connection error (If set `Subscribe Box Change`) */
99
- subscribeBoxConnectError?: Array<EventAction>
102
+ subscribeBoxConnectError?: Array<
103
+ EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxConnectError']>
104
+ >
100
105
  /* Event of file sync completed for used `saveToStorage` */
101
106
  saveStorageCompleted?: Array<EventAction>
102
107
  /* Event when file list size exceed of Load size limit */
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * MQTT Broker server
3
+ * Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start MQTT broker server */
18
19
  export type GeneratorMQTTBrokerActionStart = Action & {
@@ -83,15 +84,23 @@ Default property:
83
84
  /* Event of MQTT server is ready */
84
85
  onReady?: Array<EventAction>
85
86
  /* Event of server or connection error */
86
- onError?: Array<EventAction>
87
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onError']>>
87
88
  /* Event of client connected */
88
- onClientConnected?: Array<EventAction>
89
+ onClientConnected?: Array<
90
+ EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientConnected']>
91
+ >
89
92
  /* Event of client disconnected */
90
- onClientDisconnected?: Array<EventAction>
93
+ onClientDisconnected?: Array<
94
+ EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientDisconnected']>
95
+ >
91
96
  /* Event of message received */
92
- onMessageReceived?: Array<EventAction>
97
+ onMessageReceived?: Array<
98
+ EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessageReceived']>
99
+ >
93
100
  /* Event of message published */
94
- onMessagePublished?: Array<EventAction>
101
+ onMessagePublished?: Array<
102
+ EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessagePublished']>
103
+ >
95
104
  }
96
105
  outlets?: {
97
106
  /* Is server started */
@@ -109,7 +118,7 @@ Default property:
109
118
  }
110
119
  }
111
120
 
112
- /* MQTT Broker server */
121
+ /* Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support */
113
122
  export type GeneratorMQTTBroker = Generator &
114
123
  GeneratorMQTTBrokerDef & {
115
124
  templateKey: 'GENERATOR_MQTT_BROKER'
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * MQTT protocol messaging
3
+ * MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss://
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Connect to MQTT broker */
18
19
  export type GeneratorMQTTActionConnect = Action & {
@@ -95,9 +96,9 @@ Default property:
95
96
  /* When disconnected from MQTT broker */
96
97
  onDisconnected?: Array<EventAction>
97
98
  /* When error occurred */
98
- onError?: Array<EventAction>
99
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onError']>>
99
100
  /* When received message from MQTT broker within subscribe topic */
100
- onMessage?: Array<EventAction>
101
+ onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onMessage']>>
101
102
  }
102
103
  outlets?: {
103
104
  /* Connected or not */
@@ -117,7 +118,7 @@ Default property:
117
118
  }
118
119
  }
119
120
 
120
- /* MQTT protocol messaging */
121
+ /* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss:// */
121
122
  export type GeneratorMQTT = Generator &
122
123
  GeneratorMQTTDef & {
123
124
  templateKey: 'GENERATOR_MQTT'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start inquire */
18
19
  export type GeneratorQuestionActionStart = Action & {
@@ -370,7 +371,7 @@ Default property:
370
371
  /* Event of completed inquire */
371
372
  onCompleted?: Array<EventAction>
372
373
  /* Event of error occured */
373
- onError?: Array<EventAction>
374
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Question']['onError']>>
374
375
  }
375
376
  outlets?: {
376
377
  /* Result data */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start realtime transcription */
18
19
  export type GeneratorRealtimeTranscriptionActionStart = Action & {
@@ -131,19 +132,33 @@ Default property:
131
132
  }
132
133
  events?: {
133
134
  /* Event triggered when transcription starts, processes, or ends */
134
- onTranscribe?: Array<EventAction>
135
+ onTranscribe?: Array<
136
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onTranscribe']>
137
+ >
135
138
  /* Event triggered on VAD (Voice Activity Detection) events */
136
- onVad?: Array<EventAction>
139
+ onVad?: Array<
140
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onVad']>
141
+ >
137
142
  /* Event triggered when error occurs */
138
- onError?: Array<EventAction>
143
+ onError?: Array<
144
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onError']>
145
+ >
139
146
  /* Event triggered when status changes */
140
- onStatusChange?: Array<EventAction>
147
+ onStatusChange?: Array<
148
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatusChange']>
149
+ >
141
150
  /* Event triggered when statistics update */
142
- onStatsUpdate?: Array<EventAction>
151
+ onStatsUpdate?: Array<
152
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatsUpdate']>
153
+ >
143
154
  /* Event triggered when slice transcription is stabilized */
144
- onStabilized?: Array<EventAction>
155
+ onStabilized?: Array<
156
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStabilized']>
157
+ >
145
158
  /* Event triggered when transcription ends */
146
- onEnd?: Array<EventAction>
159
+ onEnd?: Array<
160
+ EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onEnd']>
161
+ >
147
162
  }
148
163
  outlets?: {
149
164
  /* Is realtime transcription currently active */
@@ -24,6 +24,7 @@ import type {
24
24
  Action,
25
25
  EventProperty,
26
26
  } from '../common'
27
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
27
28
 
28
29
  /* Load the model */
29
30
  export type GeneratorRerankerActionLoadModel = Action & {
@@ -117,9 +118,11 @@ Default property:
117
118
  }
118
119
  events?: {
119
120
  /* Event triggered when the reranker context state changes (loading, ready, error, released) */
120
- onContextStateChange?: Array<EventAction>
121
+ onContextStateChange?: Array<
122
+ EventAction<string & keyof TemplateEventPropsMap['Reranker']['onContextStateChange']>
123
+ >
121
124
  /* Event triggered when an error occurs during reranker operations */
122
- onError?: Array<EventAction>
125
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Reranker']['onError']>>
123
126
  }
124
127
  outlets?: {
125
128
  /* Current state of the reranker context (loading, ready, error, released) */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Get available serial devices */
18
19
  export type GeneratorSerialPortActionGeneratorSerialGetDeviceList = Action & {
@@ -100,9 +101,13 @@ Default property:
100
101
  /* Event for detach the device */
101
102
  generatorSerialOnDetach?: Array<EventAction>
102
103
  /* Event on error */
103
- generatorSerialOnError?: Array<EventAction>
104
+ generatorSerialOnError?: Array<
105
+ EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnError']>
106
+ >
104
107
  /* Event for receive data */
105
- generatorSerialOnData?: Array<EventAction>
108
+ generatorSerialOnData?: Array<
109
+ EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnData']>
110
+ >
106
111
  }
107
112
  outlets?: {
108
113
  /* Available serial devices */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start playing sound */
18
19
  export type GeneratorSoundPlayerActionPlay = Action & {
@@ -56,7 +57,9 @@ Default property:
56
57
  /* Sound file loaded successfully */
57
58
  onLoad?: Array<EventAction>
58
59
  /* Sound file load error */
59
- onLoadError?: Array<EventAction>
60
+ onLoadError?: Array<
61
+ EventAction<string & keyof TemplateEventPropsMap['SoundPlayer']['onLoadError']>
62
+ >
60
63
  /* Sound playback complete */
61
64
  onPlay?: Array<EventAction>
62
65
  /* Sound file playback end */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start record */
18
19
  export type GeneratorSoundRecorderActionStart = Action & {
@@ -88,9 +89,9 @@ Default property:
88
89
  }
89
90
  events?: {
90
91
  /* Event for chunk data (Base64 encoded PCM) */
91
- chunk?: Array<EventAction>
92
+ chunk?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['chunk']>>
92
93
  /* Event for recorded file */
93
- recorded?: Array<EventAction>
94
+ recorded?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['recorded']>>
94
95
  }
95
96
  outlets?: {
96
97
  /* Is recording */
@@ -19,6 +19,7 @@ import type {
19
19
  Action,
20
20
  EventProperty,
21
21
  } from '../common'
22
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
22
23
 
23
24
  /* Load the model */
24
25
  export type GeneratorSpeechInferenceActionLoadModel = Action & {
@@ -424,11 +425,15 @@ Default property:
424
425
  }
425
426
  events?: {
426
427
  /* Event triggered when context state changes */
427
- onContextStateChange?: Array<EventAction>
428
+ onContextStateChange?: Array<
429
+ EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onContextStateChange']>
430
+ >
428
431
  /* Event triggered when error occurs */
429
- onError?: Array<EventAction>
432
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onError']>>
430
433
  /* Event triggered when got transcribe result */
431
- onTranscribed?: Array<EventAction>
434
+ onTranscribed?: Array<
435
+ EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onTranscribed']>
436
+ >
432
437
  /* Event triggered when transcribe realtime done */
433
438
  onRealtimeStop?: Array<EventAction>
434
439
  }
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Load the model */
19
20
  export type GeneratorOnnxSTTActionLoadModel = Action & {
@@ -195,9 +196,11 @@ Default property:
195
196
  }
196
197
  events?: {
197
198
  /* Event triggered when state change */
198
- onContextStateChange?: Array<EventAction>
199
+ onContextStateChange?: Array<
200
+ EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onContextStateChange']>
201
+ >
199
202
  /* Event triggered when error occurs */
200
- onError?: Array<EventAction>
203
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onError']>>
201
204
  }
202
205
  outlets?: {
203
206
  /* Context state */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start speech recognition */
18
19
  export type GeneratorPlatformSTTActionStart = Action & {
@@ -43,9 +44,13 @@ Default property:
43
44
  /* Event for speech recognition end */
44
45
  onSpeechEnd?: Array<EventAction>
45
46
  /* Event for speech recognition results */
46
- onSpeechResults?: Array<EventAction>
47
+ onSpeechResults?: Array<
48
+ EventAction<string & keyof TemplateEventPropsMap['PlatformStt']['onSpeechResults']>
49
+ >
47
50
  /* Event for speech recognition error */
48
- onSpeechError?: Array<EventAction>
51
+ onSpeechError?: Array<
52
+ EventAction<string & keyof TemplateEventPropsMap['PlatformStt']['onSpeechError']>
53
+ >
49
54
  }
50
55
  outlets?: {
51
56
  /* Recognized speech text */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Execute SQL statement */
18
19
  export type GeneratorSqliteActionExecute = ActionWithParams & {
@@ -111,9 +112,11 @@ Default property:
111
112
  }
112
113
  events?: {
113
114
  /* Event triggered when error occurs */
114
- onError?: Array<EventAction>
115
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Sqlite']['onError']>>
115
116
  /* Event triggered when query result is ready */
116
- onQueryResult?: Array<EventAction>
117
+ onQueryResult?: Array<
118
+ EventAction<string & keyof TemplateEventPropsMap['Sqlite']['onQueryResult']>
119
+ >
117
120
  }
118
121
  outlets?: {
119
122
  /* Whether the database is ready */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start execute the step */
18
19
  export type GeneratorStepActionStart = Action & {
@@ -73,7 +74,7 @@ Default property:
73
74
  }
74
75
  events?: {
75
76
  /* Event on step (If action is `event`) */
76
- onStep?: Array<EventAction>
77
+ onStep?: Array<EventAction<string & keyof TemplateEventPropsMap['Step']['onStep']>>
77
78
  }
78
79
  outlets?: {
79
80
  /* Result of step payload (If action is `outlet`) */
@@ -20,6 +20,7 @@ import type {
20
20
  Action,
21
21
  EventProperty,
22
22
  } from '../common'
23
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
23
24
 
24
25
  /* Initialize STT */
25
26
  export type GeneratorAppleSTTActionInit = Action & {
@@ -81,9 +82,11 @@ Default property:
81
82
  }
82
83
  events?: {
83
84
  /* Error event */
84
- onError?: Array<EventAction>
85
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onError']>>
85
86
  /* Event triggered when got transcribe result */
86
- onTranscribed?: Array<EventAction>
87
+ onTranscribed?: Array<
88
+ EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onTranscribed']>
89
+ >
87
90
  }
88
91
  outlets?: {
89
92
  /* State outlet (loading, ready, error) */
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * TCP socket client for bidirectional binary/text communication
3
+ * TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive support
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start connect */
18
19
  export type GeneratorTCPActionConnect = Action & {
@@ -84,13 +85,13 @@ Default property:
84
85
  /* Event of connect successful */
85
86
  onConnected?: Array<EventAction>
86
87
  /* Event of receive data */
87
- onData?: Array<EventAction>
88
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onData']>>
88
89
  /* Event of connection idle timeout */
89
90
  onTimeout?: Array<EventAction>
90
91
  /* Event of connection close */
91
92
  onClose?: Array<EventAction>
92
93
  /* Event of connection error */
93
- onError?: Array<EventAction>
94
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onError']>>
94
95
  }
95
96
  outlets?: {
96
97
  /* Connection status */
@@ -102,7 +103,7 @@ Default property:
102
103
  }
103
104
  }
104
105
 
105
- /* TCP socket client for bidirectional binary/text communication */
106
+ /* TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive support */
106
107
  export type GeneratorTCP = Generator &
107
108
  GeneratorTCPDef & {
108
109
  templateKey: 'GENERATOR_TCP'
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * TCP Server
3
+ * TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start TCP server */
18
19
  export type GeneratorTCPServerActionStart = Action & {
@@ -97,15 +98,17 @@ Default property:
97
98
  /* Event of TCP server is ready */
98
99
  onReady?: Array<EventAction>
99
100
  /* Event of TCP server accept the connection */
100
- onAcceptConnection?: Array<EventAction>
101
+ onAcceptConnection?: Array<
102
+ EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onAcceptConnection']>
103
+ >
101
104
  /* Event of receive data */
102
- onData?: Array<EventAction>
105
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onData']>>
103
106
  /* Event of connection idle timeout */
104
- onTimeout?: Array<EventAction>
107
+ onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onTimeout']>>
105
108
  /* Event of connection close */
106
- onClose?: Array<EventAction>
109
+ onClose?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onClose']>>
107
110
  /* Event of server or connection error */
108
- onError?: Array<EventAction>
111
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onError']>>
109
112
  }
110
113
  outlets?: {
111
114
  /* Server is listening */
@@ -121,7 +124,7 @@ Default property:
121
124
  }
122
125
  }
123
126
 
124
- /* TCP Server */
127
+ /* TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS */
125
128
  export type GeneratorTCPServer = Generator &
126
129
  GeneratorTCPServerDef & {
127
130
  templateKey: 'GENERATOR_TCP_SERVER'
@@ -20,6 +20,7 @@ import type {
20
20
  Action,
21
21
  EventProperty,
22
22
  } from '../common'
23
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
23
24
 
24
25
  /* Load the TTS model */
25
26
  export type GeneratorAppleTTSActionLoadModel = Action & {
@@ -80,9 +81,11 @@ Default property:
80
81
  }
81
82
  events?: {
82
83
  /* Event triggered when state change */
83
- onContextStateChange?: Array<EventAction>
84
+ onContextStateChange?: Array<
85
+ EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onContextStateChange']>
86
+ >
84
87
  /* Event triggered when error occurs */
85
- onError?: Array<EventAction>
88
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onError']>>
86
89
  }
87
90
  outlets?: {
88
91
  /* Context state */
@@ -25,6 +25,7 @@ import type {
25
25
  Action,
26
26
  EventProperty,
27
27
  } from '../common'
28
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
28
29
 
29
30
  /* Load the model */
30
31
  export type GeneratorGGMLTTSActionLoadModel = Action & {
@@ -169,9 +170,11 @@ Default property:
169
170
  }
170
171
  events?: {
171
172
  /* Event triggered when state change */
172
- onContextStateChange?: Array<EventAction>
173
+ onContextStateChange?: Array<
174
+ EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onContextStateChange']>
175
+ >
173
176
  /* Event triggered when error occurs */
174
- onError?: Array<EventAction>
177
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onError']>>
175
178
  }
176
179
  outlets?: {
177
180
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Load the model */
19
20
  export type GeneratorTTSActionLoadModel = Action & {
@@ -137,9 +138,11 @@ Default property:
137
138
  }
138
139
  events?: {
139
140
  /* Event triggered when state change */
140
- onContextStateChange?: Array<EventAction>
141
+ onContextStateChange?: Array<
142
+ EventAction<string & keyof TemplateEventPropsMap['Tts']['onContextStateChange']>
143
+ >
141
144
  /* Event triggered when error occurs */
142
- onError?: Array<EventAction>
145
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tts']['onError']>>
143
146
  }
144
147
  outlets?: {
145
148
  /* Context state */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Generate audio */
18
19
  export type GeneratorOpenAiTTSActionGenerate = ActionWithParams & {
@@ -81,9 +82,11 @@ Default property:
81
82
  }
82
83
  events?: {
83
84
  /* Event triggered when state change */
84
- onContextStateChange?: Array<EventAction>
85
+ onContextStateChange?: Array<
86
+ EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onContextStateChange']>
87
+ >
85
88
  /* Event triggered when error occurs */
86
- onError?: Array<EventAction>
89
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onError']>>
87
90
  }
88
91
  outlets?: {
89
92
  /* Context state */