@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.
Files changed (89) hide show
  1. package/compile/action-name-map.ts +6 -0
  2. package/compile/index.ts +64 -43
  3. package/compile/util.ts +2 -0
  4. package/package.json +2 -2
  5. package/skills/bricks-design/LICENSE.txt +180 -0
  6. package/skills/bricks-design/SKILL.md +66 -0
  7. package/tools/deploy.ts +2 -2
  8. package/tools/preview.ts +1 -1
  9. package/types/automation.ts +1 -1
  10. package/types/bricks/Camera.ts +15 -7
  11. package/types/bricks/Chart.ts +9 -3
  12. package/types/bricks/GenerativeMedia.ts +24 -8
  13. package/types/bricks/Icon.ts +6 -2
  14. package/types/bricks/Image.ts +7 -3
  15. package/types/bricks/Items.ts +22 -8
  16. package/types/bricks/Lottie.ts +12 -4
  17. package/types/bricks/Maps.ts +13 -5
  18. package/types/bricks/QrCode.ts +6 -2
  19. package/types/bricks/Rect.ts +6 -2
  20. package/types/bricks/RichText.ts +6 -2
  21. package/types/bricks/Rive.ts +20 -10
  22. package/types/bricks/Slideshow.ts +17 -7
  23. package/types/bricks/Svg.ts +5 -1
  24. package/types/bricks/Text.ts +6 -2
  25. package/types/bricks/TextInput.ts +13 -7
  26. package/types/bricks/Video.ts +8 -4
  27. package/types/bricks/VideoStreaming.ts +5 -1
  28. package/types/bricks/WebRtcStream.ts +6 -2
  29. package/types/bricks/WebView.ts +9 -5
  30. package/types/common.ts +10 -8
  31. package/types/generators/AlarmClock.ts +12 -6
  32. package/types/generators/Assistant.ts +12 -6
  33. package/types/generators/BleCentral.ts +19 -7
  34. package/types/generators/BlePeripheral.ts +6 -2
  35. package/types/generators/CanvasMap.ts +6 -2
  36. package/types/generators/CastlesPay.ts +12 -4
  37. package/types/generators/DataBank.ts +13 -5
  38. package/types/generators/File.ts +46 -16
  39. package/types/generators/GraphQl.ts +9 -3
  40. package/types/generators/Http.ts +6 -2
  41. package/types/generators/HttpServer.ts +14 -6
  42. package/types/generators/Information.ts +7 -3
  43. package/types/generators/Intent.ts +7 -3
  44. package/types/generators/Iterator.ts +9 -5
  45. package/types/generators/Keyboard.ts +9 -5
  46. package/types/generators/LlmAnthropicCompat.ts +21 -5
  47. package/types/generators/LlmAppleBuiltin.ts +19 -4
  48. package/types/generators/LlmGgml.ts +65 -6
  49. package/types/generators/LlmMediaTekNeuroPilot.ts +16 -5
  50. package/types/generators/LlmMlx.ts +22 -5
  51. package/types/generators/LlmOnnx.ts +16 -5
  52. package/types/generators/LlmOpenAiCompat.ts +25 -5
  53. package/types/generators/LlmQualcommAiEngine.ts +13 -5
  54. package/types/generators/Mcp.ts +43 -17
  55. package/types/generators/McpServer.ts +20 -8
  56. package/types/generators/MediaFlow.ts +12 -4
  57. package/types/generators/MqttBroker.ts +19 -7
  58. package/types/generators/MqttClient.ts +8 -4
  59. package/types/generators/Question.ts +7 -3
  60. package/types/generators/RealtimeTranscription.ts +26 -8
  61. package/types/generators/RerankerGgml.ts +20 -3
  62. package/types/generators/SerialPort.ts +12 -4
  63. package/types/generators/SoundPlayer.ts +8 -2
  64. package/types/generators/SoundRecorder.ts +7 -3
  65. package/types/generators/SpeechToTextGgml.ts +18 -4
  66. package/types/generators/SpeechToTextOnnx.ts +10 -3
  67. package/types/generators/SpeechToTextPlatform.ts +11 -3
  68. package/types/generators/SqLite.ts +10 -4
  69. package/types/generators/Step.ts +6 -2
  70. package/types/generators/SttAppleBuiltin.ts +16 -3
  71. package/types/generators/Tcp.ts +8 -4
  72. package/types/generators/TcpServer.ts +13 -7
  73. package/types/generators/TextToSpeechAppleBuiltin.ts +16 -3
  74. package/types/generators/TextToSpeechGgml.ts +21 -3
  75. package/types/generators/TextToSpeechOnnx.ts +10 -3
  76. package/types/generators/TextToSpeechOpenAiLike.ts +9 -3
  77. package/types/generators/ThermalPrinter.ts +7 -3
  78. package/types/generators/Tick.ts +8 -4
  79. package/types/generators/Udp.ts +8 -4
  80. package/types/generators/VadGgml.ts +12 -4
  81. package/types/generators/VadOnnx.ts +11 -4
  82. package/types/generators/VadTraditional.ts +13 -4
  83. package/types/generators/VectorStore.ts +7 -3
  84. package/types/generators/Watchdog.ts +8 -4
  85. package/types/generators/WebCrawler.ts +6 -2
  86. package/types/generators/WebRtc.ts +13 -5
  87. package/types/generators/WebSocket.ts +6 -2
  88. package/types/subspace.ts +2 -0
  89. 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
+ * TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive 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 connect */
15
19
  export type GeneratorTCPActionConnect = Action & {
@@ -81,13 +85,13 @@ Default property:
81
85
  /* Event of connect successful */
82
86
  onConnected?: Array<EventAction>
83
87
  /* Event of receive data */
84
- onData?: Array<EventAction>
88
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onData']>>
85
89
  /* Event of connection idle timeout */
86
90
  onTimeout?: Array<EventAction>
87
91
  /* Event of connection close */
88
92
  onClose?: Array<EventAction>
89
93
  /* Event of connection error */
90
- onError?: Array<EventAction>
94
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onError']>>
91
95
  }
92
96
  outlets?: {
93
97
  /* Connection status */
@@ -99,7 +103,7 @@ Default property:
99
103
  }
100
104
  }
101
105
 
102
- /* TCP */
106
+ /* TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive support */
103
107
  export type GeneratorTCP = Generator &
104
108
  GeneratorTCPDef & {
105
109
  templateKey: 'GENERATOR_TCP'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS
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 TCP server */
15
19
  export type GeneratorTCPServerActionStart = Action & {
@@ -94,15 +98,17 @@ Default property:
94
98
  /* Event of TCP server is ready */
95
99
  onReady?: Array<EventAction>
96
100
  /* Event of TCP server accept the connection */
97
- onAcceptConnection?: Array<EventAction>
101
+ onAcceptConnection?: Array<
102
+ EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onAcceptConnection']>
103
+ >
98
104
  /* Event of receive data */
99
- onData?: Array<EventAction>
105
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onData']>>
100
106
  /* Event of connection idle timeout */
101
- onTimeout?: Array<EventAction>
107
+ onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onTimeout']>>
102
108
  /* Event of connection close */
103
- onClose?: Array<EventAction>
109
+ onClose?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onClose']>>
104
110
  /* Event of server or connection error */
105
- onError?: Array<EventAction>
111
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onError']>>
106
112
  }
107
113
  outlets?: {
108
114
  /* Server is listening */
@@ -118,7 +124,7 @@ Default property:
118
124
  }
119
125
  }
120
126
 
121
- /* TCP Server */
127
+ /* TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS */
122
128
  export type GeneratorTCPServer = Generator &
123
129
  GeneratorTCPServerDef & {
124
130
  templateKey: 'GENERATOR_TCP_SERVER'
@@ -1,4 +1,14 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Text-to-speech synthesis using Apple's native speech synthesis
4
+ *
5
+ * ## Features
6
+ * - Native Apple speech synthesis
7
+ * - Natural sounding voices
8
+ * - Privacy-focused on-device processing
9
+ * - Multiple voice options
10
+ * - Requires iOS 13+ (native speech synthesis)
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
  /* Load the TTS model */
15
26
  export type GeneratorAppleTTSActionLoadModel = Action & {
@@ -70,9 +81,11 @@ Default property:
70
81
  }
71
82
  events?: {
72
83
  /* Event triggered when state change */
73
- onContextStateChange?: Array<EventAction>
84
+ onContextStateChange?: Array<
85
+ EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onContextStateChange']>
86
+ >
74
87
  /* Event triggered when error occurs */
75
- onError?: Array<EventAction>
88
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onError']>>
76
89
  }
77
90
  outlets?: {
78
91
  /* Context state */
@@ -1,4 +1,19 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Local Text-to-Speech (TTS) inference based on GGML and [llama.cpp](https://github.com/ggerganov/llama.cpp)
4
+ * You can use any converted model on HuggingFace.
5
+ *
6
+ * ## Notice
7
+ * - The device RAM must be larger than 8GB
8
+ * - iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
9
+ * - macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
10
+ * - Android: Recommended use Android 13+ system.
11
+ * - Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
12
+ * - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 2+ GPUs.
13
+ * - Linux / Windows
14
+ * - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
15
+ * - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
16
+ */
2
17
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
18
  import type { Data, DataLink } from '../data'
4
19
  import type {
@@ -10,6 +25,7 @@ import type {
10
25
  Action,
11
26
  EventProperty,
12
27
  } from '../common'
28
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
13
29
 
14
30
  /* Load the model */
15
31
  export type GeneratorGGMLTTSActionLoadModel = Action & {
@@ -154,9 +170,11 @@ Default property:
154
170
  }
155
171
  events?: {
156
172
  /* Event triggered when state change */
157
- onContextStateChange?: Array<EventAction>
173
+ onContextStateChange?: Array<
174
+ EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onContextStateChange']>
175
+ >
158
176
  /* Event triggered when error occurs */
159
- onError?: Array<EventAction>
177
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onError']>>
160
178
  }
161
179
  outlets?: {
162
180
  /* Context state */
@@ -1,4 +1,8 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Local Text-to-Speech (TTS) inference based on ONNX Runtime and [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 GeneratorTTSActionLoadModel = Action & {
@@ -133,9 +138,11 @@ Default property:
133
138
  }
134
139
  events?: {
135
140
  /* Event triggered when state change */
136
- onContextStateChange?: Array<EventAction>
141
+ onContextStateChange?: Array<
142
+ EventAction<string & keyof TemplateEventPropsMap['Tts']['onContextStateChange']>
143
+ >
137
144
  /* Event triggered when error occurs */
138
- onError?: Array<EventAction>
145
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tts']['onError']>>
139
146
  }
140
147
  outlets?: {
141
148
  /* Context state */
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Generate speech from text using OpenAI's Text-to-Speech API
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
  /* Generate audio */
15
19
  export type GeneratorOpenAiTTSActionGenerate = ActionWithParams & {
@@ -78,9 +82,11 @@ Default property:
78
82
  }
79
83
  events?: {
80
84
  /* Event triggered when state change */
81
- onContextStateChange?: Array<EventAction>
85
+ onContextStateChange?: Array<
86
+ EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onContextStateChange']>
87
+ >
82
88
  /* Event triggered when error occurs */
83
- onError?: Array<EventAction>
89
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onError']>>
84
90
  }
85
91
  outlets?: {
86
92
  /* Context state */
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * ESC/POS thermal receipt printer control via Bluetooth or USB
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
  /* Init thermal printer connection */
15
19
  export type GeneratorThermalPrinterActionInit = Action & {
@@ -150,7 +154,7 @@ Default property:
150
154
  }
151
155
  events?: {
152
156
  /* Event of connection error */
153
- onError?: Array<EventAction>
157
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['ThermalPrinter']['onError']>>
154
158
  }
155
159
  outlets?: {
156
160
  /* Is thermal printer initialized */
@@ -164,7 +168,7 @@ Default property:
164
168
  }
165
169
  }
166
170
 
167
- /* Thermal Printer */
171
+ /* ESC/POS thermal receipt printer control via Bluetooth or USB */
168
172
  export type GeneratorThermalPrinter = Generator &
169
173
  GeneratorThermalPrinterDef & {
170
174
  templateKey: 'GENERATOR_THERMAL_PRINTER'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Periodic timer that triggers events at a configurable interval
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 the tick */
15
19
  export type GeneratorTickAction_ = Action & {
@@ -44,9 +48,9 @@ Default property:
44
48
  }
45
49
  events?: {
46
50
  /* Event for each tick start */
47
- ticking?: Array<EventAction>
51
+ ticking?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['ticking']>>
48
52
  /* Event for tick completed */
49
- completed?: Array<EventAction>
53
+ completed?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['completed']>>
50
54
  }
51
55
  outlets?: {
52
56
  /* Countdown step value */
@@ -56,7 +60,7 @@ Default property:
56
60
  }
57
61
  }
58
62
 
59
- /* Execute event in countdown manner */
63
+ /* Periodic timer that triggers events at a configurable interval */
60
64
  export type GeneratorTick = Generator &
61
65
  GeneratorTickDef & {
62
66
  templateKey: 'GENERATOR_TICK'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * UDP socket communication
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
  /* Bind UDP port */
15
19
  export type GeneratorUDPActionBind = Action & {
@@ -72,11 +76,11 @@ Default property:
72
76
  /* Event of UDP port is binded */
73
77
  onReady?: Array<EventAction>
74
78
  /* Event of receive data */
75
- onData?: Array<EventAction>
79
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onData']>>
76
80
  /* Event of socket closeed */
77
81
  onClose?: Array<EventAction>
78
82
  /* Event of socket error */
79
- onError?: Array<EventAction>
83
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onError']>>
80
84
  }
81
85
  outlets?: {
82
86
  /* Local UDP binded port */
@@ -93,7 +97,7 @@ Default property:
93
97
  }
94
98
  }
95
99
 
96
- /* TCP Server */
100
+ /* UDP socket communication */
97
101
  export type GeneratorUDP = Generator &
98
102
  GeneratorUDPDef & {
99
103
  templateKey: 'GENERATOR_UDP'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Local Voice Activity Detection (VAD) inference based on GGML and [whisper.rn](https://github.com/mybigday/whisper.rn)
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
  /* Load the model */
15
19
  export type GeneratorVadInferenceActionLoadModel = Action & {
@@ -165,11 +169,15 @@ Default property:
165
169
  }
166
170
  events?: {
167
171
  /* Event triggered when context state changes */
168
- onContextStateChange?: Array<EventAction>
172
+ onContextStateChange?: Array<
173
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onContextStateChange']>
174
+ >
169
175
  /* Event triggered when error occurs */
170
- onError?: Array<EventAction>
176
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VadInference']['onError']>>
171
177
  /* Event triggered when got detection result */
172
- onDetected?: Array<EventAction>
178
+ onDetected?: Array<
179
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onDetected']>
180
+ >
173
181
  }
174
182
  outlets?: {
175
183
  /* Context state */
@@ -1,4 +1,8 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Local Voice Activity Detection (VAD) inference based on [transformers.js](https://huggingface.co/docs/transformers.js)
4
+ * You can use any compatible VAD model from HuggingFace (Silero VAD, smart-turn, etc.)
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 GeneratorVadInferenceOnnxActionLoadModel = Action & {
@@ -159,11 +164,13 @@ Default property:
159
164
  }
160
165
  events?: {
161
166
  /* Event triggered when context state changes */
162
- onContextStateChange?: Array<EventAction>
167
+ onContextStateChange?: Array<
168
+ EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onContextStateChange']>
169
+ >
163
170
  /* Event triggered when error occurs */
164
- onError?: Array<EventAction>
171
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onError']>>
165
172
  /* Event triggered when got detection result */
166
- onDetected?: Array<EventAction>
173
+ onDetected?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onDetected']>>
167
174
  }
168
175
  outlets?: {
169
176
  /* Context state */
@@ -1,4 +1,8 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Traditional Voice Activity Detection (VAD) using pitch detection and RMS volume analysis
4
+ * No model download required - pure algorithmic approach
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
  /* Detect speech in audio file */
15
20
  export type GeneratorVadInferenceTraditionalActionDetectFile = ActionWithParams & {
@@ -68,11 +73,15 @@ Default property:
68
73
  }
69
74
  events?: {
70
75
  /* Event triggered when context state changes */
71
- onContextStateChange?: Array<EventAction>
76
+ onContextStateChange?: Array<
77
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onContextStateChange']>
78
+ >
72
79
  /* Event triggered when detection result is available */
73
- onDetected?: Array<EventAction>
80
+ onDetected?: Array<
81
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onDetected']>
82
+ >
74
83
  /* Event triggered when error occurs */
75
- onError?: Array<EventAction>
84
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onError']>>
76
85
  }
77
86
  outlets?: {
78
87
  /* Context state */
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Vector database for semantic search. Supports GGML (on-device GGUF models) and OpenAI Compatible API (OpenAI/ollama/llama.cpp) as embedding sources
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
  /* Load the model (Only if source is ggml) */
15
19
  export type GeneratorVectorStoreActionModelLoad = Action & {
@@ -197,7 +201,7 @@ Default property:
197
201
  }
198
202
  events?: {
199
203
  /* Event triggered when error occurs */
200
- onError?: Array<EventAction>
204
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VectorStore']['onError']>>
201
205
  }
202
206
  outlets?: {
203
207
  /* undefined */
@@ -230,7 +234,7 @@ Default property:
230
234
  }
231
235
  }
232
236
 
233
- /* Vector Store - File embeddings & search */
237
+ /* Vector database for semantic search. Supports GGML (on-device GGUF models) and OpenAI Compatible API (OpenAI/ollama/llama.cpp) as embedding sources */
234
238
  export type GeneratorVectorStore = Generator &
235
239
  GeneratorVectorStoreDef & {
236
240
  templateKey: 'GENERATOR_VECTOR_STORE'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Trigger event with timeout by listening to specified events
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
  /* Reset watch */
15
19
  export type GeneratorWatchdogActionResetWatch = Action & {
@@ -52,9 +56,9 @@ Default property:
52
56
  }
53
57
  events?: {
54
58
  /* Event on specific sender id trigger event */
55
- onEvent?: Array<EventAction>
59
+ onEvent?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onEvent']>>
56
60
  /* Event on timeout */
57
- onTimeout?: Array<EventAction>
61
+ onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onTimeout']>>
58
62
  }
59
63
  outlets?: {
60
64
  /* The last event */
@@ -75,7 +79,7 @@ Default property:
75
79
  }
76
80
  }
77
81
 
78
- /* Triger event with timeout by listen specified events */
82
+ /* Trigger event with timeout by listening to specified events */
79
83
  export type GeneratorWatchdog = Generator &
80
84
  GeneratorWatchdogDef & {
81
85
  templateKey: 'GENERATOR_WATCHDOG'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Extract web content via CSS selectors. Supports WebView method (iOS/Android, renders JS) and HTTP method (all platforms, direct request)
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
  /* Run Crawler request with defined properties */
15
19
  export type GeneratorWebCrawlerActionRunRequest = Action & {
@@ -76,7 +80,7 @@ Default property:
76
80
  }
77
81
  }
78
82
 
79
- /* Web crawler to get specific value */
83
+ /* Extract web content via CSS selectors. Supports WebView method (iOS/Android, renders JS) and HTTP method (all platforms, direct request) */
80
84
  export type GeneratorWebCrawler = Generator &
81
85
  GeneratorWebCrawlerDef & {
82
86
  templateKey: 'GENERATOR_WEB_CRAWLER'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * WebRTC peer connection for real-time audio/video/data communication
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
  /* Initiate WebRTC request */
15
19
  export type GeneratorWebRTCActionInitiate = Action & {
@@ -102,19 +106,23 @@ Default property:
102
106
  }
103
107
  events?: {
104
108
  /* Event of signal update */
105
- onSignalUpdate?: Array<EventAction>
109
+ onSignalUpdate?: Array<
110
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onSignalUpdate']>
111
+ >
106
112
  /* Event of peer connected */
107
113
  onConnected?: Array<EventAction>
108
114
  /* Event of peer disconnected */
109
115
  onDisconnected?: Array<EventAction>
110
116
  /* Event of handshake error */
111
- onError?: Array<EventAction>
117
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onError']>>
112
118
  /* Event of data channel open */
113
119
  onChannelOpen?: Array<EventAction>
114
120
  /* Event of data channel close */
115
121
  onChannelClose?: Array<EventAction>
116
122
  /* Event of received message on data channel */
117
- onChannelMessage?: Array<EventAction>
123
+ onChannelMessage?: Array<
124
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onChannelMessage']>
125
+ >
118
126
  }
119
127
  outlets?: {
120
128
  /* Signal to create peer connection */
@@ -142,7 +150,7 @@ Default property:
142
150
  }
143
151
  }
144
152
 
145
- /* WebRTC */
153
+ /* WebRTC peer connection for real-time audio/video/data communication */
146
154
  export type GeneratorWebRTC = Generator &
147
155
  GeneratorWebRTCDef & {
148
156
  templateKey: 'GENERATOR_WEBRTC'
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * WebSocket or Socket.IO Generator
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 */
15
19
  export type GeneratorWebSocketActionConnect = Action & {
@@ -105,7 +109,7 @@ Default property:
105
109
  /* Event for disconnect from server */
106
110
  onClose?: Array<EventAction>
107
111
  /* Event for receive message */
108
- onMessage?: Array<EventAction>
112
+ onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['WebSocket']['onMessage']>>
109
113
  /* Event for error occurred */
110
114
  onError?: Array<EventAction>
111
115
  }
package/types/subspace.ts CHANGED
@@ -10,6 +10,8 @@ export type Subspace = {
10
10
  title: string
11
11
  description?: string
12
12
  hideShortRef?: boolean
13
+ unused?: boolean
14
+ portal?: 'top' | 'left' | 'bottom' | 'right'
13
15
  // Unexpanded information in Editor
14
16
  unexpanded?: {
15
17
  data?: boolean