@fugood/bricks-project 2.23.7 → 2.23.9-1

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 (85) hide show
  1. package/compile/index.ts +72 -25
  2. package/package.json +2 -2
  3. package/skills/bricks-design/LICENSE.txt +180 -0
  4. package/skills/bricks-design/SKILL.md +66 -0
  5. package/types/automation.ts +1 -1
  6. package/types/bricks/Camera.ts +10 -5
  7. package/types/bricks/Chart.ts +5 -2
  8. package/types/bricks/GenerativeMedia.ts +20 -7
  9. package/types/bricks/Icon.ts +3 -2
  10. package/types/bricks/Image.ts +2 -1
  11. package/types/bricks/Items.ts +19 -8
  12. package/types/bricks/Lottie.ts +9 -4
  13. package/types/bricks/Maps.ts +10 -5
  14. package/types/bricks/QrCode.ts +1 -0
  15. package/types/bricks/Rect.ts +1 -0
  16. package/types/bricks/RichText.ts +3 -2
  17. package/types/bricks/Rive.ts +17 -10
  18. package/types/bricks/Slideshow.ts +12 -5
  19. package/types/bricks/Svg.ts +1 -0
  20. package/types/bricks/Text.ts +1 -0
  21. package/types/bricks/TextInput.ts +8 -5
  22. package/types/bricks/Video.ts +3 -2
  23. package/types/bricks/VideoStreaming.ts +1 -0
  24. package/types/bricks/WebRtcStream.ts +1 -0
  25. package/types/bricks/WebView.ts +6 -5
  26. package/types/common.ts +10 -8
  27. package/types/generators/AlarmClock.ts +7 -4
  28. package/types/generators/Assistant.ts +9 -6
  29. package/types/generators/BleCentral.ts +14 -5
  30. package/types/generators/BlePeripheral.ts +1 -0
  31. package/types/generators/CanvasMap.ts +2 -1
  32. package/types/generators/CastlesPay.ts +7 -2
  33. package/types/generators/DataBank.ts +8 -3
  34. package/types/generators/File.ts +41 -14
  35. package/types/generators/GraphQl.ts +6 -3
  36. package/types/generators/Http.ts +3 -2
  37. package/types/generators/HttpServer.ts +11 -6
  38. package/types/generators/Information.ts +2 -1
  39. package/types/generators/Intent.ts +3 -2
  40. package/types/generators/Iterator.ts +5 -4
  41. package/types/generators/Keyboard.ts +4 -3
  42. package/types/generators/LlmAnthropicCompat.ts +11 -4
  43. package/types/generators/LlmAppleBuiltin.ts +8 -3
  44. package/types/generators/LlmGgml.ts +12 -5
  45. package/types/generators/LlmMediaTekNeuroPilot.ts +11 -4
  46. package/types/generators/LlmMlx.ts +11 -4
  47. package/types/generators/LlmOnnx.ts +11 -4
  48. package/types/generators/LlmOpenAiCompat.ts +11 -4
  49. package/types/generators/LlmQualcommAiEngine.ts +9 -4
  50. package/types/generators/Mcp.ts +40 -17
  51. package/types/generators/McpServer.ts +17 -8
  52. package/types/generators/MediaFlow.ts +8 -3
  53. package/types/generators/MqttBroker.ts +16 -7
  54. package/types/generators/MqttClient.ts +5 -4
  55. package/types/generators/Question.ts +2 -1
  56. package/types/generators/RealtimeTranscription.ts +22 -7
  57. package/types/generators/RerankerGgml.ts +5 -2
  58. package/types/generators/SerialPort.ts +7 -2
  59. package/types/generators/SoundPlayer.ts +4 -1
  60. package/types/generators/SoundRecorder.ts +3 -2
  61. package/types/generators/SpeechToTextGgml.ts +8 -3
  62. package/types/generators/SpeechToTextOnnx.ts +5 -2
  63. package/types/generators/SpeechToTextPlatform.ts +7 -2
  64. package/types/generators/SqLite.ts +5 -2
  65. package/types/generators/Step.ts +2 -1
  66. package/types/generators/SttAppleBuiltin.ts +5 -2
  67. package/types/generators/Tcp.ts +5 -4
  68. package/types/generators/TcpServer.ts +10 -7
  69. package/types/generators/TextToSpeechAppleBuiltin.ts +5 -2
  70. package/types/generators/TextToSpeechGgml.ts +5 -2
  71. package/types/generators/TextToSpeechOnnx.ts +5 -2
  72. package/types/generators/TextToSpeechOpenAiLike.ts +5 -2
  73. package/types/generators/ThermalPrinter.ts +2 -1
  74. package/types/generators/Tick.ts +3 -2
  75. package/types/generators/Udp.ts +3 -2
  76. package/types/generators/VadGgml.ts +8 -3
  77. package/types/generators/VadOnnx.ts +6 -3
  78. package/types/generators/VadTraditional.ts +8 -3
  79. package/types/generators/VectorStore.ts +4 -3
  80. package/types/generators/Watchdog.ts +3 -2
  81. package/types/generators/WebCrawler.ts +3 -2
  82. package/types/generators/WebRtc.ts +8 -3
  83. package/types/generators/WebSocket.ts +2 -1
  84. package/types/subspace.ts +1 -0
  85. package/utils/event-props.ts +833 -1059
@@ -20,6 +20,7 @@ import type {
20
20
  Action,
21
21
  EventProperty,
22
22
  } from '../common'
23
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
23
24
 
24
25
  /* Load the TTS model */
25
26
  export type GeneratorAppleTTSActionLoadModel = Action & {
@@ -80,9 +81,11 @@ Default property:
80
81
  }
81
82
  events?: {
82
83
  /* Event triggered when state change */
83
- onContextStateChange?: Array<EventAction>
84
+ onContextStateChange?: Array<
85
+ EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onContextStateChange']>
86
+ >
84
87
  /* Event triggered when error occurs */
85
- onError?: Array<EventAction>
88
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onError']>>
86
89
  }
87
90
  outlets?: {
88
91
  /* Context state */
@@ -25,6 +25,7 @@ import type {
25
25
  Action,
26
26
  EventProperty,
27
27
  } from '../common'
28
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
28
29
 
29
30
  /* Load the model */
30
31
  export type GeneratorGGMLTTSActionLoadModel = Action & {
@@ -169,9 +170,11 @@ Default property:
169
170
  }
170
171
  events?: {
171
172
  /* Event triggered when state change */
172
- onContextStateChange?: Array<EventAction>
173
+ onContextStateChange?: Array<
174
+ EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onContextStateChange']>
175
+ >
173
176
  /* Event triggered when error occurs */
174
- onError?: Array<EventAction>
177
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['GgmlTts']['onError']>>
175
178
  }
176
179
  outlets?: {
177
180
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Load the model */
19
20
  export type GeneratorTTSActionLoadModel = Action & {
@@ -137,9 +138,11 @@ Default property:
137
138
  }
138
139
  events?: {
139
140
  /* Event triggered when state change */
140
- onContextStateChange?: Array<EventAction>
141
+ onContextStateChange?: Array<
142
+ EventAction<string & keyof TemplateEventPropsMap['Tts']['onContextStateChange']>
143
+ >
141
144
  /* Event triggered when error occurs */
142
- onError?: Array<EventAction>
145
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tts']['onError']>>
143
146
  }
144
147
  outlets?: {
145
148
  /* Context state */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Generate audio */
18
19
  export type GeneratorOpenAiTTSActionGenerate = ActionWithParams & {
@@ -81,9 +82,11 @@ Default property:
81
82
  }
82
83
  events?: {
83
84
  /* Event triggered when state change */
84
- onContextStateChange?: Array<EventAction>
85
+ onContextStateChange?: Array<
86
+ EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onContextStateChange']>
87
+ >
85
88
  /* Event triggered when error occurs */
86
- onError?: Array<EventAction>
89
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiTts']['onError']>>
87
90
  }
88
91
  outlets?: {
89
92
  /* Context state */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Init thermal printer connection */
18
19
  export type GeneratorThermalPrinterActionInit = Action & {
@@ -153,7 +154,7 @@ Default property:
153
154
  }
154
155
  events?: {
155
156
  /* Event of connection error */
156
- onError?: Array<EventAction>
157
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['ThermalPrinter']['onError']>>
157
158
  }
158
159
  outlets?: {
159
160
  /* Is thermal printer initialized */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Start the tick */
18
19
  export type GeneratorTickAction_ = Action & {
@@ -47,9 +48,9 @@ Default property:
47
48
  }
48
49
  events?: {
49
50
  /* Event for each tick start */
50
- ticking?: Array<EventAction>
51
+ ticking?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['ticking']>>
51
52
  /* Event for tick completed */
52
- completed?: Array<EventAction>
53
+ completed?: Array<EventAction<string & keyof TemplateEventPropsMap['Tick']['completed']>>
53
54
  }
54
55
  outlets?: {
55
56
  /* Countdown step value */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Bind UDP port */
18
19
  export type GeneratorUDPActionBind = Action & {
@@ -75,11 +76,11 @@ Default property:
75
76
  /* Event of UDP port is binded */
76
77
  onReady?: Array<EventAction>
77
78
  /* Event of receive data */
78
- onData?: Array<EventAction>
79
+ onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onData']>>
79
80
  /* Event of socket closeed */
80
81
  onClose?: Array<EventAction>
81
82
  /* Event of socket error */
82
- onError?: Array<EventAction>
83
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Udp']['onError']>>
83
84
  }
84
85
  outlets?: {
85
86
  /* Local UDP binded port */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Load the model */
18
19
  export type GeneratorVadInferenceActionLoadModel = Action & {
@@ -168,11 +169,15 @@ Default property:
168
169
  }
169
170
  events?: {
170
171
  /* Event triggered when context state changes */
171
- onContextStateChange?: Array<EventAction>
172
+ onContextStateChange?: Array<
173
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onContextStateChange']>
174
+ >
172
175
  /* Event triggered when error occurs */
173
- onError?: Array<EventAction>
176
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VadInference']['onError']>>
174
177
  /* Event triggered when got detection result */
175
- onDetected?: Array<EventAction>
178
+ onDetected?: Array<
179
+ EventAction<string & keyof TemplateEventPropsMap['VadInference']['onDetected']>
180
+ >
176
181
  }
177
182
  outlets?: {
178
183
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Load the model */
19
20
  export type GeneratorVadInferenceOnnxActionLoadModel = Action & {
@@ -163,11 +164,13 @@ Default property:
163
164
  }
164
165
  events?: {
165
166
  /* Event triggered when context state changes */
166
- onContextStateChange?: Array<EventAction>
167
+ onContextStateChange?: Array<
168
+ EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onContextStateChange']>
169
+ >
167
170
  /* Event triggered when error occurs */
168
- onError?: Array<EventAction>
171
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onError']>>
169
172
  /* Event triggered when got detection result */
170
- onDetected?: Array<EventAction>
173
+ onDetected?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxVad']['onDetected']>>
171
174
  }
172
175
  outlets?: {
173
176
  /* Context state */
@@ -14,6 +14,7 @@ import type {
14
14
  Action,
15
15
  EventProperty,
16
16
  } from '../common'
17
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
17
18
 
18
19
  /* Detect speech in audio file */
19
20
  export type GeneratorVadInferenceTraditionalActionDetectFile = ActionWithParams & {
@@ -72,11 +73,15 @@ Default property:
72
73
  }
73
74
  events?: {
74
75
  /* Event triggered when context state changes */
75
- onContextStateChange?: Array<EventAction>
76
+ onContextStateChange?: Array<
77
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onContextStateChange']>
78
+ >
76
79
  /* Event triggered when detection result is available */
77
- onDetected?: Array<EventAction>
80
+ onDetected?: Array<
81
+ EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onDetected']>
82
+ >
78
83
  /* Event triggered when error occurs */
79
- onError?: Array<EventAction>
84
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TraditionalVad']['onError']>>
80
85
  }
81
86
  outlets?: {
82
87
  /* Context state */
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Vector database for semantic similarity search using file embeddings
3
+ * Vector database for semantic search. Supports GGML (on-device GGUF models) and OpenAI Compatible API (OpenAI/ollama/llama.cpp) as embedding sources
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Load the model (Only if source is ggml) */
18
19
  export type GeneratorVectorStoreActionModelLoad = Action & {
@@ -200,7 +201,7 @@ Default property:
200
201
  }
201
202
  events?: {
202
203
  /* Event triggered when error occurs */
203
- onError?: Array<EventAction>
204
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['VectorStore']['onError']>>
204
205
  }
205
206
  outlets?: {
206
207
  /* undefined */
@@ -233,7 +234,7 @@ Default property:
233
234
  }
234
235
  }
235
236
 
236
- /* Vector database for semantic similarity search using file embeddings */
237
+ /* Vector database for semantic search. Supports GGML (on-device GGUF models) and OpenAI Compatible API (OpenAI/ollama/llama.cpp) as embedding sources */
237
238
  export type GeneratorVectorStore = Generator &
238
239
  GeneratorVectorStoreDef & {
239
240
  templateKey: 'GENERATOR_VECTOR_STORE'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Reset watch */
18
19
  export type GeneratorWatchdogActionResetWatch = Action & {
@@ -55,9 +56,9 @@ Default property:
55
56
  }
56
57
  events?: {
57
58
  /* Event on specific sender id trigger event */
58
- onEvent?: Array<EventAction>
59
+ onEvent?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onEvent']>>
59
60
  /* Event on timeout */
60
- onTimeout?: Array<EventAction>
61
+ onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['Watchdog']['onTimeout']>>
61
62
  }
62
63
  outlets?: {
63
64
  /* The last event */
@@ -1,6 +1,6 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Web crawler to get specific value
3
+ * Extract web content via CSS selectors. Supports WebView method (iOS/Android, renders JS) and HTTP method (all platforms, direct request)
4
4
  */
5
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
6
  import type { Data, DataLink } from '../data'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Run Crawler request with defined properties */
18
19
  export type GeneratorWebCrawlerActionRunRequest = Action & {
@@ -79,7 +80,7 @@ Default property:
79
80
  }
80
81
  }
81
82
 
82
- /* 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) */
83
84
  export type GeneratorWebCrawler = Generator &
84
85
  GeneratorWebCrawlerDef & {
85
86
  templateKey: 'GENERATOR_WEB_CRAWLER'
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Initiate WebRTC request */
18
19
  export type GeneratorWebRTCActionInitiate = Action & {
@@ -105,19 +106,23 @@ Default property:
105
106
  }
106
107
  events?: {
107
108
  /* Event of signal update */
108
- onSignalUpdate?: Array<EventAction>
109
+ onSignalUpdate?: Array<
110
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onSignalUpdate']>
111
+ >
109
112
  /* Event of peer connected */
110
113
  onConnected?: Array<EventAction>
111
114
  /* Event of peer disconnected */
112
115
  onDisconnected?: Array<EventAction>
113
116
  /* Event of handshake error */
114
- onError?: Array<EventAction>
117
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onError']>>
115
118
  /* Event of data channel open */
116
119
  onChannelOpen?: Array<EventAction>
117
120
  /* Event of data channel close */
118
121
  onChannelClose?: Array<EventAction>
119
122
  /* Event of received message on data channel */
120
- onChannelMessage?: Array<EventAction>
123
+ onChannelMessage?: Array<
124
+ EventAction<string & keyof TemplateEventPropsMap['Webrtc']['onChannelMessage']>
125
+ >
121
126
  }
122
127
  outlets?: {
123
128
  /* Signal to create peer connection */
@@ -13,6 +13,7 @@ import type {
13
13
  Action,
14
14
  EventProperty,
15
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
16
17
 
17
18
  /* Connect */
18
19
  export type GeneratorWebSocketActionConnect = Action & {
@@ -108,7 +109,7 @@ Default property:
108
109
  /* Event for disconnect from server */
109
110
  onClose?: Array<EventAction>
110
111
  /* Event for receive message */
111
- onMessage?: Array<EventAction>
112
+ onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['WebSocket']['onMessage']>>
112
113
  /* Event for error occurred */
113
114
  onError?: Array<EventAction>
114
115
  }
package/types/subspace.ts CHANGED
@@ -23,6 +23,7 @@ export type Subspace = {
23
23
  module?: {
24
24
  id: string
25
25
  version: string
26
+ link?: boolean
26
27
  selectedRequirements?: Array<{
27
28
  subspace: SubspaceID
28
29
  id: string