@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.
- package/compile/action-name-map.ts +26 -0
- package/compile/index.ts +353 -130
- package/package.json +6 -4
- 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 +8 -7
- package/tools/preview.ts +1 -1
- 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 +6 -1
- 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 +16 -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/Svg.ts
CHANGED
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
|
}
|
|
@@ -147,6 +147,11 @@ export type GeneratorSpeechInferenceActionTranscribeRealtime = ActionWithParams
|
|
|
147
147
|
>
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/* Stop current transcription */
|
|
151
|
+
export type GeneratorSpeechInferenceActionTranscribeStop = Action & {
|
|
152
|
+
__actionName: 'GENERATOR_SPEECH_INFERENCE_TRANSCRIBE_STOP'
|
|
153
|
+
}
|
|
154
|
+
|
|
150
155
|
/* [Deprecated] Stop transcribing microphone audio source */
|
|
151
156
|
export type GeneratorSpeechInferenceActionTranscribeRealtimeStop = Action & {
|
|
152
157
|
__actionName: 'GENERATOR_SPEECH_INFERENCE_TRANSCRIBE_REALTIME_STOP'
|
|
@@ -446,7 +451,7 @@ Default property:
|
|
|
446
451
|
export type GeneratorSpeechInference = Generator &
|
|
447
452
|
GeneratorSpeechInferenceDef & {
|
|
448
453
|
templateKey: 'GENERATOR_SPEECH_INFERENCE'
|
|
449
|
-
switches
|
|
454
|
+
switches?: Array<
|
|
450
455
|
SwitchDef &
|
|
451
456
|
GeneratorSpeechInferenceDef & {
|
|
452
457
|
conds?: Array<{
|
package/types/generators/Step.ts
CHANGED
package/types/generators/Tcp.ts
CHANGED