@fugood/bricks-project 2.23.6 → 2.23.8
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.
- package/compile/action-name-map.ts +6 -0
- package/compile/index.ts +64 -43
- package/compile/util.ts +2 -0
- package/package.json +2 -2
- package/skills/bricks-design/LICENSE.txt +180 -0
- package/skills/bricks-design/SKILL.md +66 -0
- package/tools/deploy.ts +2 -2
- package/tools/preview.ts +1 -1
- package/types/automation.ts +1 -1
- package/types/bricks/Camera.ts +15 -7
- package/types/bricks/Chart.ts +9 -3
- package/types/bricks/GenerativeMedia.ts +24 -8
- package/types/bricks/Icon.ts +6 -2
- package/types/bricks/Image.ts +7 -3
- package/types/bricks/Items.ts +22 -8
- package/types/bricks/Lottie.ts +12 -4
- package/types/bricks/Maps.ts +13 -5
- package/types/bricks/QrCode.ts +6 -2
- package/types/bricks/Rect.ts +6 -2
- package/types/bricks/RichText.ts +6 -2
- package/types/bricks/Rive.ts +20 -10
- package/types/bricks/Slideshow.ts +17 -7
- package/types/bricks/Svg.ts +5 -1
- package/types/bricks/Text.ts +6 -2
- package/types/bricks/TextInput.ts +13 -7
- package/types/bricks/Video.ts +8 -4
- package/types/bricks/VideoStreaming.ts +5 -1
- package/types/bricks/WebRtcStream.ts +6 -2
- package/types/bricks/WebView.ts +9 -5
- package/types/common.ts +10 -8
- package/types/generators/AlarmClock.ts +12 -6
- package/types/generators/Assistant.ts +12 -6
- package/types/generators/BleCentral.ts +19 -7
- package/types/generators/BlePeripheral.ts +6 -2
- package/types/generators/CanvasMap.ts +6 -2
- package/types/generators/CastlesPay.ts +12 -4
- package/types/generators/DataBank.ts +13 -5
- package/types/generators/File.ts +46 -16
- package/types/generators/GraphQl.ts +9 -3
- package/types/generators/Http.ts +6 -2
- package/types/generators/HttpServer.ts +14 -6
- package/types/generators/Information.ts +7 -3
- package/types/generators/Intent.ts +7 -3
- package/types/generators/Iterator.ts +9 -5
- package/types/generators/Keyboard.ts +9 -5
- package/types/generators/LlmAnthropicCompat.ts +21 -5
- package/types/generators/LlmAppleBuiltin.ts +19 -4
- package/types/generators/LlmGgml.ts +65 -6
- package/types/generators/LlmMediaTekNeuroPilot.ts +16 -5
- package/types/generators/LlmMlx.ts +22 -5
- package/types/generators/LlmOnnx.ts +16 -5
- package/types/generators/LlmOpenAiCompat.ts +25 -5
- package/types/generators/LlmQualcommAiEngine.ts +13 -5
- package/types/generators/Mcp.ts +43 -17
- package/types/generators/McpServer.ts +20 -8
- package/types/generators/MediaFlow.ts +12 -4
- package/types/generators/MqttBroker.ts +19 -7
- package/types/generators/MqttClient.ts +8 -4
- package/types/generators/Question.ts +7 -3
- package/types/generators/RealtimeTranscription.ts +26 -8
- package/types/generators/RerankerGgml.ts +20 -3
- package/types/generators/SerialPort.ts +12 -4
- package/types/generators/SoundPlayer.ts +8 -2
- package/types/generators/SoundRecorder.ts +7 -3
- package/types/generators/SpeechToTextGgml.ts +18 -4
- package/types/generators/SpeechToTextOnnx.ts +10 -3
- package/types/generators/SpeechToTextPlatform.ts +11 -3
- package/types/generators/SqLite.ts +10 -4
- package/types/generators/Step.ts +6 -2
- package/types/generators/SttAppleBuiltin.ts +16 -3
- package/types/generators/Tcp.ts +8 -4
- package/types/generators/TcpServer.ts +13 -7
- package/types/generators/TextToSpeechAppleBuiltin.ts +16 -3
- package/types/generators/TextToSpeechGgml.ts +21 -3
- package/types/generators/TextToSpeechOnnx.ts +10 -3
- package/types/generators/TextToSpeechOpenAiLike.ts +9 -3
- package/types/generators/ThermalPrinter.ts +7 -3
- package/types/generators/Tick.ts +8 -4
- package/types/generators/Udp.ts +8 -4
- package/types/generators/VadGgml.ts +12 -4
- package/types/generators/VadOnnx.ts +11 -4
- package/types/generators/VadTraditional.ts +13 -4
- package/types/generators/VectorStore.ts +7 -3
- package/types/generators/Watchdog.ts +8 -4
- package/types/generators/WebCrawler.ts +6 -2
- package/types/generators/WebRtc.ts +13 -5
- package/types/generators/WebSocket.ts +6 -2
- package/types/subspace.ts +2 -0
- package/utils/event-props.ts +833 -1059
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
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
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Refresh tools and resources, used for case if tools or resources are changed. Note that the current connections will be closed. */
|
|
15
19
|
export type GeneratorMCPServerActionRefreshResources = Action & {
|
|
@@ -190,17 +194,25 @@ Default property:
|
|
|
190
194
|
/* Listening of HTTP server */
|
|
191
195
|
onListening?: Array<EventAction>
|
|
192
196
|
/* Error of HTTP server */
|
|
193
|
-
onError?: Array<EventAction
|
|
197
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onError']>>
|
|
194
198
|
/* Client error of HTTP server */
|
|
195
|
-
onClientError?: Array<
|
|
199
|
+
onClientError?: Array<
|
|
200
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientError']>
|
|
201
|
+
>
|
|
196
202
|
/* Client close of HTTP server */
|
|
197
|
-
onClientClose?: Array<
|
|
203
|
+
onClientClose?: Array<
|
|
204
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onClientClose']>
|
|
205
|
+
>
|
|
198
206
|
/* On request resource (Request: { name: string, uri: string, params: object }) */
|
|
199
|
-
onRequestResource?: Array<
|
|
207
|
+
onRequestResource?: Array<
|
|
208
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onRequestResource']>
|
|
209
|
+
>
|
|
200
210
|
/* On call tool (Request: { name: string, params: object }) */
|
|
201
|
-
onCallTool?: Array<EventAction
|
|
211
|
+
onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['McpServer']['onCallTool']>>
|
|
202
212
|
/* On get prompt (Request: { name: string, arguments: object }) */
|
|
203
|
-
onGetPrompt?: Array<
|
|
213
|
+
onGetPrompt?: Array<
|
|
214
|
+
EventAction<string & keyof TemplateEventPropsMap['McpServer']['onGetPrompt']>
|
|
215
|
+
>
|
|
204
216
|
}
|
|
205
217
|
outlets?: {
|
|
206
218
|
/* Whether the HTTP server is listening */
|
|
@@ -247,7 +259,7 @@ Default property:
|
|
|
247
259
|
}
|
|
248
260
|
}
|
|
249
261
|
|
|
250
|
-
/*
|
|
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 */
|
|
251
263
|
export type GeneratorMCPServer = Generator &
|
|
252
264
|
GeneratorMCPServerDef & {
|
|
253
265
|
templateKey: 'GENERATOR_MCP_SERVER'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Fetch box's file list from Media Flow
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start fetcn Media box file list */
|
|
15
19
|
export type GeneratorMediaFlowActionFetch = Action & {
|
|
@@ -87,13 +91,17 @@ Default property:
|
|
|
87
91
|
}
|
|
88
92
|
events?: {
|
|
89
93
|
/* Event of media box fetch error */
|
|
90
|
-
fetchError?: Array<EventAction
|
|
94
|
+
fetchError?: Array<EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['fetchError']>>
|
|
91
95
|
/* Event of subscribe box change connected (If set `Subscribe Box Change`) */
|
|
92
96
|
subscribeBoxConnect?: Array<EventAction>
|
|
93
97
|
/* Event of subscribe box change error (If set `Subscribe Box Change`) */
|
|
94
|
-
subscribeBoxError?: Array<
|
|
98
|
+
subscribeBoxError?: Array<
|
|
99
|
+
EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxError']>
|
|
100
|
+
>
|
|
95
101
|
/* Event of subscribe box change connection error (If set `Subscribe Box Change`) */
|
|
96
|
-
subscribeBoxConnectError?: Array<
|
|
102
|
+
subscribeBoxConnectError?: Array<
|
|
103
|
+
EventAction<string & keyof TemplateEventPropsMap['MediaFlow']['subscribeBoxConnectError']>
|
|
104
|
+
>
|
|
97
105
|
/* Event of file sync completed for used `saveToStorage` */
|
|
98
106
|
saveStorageCompleted?: Array<EventAction>
|
|
99
107
|
/* Event when file list size exceed of Load size limit */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start MQTT broker server */
|
|
15
19
|
export type GeneratorMQTTBrokerActionStart = Action & {
|
|
@@ -80,15 +84,23 @@ Default property:
|
|
|
80
84
|
/* Event of MQTT server is ready */
|
|
81
85
|
onReady?: Array<EventAction>
|
|
82
86
|
/* Event of server or connection error */
|
|
83
|
-
onError?: Array<EventAction
|
|
87
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onError']>>
|
|
84
88
|
/* Event of client connected */
|
|
85
|
-
onClientConnected?: Array<
|
|
89
|
+
onClientConnected?: Array<
|
|
90
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientConnected']>
|
|
91
|
+
>
|
|
86
92
|
/* Event of client disconnected */
|
|
87
|
-
onClientDisconnected?: Array<
|
|
93
|
+
onClientDisconnected?: Array<
|
|
94
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onClientDisconnected']>
|
|
95
|
+
>
|
|
88
96
|
/* Event of message received */
|
|
89
|
-
onMessageReceived?: Array<
|
|
97
|
+
onMessageReceived?: Array<
|
|
98
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessageReceived']>
|
|
99
|
+
>
|
|
90
100
|
/* Event of message published */
|
|
91
|
-
onMessagePublished?: Array<
|
|
101
|
+
onMessagePublished?: Array<
|
|
102
|
+
EventAction<string & keyof TemplateEventPropsMap['MqttBroker']['onMessagePublished']>
|
|
103
|
+
>
|
|
92
104
|
}
|
|
93
105
|
outlets?: {
|
|
94
106
|
/* Is server started */
|
|
@@ -106,7 +118,7 @@ Default property:
|
|
|
106
118
|
}
|
|
107
119
|
}
|
|
108
120
|
|
|
109
|
-
/* MQTT
|
|
121
|
+
/* Embedded MQTT broker server with client authentication, publish/subscribe messaging, keepalive, and retry support */
|
|
110
122
|
export type GeneratorMQTTBroker = Generator &
|
|
111
123
|
GeneratorMQTTBrokerDef & {
|
|
112
124
|
templateKey: 'GENERATOR_MQTT_BROKER'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss://
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Connect to MQTT broker */
|
|
15
19
|
export type GeneratorMQTTActionConnect = Action & {
|
|
@@ -92,9 +96,9 @@ Default property:
|
|
|
92
96
|
/* When disconnected from MQTT broker */
|
|
93
97
|
onDisconnected?: Array<EventAction>
|
|
94
98
|
/* When error occurred */
|
|
95
|
-
onError?: Array<EventAction
|
|
99
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onError']>>
|
|
96
100
|
/* When received message from MQTT broker within subscribe topic */
|
|
97
|
-
onMessage?: Array<EventAction
|
|
101
|
+
onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Mqtt']['onMessage']>>
|
|
98
102
|
}
|
|
99
103
|
outlets?: {
|
|
100
104
|
/* Connected or not */
|
|
@@ -114,7 +118,7 @@ Default property:
|
|
|
114
118
|
}
|
|
115
119
|
}
|
|
116
120
|
|
|
117
|
-
/* MQTT
|
|
121
|
+
/* MQTT client with topic subscribe/publish, QoS levels (0/1/2), auto-reconnect, and auth support. Connects via mqtt:// or wss:// */
|
|
118
122
|
export type GeneratorMQTT = Generator &
|
|
119
123
|
GeneratorMQTTDef & {
|
|
120
124
|
templateKey: 'GENERATOR_MQTT'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Prompt user for input via dialog and return the response
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start inquire */
|
|
15
19
|
export type GeneratorQuestionActionStart = Action & {
|
|
@@ -367,7 +371,7 @@ Default property:
|
|
|
367
371
|
/* Event of completed inquire */
|
|
368
372
|
onCompleted?: Array<EventAction>
|
|
369
373
|
/* Event of error occured */
|
|
370
|
-
onError?: Array<EventAction
|
|
374
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Question']['onError']>>
|
|
371
375
|
}
|
|
372
376
|
outlets?: {
|
|
373
377
|
/* Result data */
|
|
@@ -381,7 +385,7 @@ Default property:
|
|
|
381
385
|
}
|
|
382
386
|
}
|
|
383
387
|
|
|
384
|
-
/*
|
|
388
|
+
/* Prompt user for input via dialog and return the response */
|
|
385
389
|
export type GeneratorQuestion = Generator &
|
|
386
390
|
GeneratorQuestionDef & {
|
|
387
391
|
templateKey: 'GENERATOR_QUESTION'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Realtime speech-to-text transcription using Whisper and VAD with live audio streaming
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start realtime transcription */
|
|
15
19
|
export type GeneratorRealtimeTranscriptionActionStart = Action & {
|
|
@@ -128,19 +132,33 @@ Default property:
|
|
|
128
132
|
}
|
|
129
133
|
events?: {
|
|
130
134
|
/* Event triggered when transcription starts, processes, or ends */
|
|
131
|
-
onTranscribe?: Array<
|
|
135
|
+
onTranscribe?: Array<
|
|
136
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onTranscribe']>
|
|
137
|
+
>
|
|
132
138
|
/* Event triggered on VAD (Voice Activity Detection) events */
|
|
133
|
-
onVad?: Array<
|
|
139
|
+
onVad?: Array<
|
|
140
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onVad']>
|
|
141
|
+
>
|
|
134
142
|
/* Event triggered when error occurs */
|
|
135
|
-
onError?: Array<
|
|
143
|
+
onError?: Array<
|
|
144
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onError']>
|
|
145
|
+
>
|
|
136
146
|
/* Event triggered when status changes */
|
|
137
|
-
onStatusChange?: Array<
|
|
147
|
+
onStatusChange?: Array<
|
|
148
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatusChange']>
|
|
149
|
+
>
|
|
138
150
|
/* Event triggered when statistics update */
|
|
139
|
-
onStatsUpdate?: Array<
|
|
151
|
+
onStatsUpdate?: Array<
|
|
152
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStatsUpdate']>
|
|
153
|
+
>
|
|
140
154
|
/* Event triggered when slice transcription is stabilized */
|
|
141
|
-
onStabilized?: Array<
|
|
155
|
+
onStabilized?: Array<
|
|
156
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onStabilized']>
|
|
157
|
+
>
|
|
142
158
|
/* Event triggered when transcription ends */
|
|
143
|
-
onEnd?: Array<
|
|
159
|
+
onEnd?: Array<
|
|
160
|
+
EventAction<string & keyof TemplateEventPropsMap['RealtimeTranscription']['onEnd']>
|
|
161
|
+
>
|
|
144
162
|
}
|
|
145
163
|
outlets?: {
|
|
146
164
|
/* Is realtime transcription currently active */
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local rerank based on GGML and [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
|
4
|
+
*
|
|
5
|
+
* ## Notice
|
|
6
|
+
* - The device RAM must be larger than 8GB
|
|
7
|
+
* - iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
|
|
8
|
+
* - macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
|
|
9
|
+
* - Android: Recommended use Android 13+ system.
|
|
10
|
+
* - Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
|
|
11
|
+
* - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 2+ GPUs.
|
|
12
|
+
* - Linux / Windows
|
|
13
|
+
* - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
14
|
+
* - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
|
|
15
|
+
*/
|
|
2
16
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
17
|
import type { Data, DataLink } from '../data'
|
|
4
18
|
import type {
|
|
@@ -10,6 +24,7 @@ import type {
|
|
|
10
24
|
Action,
|
|
11
25
|
EventProperty,
|
|
12
26
|
} from '../common'
|
|
27
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
28
|
|
|
14
29
|
/* Load the model */
|
|
15
30
|
export type GeneratorRerankerActionLoadModel = Action & {
|
|
@@ -103,9 +118,11 @@ Default property:
|
|
|
103
118
|
}
|
|
104
119
|
events?: {
|
|
105
120
|
/* Event triggered when the reranker context state changes (loading, ready, error, released) */
|
|
106
|
-
onContextStateChange?: Array<
|
|
121
|
+
onContextStateChange?: Array<
|
|
122
|
+
EventAction<string & keyof TemplateEventPropsMap['Reranker']['onContextStateChange']>
|
|
123
|
+
>
|
|
107
124
|
/* Event triggered when an error occurs during reranker operations */
|
|
108
|
-
onError?: Array<EventAction
|
|
125
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Reranker']['onError']>>
|
|
109
126
|
}
|
|
110
127
|
outlets?: {
|
|
111
128
|
/* Current state of the reranker context (loading, ready, error, released) */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Serial port communication for USB/UART devices (Android, Desktop only)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Get available serial devices */
|
|
15
19
|
export type GeneratorSerialPortActionGeneratorSerialGetDeviceList = Action & {
|
|
@@ -97,9 +101,13 @@ Default property:
|
|
|
97
101
|
/* Event for detach the device */
|
|
98
102
|
generatorSerialOnDetach?: Array<EventAction>
|
|
99
103
|
/* Event on error */
|
|
100
|
-
generatorSerialOnError?: Array<
|
|
104
|
+
generatorSerialOnError?: Array<
|
|
105
|
+
EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnError']>
|
|
106
|
+
>
|
|
101
107
|
/* Event for receive data */
|
|
102
|
-
generatorSerialOnData?: Array<
|
|
108
|
+
generatorSerialOnData?: Array<
|
|
109
|
+
EventAction<string & keyof TemplateEventPropsMap['SerialPort']['generatorSerialOnData']>
|
|
110
|
+
>
|
|
103
111
|
}
|
|
104
112
|
outlets?: {
|
|
105
113
|
/* Available serial devices */
|
|
@@ -115,7 +123,7 @@ Default property:
|
|
|
115
123
|
}
|
|
116
124
|
}
|
|
117
125
|
|
|
118
|
-
/* Serial
|
|
126
|
+
/* Serial port communication for USB/UART devices (Android, Desktop only) */
|
|
119
127
|
export type GeneratorSerialPort = Generator &
|
|
120
128
|
GeneratorSerialPortDef & {
|
|
121
129
|
templateKey: 'GENERATOR_SERIAL_PORT'
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Play sound, see supported formats at https://developer.android.com/guide/topics/media/media-formats
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start playing sound */
|
|
15
19
|
export type GeneratorSoundPlayerActionPlay = Action & {
|
|
@@ -53,7 +57,9 @@ Default property:
|
|
|
53
57
|
/* Sound file loaded successfully */
|
|
54
58
|
onLoad?: Array<EventAction>
|
|
55
59
|
/* Sound file load error */
|
|
56
|
-
onLoadError?: Array<
|
|
60
|
+
onLoadError?: Array<
|
|
61
|
+
EventAction<string & keyof TemplateEventPropsMap['SoundPlayer']['onLoadError']>
|
|
62
|
+
>
|
|
57
63
|
/* Sound playback complete */
|
|
58
64
|
onPlay?: Array<EventAction>
|
|
59
65
|
/* Sound file playback end */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Record audio (Microphone)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start record */
|
|
15
19
|
export type GeneratorSoundRecorderActionStart = Action & {
|
|
@@ -85,9 +89,9 @@ Default property:
|
|
|
85
89
|
}
|
|
86
90
|
events?: {
|
|
87
91
|
/* Event for chunk data (Base64 encoded PCM) */
|
|
88
|
-
chunk?: Array<EventAction
|
|
92
|
+
chunk?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['chunk']>>
|
|
89
93
|
/* Event for recorded file */
|
|
90
|
-
recorded?: Array<EventAction
|
|
94
|
+
recorded?: Array<EventAction<string & keyof TemplateEventPropsMap['SoundRecorder']['recorded']>>
|
|
91
95
|
}
|
|
92
96
|
outlets?: {
|
|
93
97
|
/* Is recording */
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local Speech-to-Text (STT) inference based on GGML and [whisper.cpp](https://github.com/ggerganov/whisper.cpp)
|
|
4
|
+
*
|
|
5
|
+
* ## Notice
|
|
6
|
+
* - iOS: Supported GPU acceleration, recommended use M1+ / A17+ chip device
|
|
7
|
+
* - macOS: Supported GPU acceleration, recommended use M1+ chip device
|
|
8
|
+
* - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
|
|
9
|
+
* - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
10
|
+
*/
|
|
2
11
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
12
|
import type { Data, DataLink } from '../data'
|
|
4
13
|
import type {
|
|
@@ -10,6 +19,7 @@ import type {
|
|
|
10
19
|
Action,
|
|
11
20
|
EventProperty,
|
|
12
21
|
} from '../common'
|
|
22
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
23
|
|
|
14
24
|
/* Load the model */
|
|
15
25
|
export type GeneratorSpeechInferenceActionLoadModel = Action & {
|
|
@@ -415,11 +425,15 @@ Default property:
|
|
|
415
425
|
}
|
|
416
426
|
events?: {
|
|
417
427
|
/* Event triggered when context state changes */
|
|
418
|
-
onContextStateChange?: Array<
|
|
428
|
+
onContextStateChange?: Array<
|
|
429
|
+
EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onContextStateChange']>
|
|
430
|
+
>
|
|
419
431
|
/* Event triggered when error occurs */
|
|
420
|
-
onError?: Array<EventAction
|
|
432
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onError']>>
|
|
421
433
|
/* Event triggered when got transcribe result */
|
|
422
|
-
onTranscribed?: Array<
|
|
434
|
+
onTranscribed?: Array<
|
|
435
|
+
EventAction<string & keyof TemplateEventPropsMap['SpeechInference']['onTranscribed']>
|
|
436
|
+
>
|
|
423
437
|
/* Event triggered when transcribe realtime done */
|
|
424
438
|
onRealtimeStop?: Array<EventAction>
|
|
425
439
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local STT inference based on [transformers.js](https://huggingface.co/docs/transformers.js)
|
|
4
|
+
* You can use any converted model on HuggingFace.
|
|
5
|
+
*/
|
|
2
6
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
7
|
import type { Data, DataLink } from '../data'
|
|
4
8
|
import type {
|
|
@@ -10,6 +14,7 @@ import type {
|
|
|
10
14
|
Action,
|
|
11
15
|
EventProperty,
|
|
12
16
|
} from '../common'
|
|
17
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
18
|
|
|
14
19
|
/* Load the model */
|
|
15
20
|
export type GeneratorOnnxSTTActionLoadModel = Action & {
|
|
@@ -191,9 +196,11 @@ Default property:
|
|
|
191
196
|
}
|
|
192
197
|
events?: {
|
|
193
198
|
/* Event triggered when state change */
|
|
194
|
-
onContextStateChange?: Array<
|
|
199
|
+
onContextStateChange?: Array<
|
|
200
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onContextStateChange']>
|
|
201
|
+
>
|
|
195
202
|
/* Event triggered when error occurs */
|
|
196
|
-
onError?: Array<EventAction
|
|
203
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxStt']['onError']>>
|
|
197
204
|
}
|
|
198
205
|
outlets?: {
|
|
199
206
|
/* Context state */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Speech-to-Text using platform's native capabilities
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start speech recognition */
|
|
15
19
|
export type GeneratorPlatformSTTActionStart = Action & {
|
|
@@ -40,9 +44,13 @@ Default property:
|
|
|
40
44
|
/* Event for speech recognition end */
|
|
41
45
|
onSpeechEnd?: Array<EventAction>
|
|
42
46
|
/* Event for speech recognition results */
|
|
43
|
-
onSpeechResults?: Array<
|
|
47
|
+
onSpeechResults?: Array<
|
|
48
|
+
EventAction<string & keyof TemplateEventPropsMap['PlatformStt']['onSpeechResults']>
|
|
49
|
+
>
|
|
44
50
|
/* Event for speech recognition error */
|
|
45
|
-
onSpeechError?: Array<
|
|
51
|
+
onSpeechError?: Array<
|
|
52
|
+
EventAction<string & keyof TemplateEventPropsMap['PlatformStt']['onSpeechError']>
|
|
53
|
+
>
|
|
46
54
|
}
|
|
47
55
|
outlets?: {
|
|
48
56
|
/* Recognized speech text */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* SQLite database: create tables, query, insert, update, and delete with SQL
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Execute SQL statement */
|
|
15
19
|
export type GeneratorSqliteActionExecute = ActionWithParams & {
|
|
@@ -108,9 +112,11 @@ Default property:
|
|
|
108
112
|
}
|
|
109
113
|
events?: {
|
|
110
114
|
/* Event triggered when error occurs */
|
|
111
|
-
onError?: Array<EventAction
|
|
115
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Sqlite']['onError']>>
|
|
112
116
|
/* Event triggered when query result is ready */
|
|
113
|
-
onQueryResult?: Array<
|
|
117
|
+
onQueryResult?: Array<
|
|
118
|
+
EventAction<string & keyof TemplateEventPropsMap['Sqlite']['onQueryResult']>
|
|
119
|
+
>
|
|
114
120
|
}
|
|
115
121
|
outlets?: {
|
|
116
122
|
/* Whether the database is ready */
|
|
@@ -130,7 +136,7 @@ Default property:
|
|
|
130
136
|
}
|
|
131
137
|
}
|
|
132
138
|
|
|
133
|
-
/* SQLite
|
|
139
|
+
/* SQLite database: create tables, query, insert, update, and delete with SQL */
|
|
134
140
|
export type GeneratorSqlite = Generator &
|
|
135
141
|
GeneratorSqliteDef & {
|
|
136
142
|
templateKey: 'GENERATOR_SQLITE'
|
package/types/generators/Step.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Trigger change canvas / outlet / event by setup rules
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Start execute the step */
|
|
15
19
|
export type GeneratorStepActionStart = Action & {
|
|
@@ -70,7 +74,7 @@ Default property:
|
|
|
70
74
|
}
|
|
71
75
|
events?: {
|
|
72
76
|
/* Event on step (If action is `event`) */
|
|
73
|
-
onStep?: Array<EventAction
|
|
77
|
+
onStep?: Array<EventAction<string & keyof TemplateEventPropsMap['Step']['onStep']>>
|
|
74
78
|
}
|
|
75
79
|
outlets?: {
|
|
76
80
|
/* Result of step payload (If action is `outlet`) */
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Speech recognition on iOS 26+ (Not supported on tvOS)
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - Native Apple speech recognition
|
|
7
|
+
* - High accuracy transcription
|
|
8
|
+
* - Privacy-focused on-device processing
|
|
9
|
+
* - Supports file and data transcription
|
|
10
|
+
* - Requires iOS 26+ (Not supported on tvOS)
|
|
11
|
+
*/
|
|
2
12
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
13
|
import type { Data, DataLink } from '../data'
|
|
4
14
|
import type {
|
|
@@ -10,6 +20,7 @@ import type {
|
|
|
10
20
|
Action,
|
|
11
21
|
EventProperty,
|
|
12
22
|
} from '../common'
|
|
23
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
24
|
|
|
14
25
|
/* Initialize STT */
|
|
15
26
|
export type GeneratorAppleSTTActionInit = Action & {
|
|
@@ -71,9 +82,11 @@ Default property:
|
|
|
71
82
|
}
|
|
72
83
|
events?: {
|
|
73
84
|
/* Error event */
|
|
74
|
-
onError?: Array<EventAction
|
|
85
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onError']>>
|
|
75
86
|
/* Event triggered when got transcribe result */
|
|
76
|
-
onTranscribed?: Array<
|
|
87
|
+
onTranscribed?: Array<
|
|
88
|
+
EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onTranscribed']>
|
|
89
|
+
>
|
|
77
90
|
}
|
|
78
91
|
outlets?: {
|
|
79
92
|
/* State outlet (loading, ready, error) */
|