@fugood/bricks-project 2.23.2 → 2.23.4
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/index.ts +343 -125
- package/package.json +4 -2
- package/skills/bricks-project/rules/automations.md +7 -7
- package/tools/deploy.ts +39 -10
- package/tools/mcp-server.ts +10 -877
- package/tools/mcp-tools/compile.ts +91 -0
- package/tools/mcp-tools/huggingface.ts +653 -0
- package/tools/mcp-tools/icons.ts +60 -0
- package/tools/mcp-tools/lottie.ts +102 -0
- package/tools/mcp-tools/media.ts +110 -0
- package/tools/postinstall.ts +11 -6
- package/tools/pull.ts +25 -9
- 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 +1 -1
- 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 +1 -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 +1 -1
- package/types/generators/VadTraditional.ts +1 -1
- 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/system.ts +1 -1
- package/utils/calc.ts +16 -10
- package/utils/id.ts +4 -0
- package/api/index.ts +0 -1
- package/api/instance.ts +0 -213
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
|
@@ -161,7 +161,7 @@ Default property:
|
|
|
161
161
|
export type GeneratorRealtimeTranscription = Generator &
|
|
162
162
|
GeneratorRealtimeTranscriptionDef & {
|
|
163
163
|
templateKey: 'GENERATOR_REALTIME_TRANSCRIPTION'
|
|
164
|
-
switches
|
|
164
|
+
switches?: Array<
|
|
165
165
|
SwitchDef &
|
|
166
166
|
GeneratorRealtimeTranscriptionDef & {
|
|
167
167
|
conds?: Array<{
|
|
@@ -451,7 +451,7 @@ Default property:
|
|
|
451
451
|
export type GeneratorSpeechInference = Generator &
|
|
452
452
|
GeneratorSpeechInferenceDef & {
|
|
453
453
|
templateKey: 'GENERATOR_SPEECH_INFERENCE'
|
|
454
|
-
switches
|
|
454
|
+
switches?: Array<
|
|
455
455
|
SwitchDef &
|
|
456
456
|
GeneratorSpeechInferenceDef & {
|
|
457
457
|
conds?: Array<{
|
package/types/generators/Step.ts
CHANGED
package/types/generators/Tcp.ts
CHANGED
|
@@ -168,7 +168,7 @@ Default property:
|
|
|
168
168
|
export type GeneratorThermalPrinter = Generator &
|
|
169
169
|
GeneratorThermalPrinterDef & {
|
|
170
170
|
templateKey: 'GENERATOR_THERMAL_PRINTER'
|
|
171
|
-
switches
|
|
171
|
+
switches?: Array<
|
|
172
172
|
SwitchDef &
|
|
173
173
|
GeneratorThermalPrinterDef & {
|
|
174
174
|
conds?: Array<{
|
package/types/generators/Tick.ts
CHANGED
package/types/generators/Udp.ts
CHANGED
|
@@ -189,7 +189,7 @@ Default property:
|
|
|
189
189
|
export type GeneratorVadInference = Generator &
|
|
190
190
|
GeneratorVadInferenceDef & {
|
|
191
191
|
templateKey: 'GENERATOR_VAD_INFERENCE'
|
|
192
|
-
switches
|
|
192
|
+
switches?: Array<
|
|
193
193
|
SwitchDef &
|
|
194
194
|
GeneratorVadInferenceDef & {
|
|
195
195
|
conds?: Array<{
|
|
@@ -182,7 +182,7 @@ Default property:
|
|
|
182
182
|
export type GeneratorVadInferenceOnnx = Generator &
|
|
183
183
|
GeneratorVadInferenceOnnxDef & {
|
|
184
184
|
templateKey: 'GENERATOR_ONNX_VAD'
|
|
185
|
-
switches
|
|
185
|
+
switches?: Array<
|
|
186
186
|
SwitchDef &
|
|
187
187
|
GeneratorVadInferenceOnnxDef & {
|
|
188
188
|
conds?: Array<{
|
|
@@ -97,7 +97,7 @@ Default property:
|
|
|
97
97
|
export type GeneratorVadInferenceTraditional = Generator &
|
|
98
98
|
GeneratorVadInferenceTraditionalDef & {
|
|
99
99
|
templateKey: 'GENERATOR_TRADITIONAL_VAD'
|
|
100
|
-
switches
|
|
100
|
+
switches?: Array<
|
|
101
101
|
SwitchDef &
|
|
102
102
|
GeneratorVadInferenceTraditionalDef & {
|
|
103
103
|
conds?: Array<{
|
|
@@ -217,7 +217,7 @@ Default property:
|
|
|
217
217
|
export type GeneratorVectorStore = Generator &
|
|
218
218
|
GeneratorVectorStoreDef & {
|
|
219
219
|
templateKey: 'GENERATOR_VECTOR_STORE'
|
|
220
|
-
switches
|
|
220
|
+
switches?: Array<
|
|
221
221
|
SwitchDef &
|
|
222
222
|
GeneratorVectorStoreDef & {
|
|
223
223
|
conds?: Array<{
|
package/types/system.ts
CHANGED
|
@@ -276,7 +276,7 @@ export type SystemActionPopupReset = ActionWithParams & {
|
|
|
276
276
|
>
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
/* Take screenshot for current subspace */
|
|
279
|
+
/* Take screenshot for current subspace or the full viewport (including portal subspaces) */
|
|
280
280
|
export type SystemActionTakeScreenshot = ActionWithParams & {
|
|
281
281
|
__actionName: 'TAKE_SCREENSHOT'
|
|
282
282
|
params?: Array<
|
package/utils/calc.ts
CHANGED
|
@@ -33,11 +33,14 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
33
33
|
nodes.forEach((node) => {
|
|
34
34
|
// Count and track inputs
|
|
35
35
|
if ('inputs' in node) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
+
}
|
|
41
44
|
inputCounts.set(node, inputs)
|
|
42
45
|
|
|
43
46
|
// Track connections
|
|
@@ -60,11 +63,14 @@ export const generateDataCalculationMapEditorInfo = (
|
|
|
60
63
|
|
|
61
64
|
// Count outputs
|
|
62
65
|
if ('outputs' in node) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
+
}
|
|
68
74
|
outputCounts.set(node, outputs)
|
|
69
75
|
} else {
|
|
70
76
|
outputCounts.set(node, 0)
|
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'
|