@fugood/bricks-project 2.24.0-beta.0 → 2.24.0-beta.10
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 +26 -14
- package/compile/index.ts +351 -130
- package/package.json +6 -3
- package/skills/bricks-project/rules/automations.md +74 -28
- package/tools/deploy.ts +39 -10
- package/tools/mcp-server.ts +21 -13
- package/tools/postinstall.ts +53 -6
- package/tools/preview-main.mjs +11 -7
- package/tsconfig.json +16 -0
- package/types/bricks/Camera.ts +1 -1
- package/types/bricks/Chart.ts +1 -1
- package/types/bricks/GenerativeMedia.ts +1 -1
- package/types/bricks/Icon.ts +1 -1
- package/types/bricks/Image.ts +1 -1
- package/types/bricks/Items.ts +1 -1
- package/types/bricks/Lottie.ts +1 -1
- package/types/bricks/Maps.ts +1 -1
- package/types/bricks/QrCode.ts +1 -1
- package/types/bricks/Rect.ts +1 -1
- package/types/bricks/RichText.ts +1 -1
- package/types/bricks/Rive.ts +1 -1
- package/types/bricks/Slideshow.ts +1 -1
- package/types/bricks/Svg.ts +1 -1
- package/types/bricks/Text.ts +1 -1
- package/types/bricks/TextInput.ts +1 -1
- package/types/bricks/Video.ts +1 -1
- package/types/bricks/VideoStreaming.ts +1 -1
- package/types/bricks/WebRtcStream.ts +1 -1
- package/types/bricks/WebView.ts +1 -1
- package/types/canvas.ts +2 -2
- package/types/common.ts +4 -4
- package/types/generators/AlarmClock.ts +1 -1
- package/types/generators/Assistant.ts +1 -1
- package/types/generators/BleCentral.ts +1 -1
- package/types/generators/BlePeripheral.ts +1 -1
- package/types/generators/CanvasMap.ts +1 -1
- package/types/generators/CastlesPay.ts +1 -1
- package/types/generators/DataBank.ts +1 -1
- package/types/generators/File.ts +1 -1
- package/types/generators/GraphQl.ts +1 -1
- package/types/generators/Http.ts +1 -1
- package/types/generators/HttpServer.ts +1 -1
- package/types/generators/Information.ts +1 -1
- package/types/generators/Intent.ts +1 -1
- package/types/generators/Iterator.ts +1 -1
- package/types/generators/Keyboard.ts +1 -1
- package/types/generators/LlmAnthropicCompat.ts +1 -1
- package/types/generators/LlmAppleBuiltin.ts +1 -1
- package/types/generators/LlmGgml.ts +1 -1
- package/types/generators/LlmOnnx.ts +1 -1
- package/types/generators/LlmOpenAiCompat.ts +1 -1
- package/types/generators/LlmQualcommAiEngine.ts +1 -1
- package/types/generators/Mcp.ts +1 -1
- package/types/generators/McpServer.ts +1 -1
- package/types/generators/MediaFlow.ts +1 -1
- package/types/generators/MqttBroker.ts +1 -1
- package/types/generators/MqttClient.ts +1 -1
- package/types/generators/Question.ts +1 -1
- package/types/generators/RealtimeTranscription.ts +15 -7
- package/types/generators/RerankerGgml.ts +1 -1
- package/types/generators/SerialPort.ts +1 -1
- package/types/generators/SoundPlayer.ts +1 -1
- package/types/generators/SoundRecorder.ts +1 -1
- package/types/generators/SpeechToTextGgml.ts +5 -96
- package/types/generators/SpeechToTextOnnx.ts +1 -1
- package/types/generators/SpeechToTextPlatform.ts +1 -1
- package/types/generators/SqLite.ts +1 -1
- package/types/generators/Step.ts +1 -1
- package/types/generators/SttAppleBuiltin.ts +1 -1
- package/types/generators/Tcp.ts +1 -1
- package/types/generators/TcpServer.ts +1 -1
- package/types/generators/TextToSpeechAppleBuiltin.ts +1 -1
- package/types/generators/TextToSpeechGgml.ts +1 -1
- package/types/generators/TextToSpeechOnnx.ts +1 -1
- package/types/generators/TextToSpeechOpenAiLike.ts +1 -1
- package/types/generators/ThermalPrinter.ts +1 -1
- package/types/generators/Tick.ts +1 -1
- package/types/generators/Udp.ts +1 -1
- package/types/generators/VadGgml.ts +1 -1
- package/types/generators/VadOnnx.ts +201 -0
- package/types/generators/VadTraditional.ts +123 -0
- package/types/generators/VectorStore.ts +1 -1
- package/types/generators/Watchdog.ts +1 -1
- package/types/generators/WebCrawler.ts +1 -1
- package/types/generators/WebRtc.ts +1 -1
- package/types/generators/WebSocket.ts +1 -1
- package/types/generators/index.ts +2 -0
- package/utils/calc.ts +12 -8
- package/utils/event-props.ts +27 -0
- package/utils/id.ts +4 -0
- package/api/index.ts +0 -1
- package/api/instance.ts +0 -213
package/types/bricks/Text.ts
CHANGED
package/types/bricks/Video.ts
CHANGED
package/types/bricks/WebView.ts
CHANGED
package/types/canvas.ts
CHANGED
package/types/common.ts
CHANGED
|
@@ -7,8 +7,8 @@ export interface Brick {
|
|
|
7
7
|
__typename: 'Brick'
|
|
8
8
|
id: string
|
|
9
9
|
templateKey: string
|
|
10
|
-
title
|
|
11
|
-
description
|
|
10
|
+
title?: string
|
|
11
|
+
description?: string
|
|
12
12
|
property?: {}
|
|
13
13
|
events: {}
|
|
14
14
|
outlets?: {}
|
|
@@ -25,8 +25,8 @@ export interface Generator {
|
|
|
25
25
|
__typename: 'Generator'
|
|
26
26
|
id: string
|
|
27
27
|
templateKey: string
|
|
28
|
-
title
|
|
29
|
-
description
|
|
28
|
+
title?: string
|
|
29
|
+
description?: string
|
|
30
30
|
localSyncRunMode?: LocalSyncStrategy
|
|
31
31
|
property?: {}
|
|
32
32
|
events: {}
|
|
@@ -185,7 +185,7 @@ Default property:
|
|
|
185
185
|
export type GeneratorBlePeripheral = Generator &
|
|
186
186
|
GeneratorBlePeripheralDef & {
|
|
187
187
|
templateKey: 'GENERATOR_BLE_PERIPHERAL'
|
|
188
|
-
switches
|
|
188
|
+
switches?: Array<
|
|
189
189
|
SwitchDef &
|
|
190
190
|
GeneratorBlePeripheralDef & {
|
|
191
191
|
conds?: Array<{
|
package/types/generators/File.ts
CHANGED
package/types/generators/Http.ts
CHANGED
|
@@ -171,7 +171,7 @@ Default property:
|
|
|
171
171
|
export type GeneratorAnthropicLLM = Generator &
|
|
172
172
|
GeneratorAnthropicLLMDef & {
|
|
173
173
|
templateKey: 'GENERATOR_ANTHROPIC_LLM'
|
|
174
|
-
switches
|
|
174
|
+
switches?: Array<
|
|
175
175
|
SwitchDef &
|
|
176
176
|
GeneratorAnthropicLLMDef & {
|
|
177
177
|
conds?: Array<{
|
package/types/generators/Mcp.ts
CHANGED
|
@@ -41,10 +41,10 @@ Default property:
|
|
|
41
41
|
"audioSliceSec": 30,
|
|
42
42
|
"audioMinSec": 1,
|
|
43
43
|
"maxSlicesInMemory": 5,
|
|
44
|
+
"transcribeProcessingPauseMs": 500,
|
|
45
|
+
"initTranscribeAfterMs": 500,
|
|
44
46
|
"vadStrategy": "use-preset",
|
|
45
47
|
"vadPreset": "default",
|
|
46
|
-
"autoSliceOnSpeechEnd": true,
|
|
47
|
-
"autoSliceThreshold": 2,
|
|
48
48
|
"initialPrompt": "",
|
|
49
49
|
"promptPreviousSlices": false,
|
|
50
50
|
"saveAudio": true,
|
|
@@ -73,6 +73,10 @@ Default property:
|
|
|
73
73
|
audioMinSec?: number | DataLink
|
|
74
74
|
/* Maximum number of slices to keep in memory */
|
|
75
75
|
maxSlicesInMemory?: number | DataLink
|
|
76
|
+
/* Transcribe processing interval in milliseconds */
|
|
77
|
+
transcribeProcessingPauseMs?: number | DataLink
|
|
78
|
+
/* Transcribe processing init after pause in milliseconds */
|
|
79
|
+
initTranscribeAfterMs?: number | DataLink
|
|
76
80
|
/* VAD Strategy */
|
|
77
81
|
vadStrategy?: 'use-preset' | 'use-generator-options' | DataLink
|
|
78
82
|
/* VAD preset configuration */
|
|
@@ -86,10 +90,6 @@ Default property:
|
|
|
86
90
|
| 'meeting'
|
|
87
91
|
| 'noisy-environment'
|
|
88
92
|
| DataLink
|
|
89
|
-
/* Auto slice on speech end */
|
|
90
|
-
autoSliceOnSpeechEnd?: boolean | DataLink
|
|
91
|
-
/* Auto slice threshold in seconds */
|
|
92
|
-
autoSliceThreshold?: number | DataLink
|
|
93
93
|
/* Initial prompt for transcription */
|
|
94
94
|
initialPrompt?: string | DataLink
|
|
95
95
|
/* Include previous slices in prompt */
|
|
@@ -128,6 +128,8 @@ Default property:
|
|
|
128
128
|
onStatusChange?: Array<EventAction>
|
|
129
129
|
/* Event triggered when statistics update */
|
|
130
130
|
onStatsUpdate?: Array<EventAction>
|
|
131
|
+
/* Event triggered when slice transcription is stabilized */
|
|
132
|
+
onStabilized?: Array<EventAction>
|
|
131
133
|
/* Event triggered when transcription ends */
|
|
132
134
|
onEnd?: Array<EventAction>
|
|
133
135
|
}
|
|
@@ -140,12 +142,16 @@ Default property:
|
|
|
140
142
|
results?: () => Data
|
|
141
143
|
/* Current transcription result text */
|
|
142
144
|
resultText?: () => Data
|
|
145
|
+
/* Last stabilized transcription result segment */
|
|
146
|
+
lastStabilizedSegment?: () => Data
|
|
143
147
|
/* Current statistics */
|
|
144
148
|
statistics?: () => Data
|
|
145
149
|
/* Latest transcribe event */
|
|
146
150
|
lastTranscribeEvent?: () => Data
|
|
147
151
|
/* Latest VAD event */
|
|
148
152
|
lastVadEvent?: () => Data
|
|
153
|
+
/* Stabilized transcription text from completed slices */
|
|
154
|
+
stabilizedText?: () => Data
|
|
149
155
|
/* Audio output file path (auto-generated when saving audio) */
|
|
150
156
|
audioOutputPath?: () => Data
|
|
151
157
|
}
|
|
@@ -155,7 +161,7 @@ Default property:
|
|
|
155
161
|
export type GeneratorRealtimeTranscription = Generator &
|
|
156
162
|
GeneratorRealtimeTranscriptionDef & {
|
|
157
163
|
templateKey: 'GENERATOR_REALTIME_TRANSCRIPTION'
|
|
158
|
-
switches
|
|
164
|
+
switches?: Array<
|
|
159
165
|
SwitchDef &
|
|
160
166
|
GeneratorRealtimeTranscriptionDef & {
|
|
161
167
|
conds?: Array<{
|
|
@@ -170,9 +176,11 @@ export type GeneratorRealtimeTranscription = Generator &
|
|
|
170
176
|
| 'isTranscribing'
|
|
171
177
|
| 'results'
|
|
172
178
|
| 'resultText'
|
|
179
|
+
| 'lastStabilizedSegment'
|
|
173
180
|
| 'statistics'
|
|
174
181
|
| 'lastTranscribeEvent'
|
|
175
182
|
| 'lastVadEvent'
|
|
183
|
+
| 'stabilizedText'
|
|
176
184
|
| 'audioOutputPath'
|
|
177
185
|
value: any
|
|
178
186
|
}
|
|
@@ -80,76 +80,9 @@ export type GeneratorSpeechInferenceActionTranscribeData = ActionWithParams & {
|
|
|
80
80
|
>
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
/*
|
|
84
|
-
export type
|
|
85
|
-
__actionName: '
|
|
86
|
-
params?: Array<
|
|
87
|
-
| {
|
|
88
|
-
input: 'prompt'
|
|
89
|
-
value?: string | DataLink | EventProperty
|
|
90
|
-
mapping?: string
|
|
91
|
-
}
|
|
92
|
-
| {
|
|
93
|
-
input: 'beamSize'
|
|
94
|
-
value?: number | DataLink | EventProperty
|
|
95
|
-
mapping?: string
|
|
96
|
-
}
|
|
97
|
-
| {
|
|
98
|
-
input: 'language'
|
|
99
|
-
value?: string | DataLink | EventProperty
|
|
100
|
-
mapping?: string
|
|
101
|
-
}
|
|
102
|
-
| {
|
|
103
|
-
input: 'translate'
|
|
104
|
-
value?: boolean | DataLink | EventProperty
|
|
105
|
-
mapping?: string
|
|
106
|
-
}
|
|
107
|
-
| {
|
|
108
|
-
input: 'realtimeAudioSeconds'
|
|
109
|
-
value?: number | DataLink | EventProperty
|
|
110
|
-
mapping?: string
|
|
111
|
-
}
|
|
112
|
-
| {
|
|
113
|
-
input: 'realtimeAudioSliceSeconds'
|
|
114
|
-
value?: number | DataLink | EventProperty
|
|
115
|
-
mapping?: string
|
|
116
|
-
}
|
|
117
|
-
| {
|
|
118
|
-
input: 'realtimeAudioMinSeconds'
|
|
119
|
-
value?: number | DataLink | EventProperty
|
|
120
|
-
mapping?: string
|
|
121
|
-
}
|
|
122
|
-
| {
|
|
123
|
-
input: 'realtimeSaveAudio'
|
|
124
|
-
value?: boolean | DataLink | EventProperty
|
|
125
|
-
mapping?: string
|
|
126
|
-
}
|
|
127
|
-
| {
|
|
128
|
-
input: 'realtimeVadEnabled'
|
|
129
|
-
value?: boolean | DataLink | EventProperty
|
|
130
|
-
mapping?: string
|
|
131
|
-
}
|
|
132
|
-
| {
|
|
133
|
-
input: 'realtimeVadMs'
|
|
134
|
-
value?: number | DataLink | EventProperty
|
|
135
|
-
mapping?: string
|
|
136
|
-
}
|
|
137
|
-
| {
|
|
138
|
-
input: 'realtimeVadThold'
|
|
139
|
-
value?: number | DataLink | EventProperty
|
|
140
|
-
mapping?: string
|
|
141
|
-
}
|
|
142
|
-
| {
|
|
143
|
-
input: 'realtimeVadFreqThold'
|
|
144
|
-
value?: number | DataLink | EventProperty
|
|
145
|
-
mapping?: string
|
|
146
|
-
}
|
|
147
|
-
>
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* [Deprecated] Stop transcribing microphone audio source */
|
|
151
|
-
export type GeneratorSpeechInferenceActionTranscribeRealtimeStop = Action & {
|
|
152
|
-
__actionName: 'GENERATOR_SPEECH_INFERENCE_TRANSCRIBE_REALTIME_STOP'
|
|
83
|
+
/* Stop current transcription */
|
|
84
|
+
export type GeneratorSpeechInferenceActionTranscribeStop = Action & {
|
|
85
|
+
__actionName: 'GENERATOR_SPEECH_INFERENCE_TRANSCRIBE_STOP'
|
|
153
86
|
}
|
|
154
87
|
|
|
155
88
|
/* Clear downloaded files (model, audio) & current jobs */
|
|
@@ -172,14 +105,7 @@ Default property:
|
|
|
172
105
|
"modelUseCoreML": false,
|
|
173
106
|
"modelUseGPU": true,
|
|
174
107
|
"modelUseFlashAttn": false,
|
|
175
|
-
"inferLanguage": "Auto"
|
|
176
|
-
"inferRealtimeAudioSeconds": 30,
|
|
177
|
-
"inferRealtimeAudioSliceSeconds": 30,
|
|
178
|
-
"inferRealtimeSaveAudio": false,
|
|
179
|
-
"inferRealtimeVadEnabled": false,
|
|
180
|
-
"inferRealtimeVadMs": 2000,
|
|
181
|
-
"inferRealtimeVadThold": 0.6,
|
|
182
|
-
"inferRealtimeVadFreqThold": 100
|
|
108
|
+
"inferLanguage": "Auto"
|
|
183
109
|
}
|
|
184
110
|
*/
|
|
185
111
|
property?: {
|
|
@@ -381,23 +307,6 @@ Default property:
|
|
|
381
307
|
inferFileUrl?: string | DataLink
|
|
382
308
|
/* MD5 of file to be inferred */
|
|
383
309
|
inferFileMd5?: string | DataLink
|
|
384
|
-
/* Record duration in seconds. For performance, the value less than 30 seconds is recommended. */
|
|
385
|
-
inferRealtimeAudioSeconds?: number | DataLink
|
|
386
|
-
/* Optimize audio transcription performance by slicing audio samples when `Realtime Audio Seconds` > 30. */
|
|
387
|
-
inferRealtimeAudioSliceSeconds?: number | DataLink
|
|
388
|
-
/* Min duration of audio to start transcribe. Min: 0.5 seconds, Max: `Realtime Audio Slice Seconds`, Default: 1 second */
|
|
389
|
-
inferRealtimeAudioMinSeconds?: number | DataLink
|
|
390
|
-
/* Save recorded audio to file, the file path will be output to outlet. */
|
|
391
|
-
inferRealtimeSaveAudio?: boolean | DataLink
|
|
392
|
-
/* Start transcribe on recording when the audio volume is greater than the threshold by using VAD (Voice Activity Detection).
|
|
393
|
-
The first VAD will be triggered after 2 second of recording. */
|
|
394
|
-
inferRealtimeVadEnabled?: boolean | DataLink
|
|
395
|
-
/* The length of the collected audio is used for VAD. (ms) */
|
|
396
|
-
inferRealtimeVadMs?: number | DataLink
|
|
397
|
-
/* VAD threshold */
|
|
398
|
-
inferRealtimeVadThold?: number | DataLink
|
|
399
|
-
/* Frequency to apply High-pass filter in VAD */
|
|
400
|
-
inferRealtimeVadFreqThold?: number | DataLink
|
|
401
310
|
/* Buttress connection settings for remote inference */
|
|
402
311
|
buttressConnectionSettings?:
|
|
403
312
|
| DataLink
|
|
@@ -446,7 +355,7 @@ Default property:
|
|
|
446
355
|
export type GeneratorSpeechInference = Generator &
|
|
447
356
|
GeneratorSpeechInferenceDef & {
|
|
448
357
|
templateKey: 'GENERATOR_SPEECH_INFERENCE'
|
|
449
|
-
switches
|
|
358
|
+
switches?: Array<
|
|
450
359
|
SwitchDef &
|
|
451
360
|
GeneratorSpeechInferenceDef & {
|
|
452
361
|
conds?: Array<{
|