@fugood/bricks-project 2.23.0 → 2.23.3

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 (93) hide show
  1. package/compile/action-name-map.ts +26 -0
  2. package/compile/index.ts +353 -130
  3. package/package.json +6 -4
  4. package/skills/bricks-project/rules/automations.md +74 -28
  5. package/tools/deploy.ts +39 -10
  6. package/tools/mcp-server.ts +21 -13
  7. package/tools/postinstall.ts +53 -6
  8. package/tools/preview-main.mjs +8 -7
  9. package/tools/preview.ts +1 -1
  10. package/tsconfig.json +16 -0
  11. package/types/bricks/Camera.ts +1 -1
  12. package/types/bricks/Chart.ts +1 -1
  13. package/types/bricks/GenerativeMedia.ts +1 -1
  14. package/types/bricks/Icon.ts +1 -1
  15. package/types/bricks/Image.ts +1 -1
  16. package/types/bricks/Items.ts +1 -1
  17. package/types/bricks/Lottie.ts +1 -1
  18. package/types/bricks/Maps.ts +1 -1
  19. package/types/bricks/QrCode.ts +1 -1
  20. package/types/bricks/Rect.ts +1 -1
  21. package/types/bricks/RichText.ts +1 -1
  22. package/types/bricks/Rive.ts +1 -1
  23. package/types/bricks/Slideshow.ts +1 -1
  24. package/types/bricks/Svg.ts +1 -1
  25. package/types/bricks/Text.ts +1 -1
  26. package/types/bricks/TextInput.ts +1 -1
  27. package/types/bricks/Video.ts +1 -1
  28. package/types/bricks/VideoStreaming.ts +1 -1
  29. package/types/bricks/WebRtcStream.ts +1 -1
  30. package/types/bricks/WebView.ts +1 -1
  31. package/types/canvas.ts +2 -2
  32. package/types/common.ts +4 -4
  33. package/types/generators/AlarmClock.ts +1 -1
  34. package/types/generators/Assistant.ts +1 -1
  35. package/types/generators/BleCentral.ts +1 -1
  36. package/types/generators/BlePeripheral.ts +1 -1
  37. package/types/generators/CanvasMap.ts +1 -1
  38. package/types/generators/CastlesPay.ts +1 -1
  39. package/types/generators/DataBank.ts +1 -1
  40. package/types/generators/File.ts +1 -1
  41. package/types/generators/GraphQl.ts +1 -1
  42. package/types/generators/Http.ts +1 -1
  43. package/types/generators/HttpServer.ts +1 -1
  44. package/types/generators/Information.ts +1 -1
  45. package/types/generators/Intent.ts +1 -1
  46. package/types/generators/Iterator.ts +1 -1
  47. package/types/generators/Keyboard.ts +1 -1
  48. package/types/generators/LlmAnthropicCompat.ts +1 -1
  49. package/types/generators/LlmAppleBuiltin.ts +1 -1
  50. package/types/generators/LlmGgml.ts +1 -1
  51. package/types/generators/LlmOnnx.ts +1 -1
  52. package/types/generators/LlmOpenAiCompat.ts +1 -1
  53. package/types/generators/LlmQualcommAiEngine.ts +1 -1
  54. package/types/generators/Mcp.ts +1 -1
  55. package/types/generators/McpServer.ts +1 -1
  56. package/types/generators/MediaFlow.ts +1 -1
  57. package/types/generators/MqttBroker.ts +1 -1
  58. package/types/generators/MqttClient.ts +1 -1
  59. package/types/generators/Question.ts +1 -1
  60. package/types/generators/RealtimeTranscription.ts +15 -7
  61. package/types/generators/RerankerGgml.ts +1 -1
  62. package/types/generators/SerialPort.ts +1 -1
  63. package/types/generators/SoundPlayer.ts +1 -1
  64. package/types/generators/SoundRecorder.ts +1 -1
  65. package/types/generators/SpeechToTextGgml.ts +6 -1
  66. package/types/generators/SpeechToTextOnnx.ts +1 -1
  67. package/types/generators/SpeechToTextPlatform.ts +1 -1
  68. package/types/generators/SqLite.ts +1 -1
  69. package/types/generators/Step.ts +1 -1
  70. package/types/generators/SttAppleBuiltin.ts +1 -1
  71. package/types/generators/Tcp.ts +1 -1
  72. package/types/generators/TcpServer.ts +1 -1
  73. package/types/generators/TextToSpeechAppleBuiltin.ts +1 -1
  74. package/types/generators/TextToSpeechGgml.ts +1 -1
  75. package/types/generators/TextToSpeechOnnx.ts +1 -1
  76. package/types/generators/TextToSpeechOpenAiLike.ts +1 -1
  77. package/types/generators/ThermalPrinter.ts +1 -1
  78. package/types/generators/Tick.ts +1 -1
  79. package/types/generators/Udp.ts +1 -1
  80. package/types/generators/VadGgml.ts +1 -1
  81. package/types/generators/VadOnnx.ts +201 -0
  82. package/types/generators/VadTraditional.ts +123 -0
  83. package/types/generators/VectorStore.ts +1 -1
  84. package/types/generators/Watchdog.ts +1 -1
  85. package/types/generators/WebCrawler.ts +1 -1
  86. package/types/generators/WebRtc.ts +1 -1
  87. package/types/generators/WebSocket.ts +1 -1
  88. package/types/generators/index.ts +2 -0
  89. package/utils/calc.ts +16 -8
  90. package/utils/event-props.ts +27 -0
  91. package/utils/id.ts +4 -0
  92. package/api/index.ts +0 -1
  93. package/api/instance.ts +0 -213
@@ -168,7 +168,7 @@ Default property:
168
168
  export type GeneratorThermalPrinter = Generator &
169
169
  GeneratorThermalPrinterDef & {
170
170
  templateKey: 'GENERATOR_THERMAL_PRINTER'
171
- switches: Array<
171
+ switches?: Array<
172
172
  SwitchDef &
173
173
  GeneratorThermalPrinterDef & {
174
174
  conds?: Array<{
@@ -60,7 +60,7 @@ Default property:
60
60
  export type GeneratorTick = Generator &
61
61
  GeneratorTickDef & {
62
62
  templateKey: 'GENERATOR_TICK'
63
- switches: Array<
63
+ switches?: Array<
64
64
  SwitchDef &
65
65
  GeneratorTickDef & {
66
66
  conds?: Array<{
@@ -92,7 +92,7 @@ Default property:
92
92
  export type GeneratorUDP = Generator &
93
93
  GeneratorUDPDef & {
94
94
  templateKey: 'GENERATOR_UDP'
95
- switches: Array<
95
+ switches?: Array<
96
96
  SwitchDef &
97
97
  GeneratorUDPDef & {
98
98
  conds?: Array<{
@@ -189,7 +189,7 @@ Default property:
189
189
  export type GeneratorVadInference = Generator &
190
190
  GeneratorVadInferenceDef & {
191
191
  templateKey: 'GENERATOR_VAD_INFERENCE'
192
- switches: Array<
192
+ switches?: Array<
193
193
  SwitchDef &
194
194
  GeneratorVadInferenceDef & {
195
195
  conds?: Array<{
@@ -0,0 +1,201 @@
1
+ /* Auto generated by build script */
2
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
+ import type { Data, DataLink } from '../data'
4
+ import type {
5
+ Brick,
6
+ Generator,
7
+ EventAction,
8
+ ActionWithDataParams,
9
+ ActionWithParams,
10
+ Action,
11
+ EventProperty,
12
+ } from '../common'
13
+
14
+ /* Load the model */
15
+ export type GeneratorVadInferenceOnnxActionLoadModel = Action & {
16
+ __actionName: 'GENERATOR_ONNX_VAD_LOAD_MODEL'
17
+ }
18
+
19
+ /* Detect speech in audio file */
20
+ export type GeneratorVadInferenceOnnxActionDetectFile = ActionWithParams & {
21
+ __actionName: 'GENERATOR_ONNX_VAD_DETECT_FILE'
22
+ params?: Array<
23
+ | {
24
+ input: 'fileUrl'
25
+ value?: string | DataLink | EventProperty
26
+ mapping?: string
27
+ }
28
+ | {
29
+ input: 'threshold'
30
+ value?: number | DataLink | EventProperty
31
+ mapping?: string
32
+ }
33
+ | {
34
+ input: 'minSpeechDurationMs'
35
+ value?: number | DataLink | EventProperty
36
+ mapping?: string
37
+ }
38
+ | {
39
+ input: 'minSilenceDurationMs'
40
+ value?: number | DataLink | EventProperty
41
+ mapping?: string
42
+ }
43
+ | {
44
+ input: 'maxSpeechDurationS'
45
+ value?: number | DataLink | EventProperty
46
+ mapping?: string
47
+ }
48
+ | {
49
+ input: 'speechPadMs'
50
+ value?: number | DataLink | EventProperty
51
+ mapping?: string
52
+ }
53
+ >
54
+ }
55
+
56
+ /* Detect speech in audio data */
57
+ export type GeneratorVadInferenceOnnxActionDetectData = ActionWithParams & {
58
+ __actionName: 'GENERATOR_ONNX_VAD_DETECT_DATA'
59
+ params?: Array<
60
+ | {
61
+ input: 'data'
62
+ value?: any | EventProperty
63
+ mapping?: string
64
+ }
65
+ | {
66
+ input: 'threshold'
67
+ value?: number | DataLink | EventProperty
68
+ mapping?: string
69
+ }
70
+ | {
71
+ input: 'minSpeechDurationMs'
72
+ value?: number | DataLink | EventProperty
73
+ mapping?: string
74
+ }
75
+ | {
76
+ input: 'minSilenceDurationMs'
77
+ value?: number | DataLink | EventProperty
78
+ mapping?: string
79
+ }
80
+ | {
81
+ input: 'maxSpeechDurationS'
82
+ value?: number | DataLink | EventProperty
83
+ mapping?: string
84
+ }
85
+ | {
86
+ input: 'speechPadMs'
87
+ value?: number | DataLink | EventProperty
88
+ mapping?: string
89
+ }
90
+ >
91
+ }
92
+
93
+ /* Clean cache */
94
+ export type GeneratorVadInferenceOnnxActionCleanCache = Action & {
95
+ __actionName: 'GENERATOR_ONNX_VAD_CLEAN_CACHE'
96
+ }
97
+
98
+ /* Release context */
99
+ export type GeneratorVadInferenceOnnxActionReleaseContext = Action & {
100
+ __actionName: 'GENERATOR_ONNX_VAD_RELEASE_CONTEXT'
101
+ }
102
+
103
+ interface GeneratorVadInferenceOnnxDef {
104
+ /*
105
+ Default property:
106
+ {
107
+ "modelType": "auto",
108
+ "detectThreshold": 0.5,
109
+ "detectMinSpeechDurationMs": 250,
110
+ "detectMinSilenceDurationMs": 100,
111
+ "detectMaxSpeechDurationS": 30,
112
+ "detectSpeechPadMs": 30,
113
+ "executionMode": "sequential"
114
+ }
115
+ */
116
+ property?: {
117
+ /* Initialize the VAD context on generator initialization */
118
+ init?: boolean | DataLink
119
+ /* VAD model */
120
+ model?: string | DataLink
121
+ /* Model type (auto-detected from config.json) */
122
+ modelType?: string | DataLink
123
+ /* Quantize type */
124
+ quantizeType?:
125
+ | 'auto'
126
+ | 'none'
127
+ | 'fp16'
128
+ | 'q8'
129
+ | 'int8'
130
+ | 'uint8'
131
+ | 'q4'
132
+ | 'bnb4'
133
+ | 'q4f16'
134
+ | DataLink
135
+ /* Speech probability threshold (0.0-1.0) */
136
+ detectThreshold?: number | DataLink
137
+ /* Minimum speech duration in milliseconds */
138
+ detectMinSpeechDurationMs?: number | DataLink
139
+ /* Minimum silence duration in milliseconds */
140
+ detectMinSilenceDurationMs?: number | DataLink
141
+ /* Maximum speech duration in seconds */
142
+ detectMaxSpeechDurationS?: number | DataLink
143
+ /* Padding around speech segments in milliseconds */
144
+ detectSpeechPadMs?: number | DataLink
145
+ /* Executor candidates, descending order of priority
146
+ Default will be xnnpack, wasm, cpu */
147
+ executors?:
148
+ | Array<'qnn' | 'dml' | 'nnapi' | 'xnnpack' | 'coreml' | 'cpu' | 'wasm' | 'webgpu' | DataLink>
149
+ | DataLink
150
+ /* Execution mode
151
+ Usually when the model has many branches, setting this option to `parallel` will give you better performance. */
152
+ executionMode?: 'sequential' | 'parallel' | DataLink
153
+ /* QNN backend */
154
+ qnnBackend?: 'HTP' | 'HTA' | 'DSP' | 'GPU' | 'CPU' | DataLink
155
+ /* Enable FP16 for QNN HTP */
156
+ qnnHtpEnableFp16?: boolean | DataLink
157
+ /* Enable QNN debug */
158
+ qnnEnableDebug?: boolean | DataLink
159
+ }
160
+ events?: {
161
+ /* Event triggered when context state changes */
162
+ onContextStateChange?: Array<EventAction>
163
+ /* Event triggered when error occurs */
164
+ onError?: Array<EventAction>
165
+ /* Event triggered when got detection result */
166
+ onDetected?: Array<EventAction>
167
+ }
168
+ outlets?: {
169
+ /* Context state */
170
+ contextState?: () => Data
171
+ /* Is detecting */
172
+ isDetecting?: () => Data
173
+ /* Detection segments result */
174
+ detectionSegments?: () => Data
175
+ /* Detection details */
176
+ detectionDetails?: () => Data
177
+ }
178
+ }
179
+
180
+ /* Local Voice Activity Detection (VAD) inference based on [transformers.js](https://huggingface.co/docs/transformers.js)
181
+ You can use any compatible VAD model from HuggingFace (Silero VAD, smart-turn, etc.) */
182
+ export type GeneratorVadInferenceOnnx = Generator &
183
+ GeneratorVadInferenceOnnxDef & {
184
+ templateKey: 'GENERATOR_ONNX_VAD'
185
+ switches?: Array<
186
+ SwitchDef &
187
+ GeneratorVadInferenceOnnxDef & {
188
+ conds?: Array<{
189
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
190
+ cond:
191
+ | SwitchCondInnerStateCurrentCanvas
192
+ | SwitchCondData
193
+ | {
194
+ __typename: 'SwitchCondInnerStateOutlet'
195
+ outlet: 'contextState' | 'isDetecting' | 'detectionSegments' | 'detectionDetails'
196
+ value: any
197
+ }
198
+ }>
199
+ }
200
+ >
201
+ }
@@ -0,0 +1,123 @@
1
+ /* Auto generated by build script */
2
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
+ import type { Data, DataLink } from '../data'
4
+ import type {
5
+ Brick,
6
+ Generator,
7
+ EventAction,
8
+ ActionWithDataParams,
9
+ ActionWithParams,
10
+ Action,
11
+ EventProperty,
12
+ } from '../common'
13
+
14
+ /* Detect speech in audio file */
15
+ export type GeneratorVadInferenceTraditionalActionDetectFile = ActionWithParams & {
16
+ __actionName: 'GENERATOR_TRADITIONAL_VAD_DETECT_FILE'
17
+ params?: Array<{
18
+ input: 'fileUrl'
19
+ value?: string | DataLink | EventProperty
20
+ mapping?: string
21
+ }>
22
+ }
23
+
24
+ /* Detect speech in audio data stream */
25
+ export type GeneratorVadInferenceTraditionalActionDetectData = ActionWithParams & {
26
+ __actionName: 'GENERATOR_TRADITIONAL_VAD_DETECT_DATA'
27
+ params?: Array<{
28
+ input: 'data'
29
+ value?: any | EventProperty
30
+ mapping?: string
31
+ }>
32
+ }
33
+
34
+ interface GeneratorVadInferenceTraditionalDef {
35
+ /*
36
+ Default property:
37
+ {
38
+ "detectVocalFreqMin": 75,
39
+ "detectVocalFreqMax": 900,
40
+ "detectThreshold": 0.5,
41
+ "detectMinSpeechDurationMs": 250,
42
+ "detectMinSilenceDurationMs": 100,
43
+ "detectMaxSpeechDurationS": 30,
44
+ "detectSpeechPadMs": 30
45
+ }
46
+ */
47
+ property?: {
48
+ /* Minimum vocal frequency in Hz */
49
+ detectVocalFreqMin?: number | DataLink
50
+ /* Maximum vocal frequency in Hz */
51
+ detectVocalFreqMax?: number | DataLink
52
+ /* Volume threshold in dB */
53
+ detectVolumeThreshold?: number | DataLink
54
+ /* Speech probability threshold (0.0-1.0) - maps to frequency clarity */
55
+ detectThreshold?: number | DataLink
56
+ /* Minimum speech duration in milliseconds */
57
+ detectMinSpeechDurationMs?: number | DataLink
58
+ /* Minimum silence duration in milliseconds */
59
+ detectMinSilenceDurationMs?: number | DataLink
60
+ /* Maximum speech duration in seconds */
61
+ detectMaxSpeechDurationS?: number | DataLink
62
+ /* Padding around speech segments in milliseconds */
63
+ detectSpeechPadMs?: number | DataLink
64
+ /* The file URL or path to be analyzed */
65
+ detectFileUrl?: string | DataLink
66
+ /* MD5 of file to be analyzed */
67
+ detectFileMd5?: string | DataLink
68
+ }
69
+ events?: {
70
+ /* Event triggered when context state changes */
71
+ onContextStateChange?: Array<EventAction>
72
+ /* Event triggered when detection result is available */
73
+ onDetected?: Array<EventAction>
74
+ /* Event triggered when error occurs */
75
+ onError?: Array<EventAction>
76
+ }
77
+ outlets?: {
78
+ /* Context state */
79
+ contextState?: () => Data
80
+ /* Is detecting */
81
+ isDetecting?: () => Data
82
+ /* Is speaking (real-time) */
83
+ isSpeaking?: () => Data
84
+ /* Detection segments result */
85
+ detectionSegments?: () => Data
86
+ /* Current volume in dB */
87
+ currentVolume?: () => Data
88
+ /* Current frequency clarity (0-1) */
89
+ currentClarity?: () => Data
90
+ /* Current detected frequency in Hz */
91
+ currentFrequency?: () => Data
92
+ }
93
+ }
94
+
95
+ /* Traditional Voice Activity Detection (VAD) using pitch detection and RMS volume analysis
96
+ No model download required - pure algorithmic approach */
97
+ export type GeneratorVadInferenceTraditional = Generator &
98
+ GeneratorVadInferenceTraditionalDef & {
99
+ templateKey: 'GENERATOR_TRADITIONAL_VAD'
100
+ switches?: Array<
101
+ SwitchDef &
102
+ GeneratorVadInferenceTraditionalDef & {
103
+ conds?: Array<{
104
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
105
+ cond:
106
+ | SwitchCondInnerStateCurrentCanvas
107
+ | SwitchCondData
108
+ | {
109
+ __typename: 'SwitchCondInnerStateOutlet'
110
+ outlet:
111
+ | 'contextState'
112
+ | 'isDetecting'
113
+ | 'isSpeaking'
114
+ | 'detectionSegments'
115
+ | 'currentVolume'
116
+ | 'currentClarity'
117
+ | 'currentFrequency'
118
+ value: any
119
+ }
120
+ }>
121
+ }
122
+ >
123
+ }
@@ -217,7 +217,7 @@ Default property:
217
217
  export type GeneratorVectorStore = Generator &
218
218
  GeneratorVectorStoreDef & {
219
219
  templateKey: 'GENERATOR_VECTOR_STORE'
220
- switches: Array<
220
+ switches?: Array<
221
221
  SwitchDef &
222
222
  GeneratorVectorStoreDef & {
223
223
  conds?: Array<{
@@ -74,7 +74,7 @@ Default property:
74
74
  export type GeneratorWatchdog = Generator &
75
75
  GeneratorWatchdogDef & {
76
76
  templateKey: 'GENERATOR_WATCHDOG'
77
- switches: Array<
77
+ switches?: Array<
78
78
  SwitchDef &
79
79
  GeneratorWatchdogDef & {
80
80
  conds?: Array<{
@@ -80,7 +80,7 @@ Default property:
80
80
  export type GeneratorWebCrawler = Generator &
81
81
  GeneratorWebCrawlerDef & {
82
82
  templateKey: 'GENERATOR_WEB_CRAWLER'
83
- switches: Array<
83
+ switches?: Array<
84
84
  SwitchDef &
85
85
  GeneratorWebCrawlerDef & {
86
86
  conds?: Array<{
@@ -140,7 +140,7 @@ Default property:
140
140
  export type GeneratorWebRTC = Generator &
141
141
  GeneratorWebRTCDef & {
142
142
  templateKey: 'GENERATOR_WEBRTC'
143
- switches: Array<
143
+ switches?: Array<
144
144
  SwitchDef &
145
145
  GeneratorWebRTCDef & {
146
146
  conds?: Array<{
@@ -125,7 +125,7 @@ Default property:
125
125
  export type GeneratorWebSocket = Generator &
126
126
  GeneratorWebSocketDef & {
127
127
  templateKey: 'GENERATOR_WEB_SOCKET'
128
- switches: Array<
128
+ switches?: Array<
129
129
  SwitchDef &
130
130
  GeneratorWebSocketDef & {
131
131
  conds?: Array<{
@@ -33,9 +33,11 @@ export * from './ThermalPrinter'
33
33
  export * from './SqLite'
34
34
  export * from './McpServer'
35
35
  export * from './Mcp'
36
+ export * from './VadTraditional'
36
37
  export * from './TextToSpeechOnnx'
37
38
  export * from './LlmOnnx'
38
39
  export * from './SpeechToTextOnnx'
40
+ export * from './VadOnnx'
39
41
  export * from './SpeechToTextGgml'
40
42
  export * from './VadGgml'
41
43
  export * from './RealtimeTranscription'
package/utils/calc.ts CHANGED
@@ -33,10 +33,14 @@ export const generateDataCalculationMapEditorInfo = (
33
33
  nodes.forEach((node) => {
34
34
  // Count and track inputs
35
35
  if ('inputs' in node) {
36
- const inputs = node.inputs
37
- .filter((input) => input !== null)
38
- .map((input) => (Array.isArray(input) ? input.length : 1))
39
- .reduce((sum, count) => sum + count, 0)
36
+ let inputs = 0
37
+ // eslint-disable-next-line no-restricted-syntax
38
+ for (const input of node.inputs) {
39
+ // eslint-disable-next-line no-continue
40
+ if (input === null) continue
41
+ if (Array.isArray(input)) inputs += input.length
42
+ else inputs += 1
43
+ }
40
44
  inputCounts.set(node, inputs)
41
45
 
42
46
  // Track connections
@@ -59,10 +63,14 @@ export const generateDataCalculationMapEditorInfo = (
59
63
 
60
64
  // Count outputs
61
65
  if ('outputs' in node) {
62
- const outputs = node.outputs
63
- .filter((output) => output !== null)
64
- .map((output) => (Array.isArray(output) ? output.length : 1))
65
- .reduce((sum, count) => sum + count, 0)
66
+ let outputs = 0
67
+ // eslint-disable-next-line no-restricted-syntax
68
+ for (const output of node.outputs) {
69
+ // eslint-disable-next-line no-continue
70
+ if (output === null) continue
71
+ if (Array.isArray(output)) outputs += output.length
72
+ else outputs += 1
73
+ }
66
74
  outputCounts.set(node, outputs)
67
75
  } else {
68
76
  outputCounts.set(node, 0)
@@ -733,6 +733,18 @@ export const templateEventPropsMap = {
733
733
  'GENERATOR_MCP_ERROR_MESSAGE', // type: string
734
734
  ],
735
735
  },
736
+ GENERATOR_TRADITIONAL_VAD: {
737
+ onContextStateChange: [
738
+ 'GENERATOR_TRADITIONAL_VAD_CONTEXT_STATE', // type: string
739
+ ],
740
+ onDetected: [
741
+ 'GENERATOR_TRADITIONAL_VAD_DETECTION_SEGMENTS', // type: array
742
+ 'GENERATOR_TRADITIONAL_VAD_DETECTION_TIME', // type: number
743
+ ],
744
+ onError: [
745
+ 'GENERATOR_TRADITIONAL_VAD_ERROR', // type: string
746
+ ],
747
+ },
736
748
  GENERATOR_TTS: {
737
749
  onContextStateChange: [
738
750
  'GENERATOR_TTS_CONTEXT_STATE', // type: string
@@ -767,6 +779,18 @@ export const templateEventPropsMap = {
767
779
  'GENERATOR_ONNX_STT_ERROR', // type: string
768
780
  ],
769
781
  },
782
+ GENERATOR_ONNX_VAD: {
783
+ onContextStateChange: [
784
+ 'GENERATOR_ONNX_VAD_CONTEXT_STATE', // type: string
785
+ ],
786
+ onError: [
787
+ 'GENERATOR_ONNX_VAD_ERROR', // type: string
788
+ ],
789
+ onDetected: [
790
+ 'GENERATOR_ONNX_VAD_DETECTION_SEGMENTS', // type: array
791
+ 'GENERATOR_ONNX_VAD_DETECTION_TIME', // type: number
792
+ ],
793
+ },
770
794
  GENERATOR_SPEECH_INFERENCE: {
771
795
  onContextStateChange: [
772
796
  'GENERATOR_SPEECH_INFERENCE_CONTEXT_STATE', // type: string
@@ -823,6 +847,9 @@ export const templateEventPropsMap = {
823
847
  'GENERATOR_REALTIME_TRANSCRIPTION_STATS_TIMESTAMP', // type: number
824
848
  'GENERATOR_REALTIME_TRANSCRIPTION_STATS', // type: object
825
849
  ],
850
+ onStabilized: [
851
+ 'GENERATOR_REALTIME_TRANSCRIPTION_STABILIZED_TEXT', // type: string
852
+ ],
826
853
  onEnd: [
827
854
  'GENERATOR_REALTIME_TRANSCRIPTION_END_RESULTS', // type: array
828
855
  'GENERATOR_REALTIME_TRANSCRIPTION_END_AUDIO_OUTPUT_PATH', // type: string
package/utils/id.ts CHANGED
@@ -21,6 +21,7 @@ export const makeId = (
21
21
  | 'property_bank_command'
22
22
  | 'property_bank_calc'
23
23
  | 'dynamic-brick'
24
+ | 'automation_map'
24
25
  | 'test'
25
26
  | 'test_case'
26
27
  | 'test_var'
@@ -61,6 +62,9 @@ export const makeId = (
61
62
  case 'property_bank_calc':
62
63
  prefix = 'PROPERTY_BANK_COMMAND_MAP_'
63
64
  break
65
+ case 'automation_map':
66
+ prefix = 'AUTOMATION_MAP_'
67
+ break
64
68
  case 'test':
65
69
  prefix = 'TEST_'
66
70
  break
package/api/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './instance'