@fugood/bricks-project 2.22.0-beta.9 → 2.22.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/action-name-map.ts +108 -17
  2. package/compile/index.ts +10 -1
  3. package/package.json +3 -4
  4. package/tools/postinstall.ts +16 -9
  5. package/types/animation.ts +2 -1
  6. package/types/brick-base.ts +79 -0
  7. package/types/bricks/3DViewer.ts +200 -0
  8. package/types/bricks/Camera.ts +195 -0
  9. package/types/bricks/Chart.ts +362 -0
  10. package/types/bricks/GenerativeMedia.ts +240 -0
  11. package/types/bricks/Icon.ts +93 -0
  12. package/types/bricks/Image.ts +104 -0
  13. package/types/bricks/Items.ts +461 -0
  14. package/types/bricks/Lottie.ts +159 -0
  15. package/types/bricks/QrCode.ts +112 -0
  16. package/types/bricks/Rect.ts +110 -0
  17. package/types/bricks/RichText.ts +123 -0
  18. package/types/bricks/Rive.ts +209 -0
  19. package/types/bricks/Slideshow.ts +155 -0
  20. package/types/bricks/Svg.ts +94 -0
  21. package/types/bricks/Text.ts +143 -0
  22. package/types/bricks/TextInput.ts +231 -0
  23. package/types/bricks/Video.ts +170 -0
  24. package/types/bricks/VideoStreaming.ts +107 -0
  25. package/types/bricks/WebRtcStream.ts +60 -0
  26. package/types/bricks/WebView.ts +157 -0
  27. package/types/bricks/index.ts +19 -0
  28. package/types/common.ts +8 -3
  29. package/types/data.ts +6 -0
  30. package/types/generators/AlarmClock.ts +102 -0
  31. package/types/generators/Assistant.ts +546 -0
  32. package/types/generators/BleCentral.ts +225 -0
  33. package/types/generators/BlePeripheral.ts +202 -0
  34. package/types/generators/CanvasMap.ts +57 -0
  35. package/types/generators/CastlesPay.ts +77 -0
  36. package/types/generators/DataBank.ts +123 -0
  37. package/types/generators/File.ts +351 -0
  38. package/types/generators/GraphQl.ts +124 -0
  39. package/types/generators/Http.ts +117 -0
  40. package/types/generators/HttpServer.ts +164 -0
  41. package/types/generators/Information.ts +97 -0
  42. package/types/generators/Intent.ts +107 -0
  43. package/types/generators/Iterator.ts +95 -0
  44. package/types/generators/Keyboard.ts +85 -0
  45. package/types/generators/LlmAnthropicCompat.ts +188 -0
  46. package/types/generators/LlmGgml.ts +719 -0
  47. package/types/generators/LlmOnnx.ts +184 -0
  48. package/types/generators/LlmOpenAiCompat.ts +206 -0
  49. package/types/generators/LlmQualcommAiEngine.ts +213 -0
  50. package/types/generators/Mcp.ts +294 -0
  51. package/types/generators/McpServer.ts +248 -0
  52. package/types/generators/MediaFlow.ts +142 -0
  53. package/types/generators/MqttBroker.ts +121 -0
  54. package/types/generators/MqttClient.ts +129 -0
  55. package/types/generators/Question.ts +395 -0
  56. package/types/generators/RealtimeTranscription.ts +180 -0
  57. package/types/generators/RerankerGgml.ts +153 -0
  58. package/types/generators/SerialPort.ts +141 -0
  59. package/types/generators/SoundPlayer.ts +86 -0
  60. package/types/generators/SoundRecorder.ts +113 -0
  61. package/types/generators/SpeechToTextGgml.ts +462 -0
  62. package/types/generators/SpeechToTextOnnx.ts +227 -0
  63. package/types/generators/SpeechToTextPlatform.ts +75 -0
  64. package/types/generators/SqLite.ts +118 -0
  65. package/types/generators/Step.ts +101 -0
  66. package/types/generators/Tcp.ts +120 -0
  67. package/types/generators/TcpServer.ts +137 -0
  68. package/types/generators/TextToSpeechGgml.ts +182 -0
  69. package/types/generators/TextToSpeechOnnx.ts +169 -0
  70. package/types/generators/TextToSpeechOpenAiLike.ts +113 -0
  71. package/types/generators/ThermalPrinter.ts +185 -0
  72. package/types/generators/Tick.ts +75 -0
  73. package/types/generators/Udp.ts +109 -0
  74. package/types/generators/VadGgml.ts +211 -0
  75. package/types/generators/VectorStore.ts +223 -0
  76. package/types/generators/Watchdog.ts +96 -0
  77. package/types/generators/WebCrawler.ts +97 -0
  78. package/types/generators/WebRtc.ts +165 -0
  79. package/types/generators/WebSocket.ts +142 -0
  80. package/types/generators/index.ts +50 -0
  81. package/types/system.ts +64 -0
  82. package/utils/data.ts +45 -0
  83. package/utils/event-props.ts +89 -13
  84. package/types/bricks.ts +0 -3168
  85. package/types/generators.ts +0 -7633
@@ -0,0 +1,96 @@
1
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
2
+ import type { Data, DataLink } from '../data'
3
+ import type {
4
+ Generator,
5
+ EventAction,
6
+ ActionWithDataParams,
7
+ ActionWithParams,
8
+ Action,
9
+ EventProperty,
10
+ } from '../common'
11
+
12
+ /* Reset watch */
13
+ export type GeneratorWatchdogActionResetWatch = Action & {
14
+ __actionName: 'GENERATOR_WATCHDOG_RESET_WATCH'
15
+ }
16
+
17
+ interface GeneratorWatchdogDef {
18
+ /*
19
+ Default property:
20
+ {
21
+ "listening": false,
22
+ "timeout": 30000
23
+ }
24
+ */
25
+ property?: {
26
+ /* Start listening event */
27
+ listening?: boolean | DataLink
28
+ /* If no other events are fired after the specified event is fired, it times out and fires the Watchdog event. */
29
+ timeout?: number | DataLink
30
+ /* Reset timeout timer on properties change */
31
+ resetTimeoutOnChange?: boolean | DataLink
32
+ /* Set what brick id (allow mutiple) to listen for press */
33
+ brickOnPress?: Array<string | DataLink> | DataLink
34
+ /* Set what brick id (allow mutiple) to listen for focus */
35
+ brickOnFocus?: Array<string | DataLink> | DataLink
36
+ /* Set what brick id (allow mutiple) to listen for blur */
37
+ brickOnBlur?: Array<string | DataLink> | DataLink
38
+ /* Set what canvas id (allow mutiple) to listen for enter */
39
+ canvasOnEnter?: Array<string | DataLink> | DataLink
40
+ /* Set what canvas id (allow mutiple) to listen for exit */
41
+ canvasOnExit?: Array<string | DataLink> | DataLink
42
+ /* Set what Data id (allow mutiple) to listen for change */
43
+ propertyBankOnChange?: Array<string | DataLink> | DataLink
44
+ /* Set what Data id (allow mutiple) to listen for update */
45
+ propertyBankOnUpdate?: Array<string | DataLink> | DataLink
46
+ /* Set what Data id (allow mutiple) to listen for hit */
47
+ propertyBankOnHit?: Array<string | DataLink> | DataLink
48
+ /* Set what Data id (allow mutiple) to listen for hit */
49
+ propertyBankOnNotHit?: Array<string | DataLink> | DataLink
50
+ }
51
+ events?: {
52
+ /* Event on specific sender id trigger event */
53
+ onEvent?: Array<EventAction>
54
+ /* Event on timeout */
55
+ onTimeout?: Array<EventAction>
56
+ }
57
+ outlets?: {
58
+ /* The last event */
59
+ lastEvent?: () => Data
60
+ /* The type fo last event */
61
+ lastEventType?: () => Data
62
+ /* The trigger type of last event */
63
+ lastEventTriggerType?: () => Data
64
+ /* The sender id of last event */
65
+ lastEventSenderId?: () => Data
66
+ /* Is timed out */
67
+ isTimedOut?: () => Data
68
+ }
69
+ }
70
+
71
+ /* Triger event with timeout by listen specified events */
72
+ export type GeneratorWatchdog = Generator &
73
+ GeneratorWatchdogDef & {
74
+ templateKey: 'GENERATOR_WATCHDOG'
75
+ switches: Array<
76
+ SwitchDef &
77
+ GeneratorWatchdogDef & {
78
+ conds?: Array<{
79
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
80
+ cond:
81
+ | SwitchCondInnerStateCurrentCanvas
82
+ | SwitchCondData
83
+ | {
84
+ __typename: 'SwitchCondInnerStateOutlet'
85
+ outlet:
86
+ | 'lastEvent'
87
+ | 'lastEventType'
88
+ | 'lastEventTriggerType'
89
+ | 'lastEventSenderId'
90
+ | 'isTimedOut'
91
+ value: any
92
+ }
93
+ }>
94
+ }
95
+ >
96
+ }
@@ -0,0 +1,97 @@
1
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
2
+ import type { Data, DataLink } from '../data'
3
+ import type {
4
+ Generator,
5
+ EventAction,
6
+ ActionWithDataParams,
7
+ ActionWithParams,
8
+ Action,
9
+ EventProperty,
10
+ } from '../common'
11
+
12
+ /* Run Crawler request with defined properties */
13
+ export type GeneratorWebCrawlerActionRunRequest = Action & {
14
+ __actionName: 'GENERATOR_WEB_CRAWLER_RUN_REQUEST'
15
+ }
16
+
17
+ interface GeneratorWebCrawlerDef {
18
+ /*
19
+ Default property:
20
+ {
21
+ "init": false,
22
+ "httpMethod": "GET",
23
+ "timeout": 10000,
24
+ "attributePath": "textContent"
25
+ }
26
+ */
27
+ property?: {
28
+ /* Start Crawler request on generator initialized */
29
+ init?: boolean | DataLink
30
+ /* URL of crawler request */
31
+ url?: string | DataLink
32
+ /* Timeout of crawler request
33
+
34
+ Platform not supported for `webview`: tvOS, Desktop, Web */
35
+ method?: 'webview' | 'http' | DataLink
36
+ /* HTTP method of crawler request (weview only supported GET, POST) */
37
+ httpMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | DataLink
38
+ /* Body of crawler request */
39
+ body?: string | DataLink
40
+ /* User-Agent of crawler request */
41
+ userAgent?: string | DataLink
42
+ /* Headers of crawler request */
43
+ headers?: {} | DataLink
44
+ /* Timeout of crawler request */
45
+ timeout?: number | DataLink
46
+ /* CSS Query Selector of selected element */
47
+ selector?: string | DataLink
48
+ /* Attribute path of HTMLElement */
49
+ attributePath?: string | DataLink
50
+ /* Multiple selectors and attribute paths. */
51
+ selectorList?:
52
+ | Array<
53
+ | DataLink
54
+ | {
55
+ selector?: string | DataLink
56
+ attributePath?: string | DataLink
57
+ }
58
+ >
59
+ | DataLink
60
+ }
61
+ events?: {
62
+ /* Event of crawling start */
63
+ onStart?: Array<EventAction>
64
+ /* Event of crawling end */
65
+ onEnd?: Array<EventAction>
66
+ }
67
+ outlets?: {
68
+ /* Response for CRAWLER request (selector) */
69
+ response?: () => Data
70
+ /* Responses for CRAWLER request (selectorList) */
71
+ responseList?: () => Data
72
+ /* The error response of CRAWLER request, it will save to property bank */
73
+ error?: () => Data
74
+ }
75
+ }
76
+
77
+ /* Web crawler to get specific value */
78
+ export type GeneratorWebCrawler = Generator &
79
+ GeneratorWebCrawlerDef & {
80
+ templateKey: 'GENERATOR_WEB_CRAWLER'
81
+ switches: Array<
82
+ SwitchDef &
83
+ GeneratorWebCrawlerDef & {
84
+ conds?: Array<{
85
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
86
+ cond:
87
+ | SwitchCondInnerStateCurrentCanvas
88
+ | SwitchCondData
89
+ | {
90
+ __typename: 'SwitchCondInnerStateOutlet'
91
+ outlet: 'response' | 'responseList' | 'error'
92
+ value: any
93
+ }
94
+ }>
95
+ }
96
+ >
97
+ }
@@ -0,0 +1,165 @@
1
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
2
+ import type { Data, DataLink } from '../data'
3
+ import type {
4
+ Generator,
5
+ EventAction,
6
+ ActionWithDataParams,
7
+ ActionWithParams,
8
+ Action,
9
+ EventProperty,
10
+ } from '../common'
11
+
12
+ /* Initiate WebRTC request */
13
+ export type GeneratorWebRTCActionInitiate = Action & {
14
+ __actionName: 'GENERATOR_WEBRTC_INITIATE'
15
+ }
16
+
17
+ /* Process input signal */
18
+ export type GeneratorWebRTCActionProcessInputSignal = ActionWithParams & {
19
+ __actionName: 'GENERATOR_WEBRTC_PROCESS_INPUT_SIGNAL'
20
+ params?: Array<{
21
+ input: 'inputSignal'
22
+ value?: any | EventProperty
23
+ mapping?: string
24
+ }>
25
+ }
26
+
27
+ /* Close WebRTC */
28
+ export type GeneratorWebRTCActionClose = Action & {
29
+ __actionName: 'GENERATOR_WEBRTC_CLOSE'
30
+ }
31
+
32
+ /* Send message in data channel */
33
+ export type GeneratorWebRTCActionChannelSend = ActionWithParams & {
34
+ __actionName: 'GENERATOR_WEBRTC_CHANNEL_SEND'
35
+ params?: Array<{
36
+ input: 'textMessage'
37
+ value?: string | DataLink | EventProperty
38
+ mapping?: string
39
+ }>
40
+ }
41
+
42
+ interface GeneratorWebRTCDef {
43
+ /*
44
+ Default property:
45
+ {
46
+ "enableAudio": true,
47
+ "enableVideo": true,
48
+ "videoFacing": "user",
49
+ "videoFrameRate": 30,
50
+ "videoHeight": 720,
51
+ "videoWidth": 1080,
52
+ "signalType": "json"
53
+ }
54
+ */
55
+ property?: {
56
+ /* Caller ID */
57
+ callerId?: string | DataLink
58
+ /* Calee ID, to ilter caller signal */
59
+ calleeId?: string | DataLink
60
+ /* Target local WebRTC stream preview brick ID */
61
+ localVideoTarget?: string | DataLink
62
+ /* Target remote WebRTC stream brick ID */
63
+ remoteVideoTarget?: string | DataLink
64
+ /* ICE Server list
65
+ Default use Google public STUN servers if not setted. */
66
+ iceServers?:
67
+ | Array<
68
+ | DataLink
69
+ | {
70
+ urls?: string | DataLink
71
+ username?: string | DataLink
72
+ credential?: string | DataLink
73
+ }
74
+ >
75
+ | DataLink
76
+ /* Enable capture device microphone */
77
+ enableAudio?: boolean | DataLink
78
+ /* Enable capture device camera */
79
+ enableVideo?: boolean | DataLink
80
+ /* Camera facing */
81
+ videoFacing?: 'user' | 'environment' | DataLink
82
+ /* Camera frame rate */
83
+ videoFrameRate?: number | DataLink
84
+ /* Output video height */
85
+ videoHeight?: number | DataLink
86
+ /* Output video width */
87
+ videoWidth?: number | DataLink
88
+ /* Label of data channel */
89
+ dataChannelLabel?: string | DataLink
90
+ /* Input signal for create peer connection
91
+ Signal Types:
92
+ `initiate`: Initiate a WebRTC call
93
+ `offer`: WebRTC SDP offer
94
+ `answer`: WebRTC SDP answer
95
+ `candidate`: WebRTC ICE candidate
96
+ `close`: Close WebRTC peer connection */
97
+ inputSignal?: any
98
+ /* Signal content type */
99
+ signalType?: 'json' | 'object' | DataLink
100
+ }
101
+ events?: {
102
+ /* Event of signal update */
103
+ onSignalUpdate?: Array<EventAction>
104
+ /* Event of peer connected */
105
+ onConnected?: Array<EventAction>
106
+ /* Event of peer disconnected */
107
+ onDisconnected?: Array<EventAction>
108
+ /* Event of handshake error */
109
+ onError?: Array<EventAction>
110
+ /* Event of data channel open */
111
+ onChannelOpen?: Array<EventAction>
112
+ /* Event of data channel close */
113
+ onChannelClose?: Array<EventAction>
114
+ /* Event of received message on data channel */
115
+ onChannelMessage?: Array<EventAction>
116
+ }
117
+ outlets?: {
118
+ /* Signal to create peer connection */
119
+ signal?: () => Data
120
+ /* Local SDP offer */
121
+ sdpOffer?: () => Data
122
+ /* Local SDP answer */
123
+ sdpAnswer?: () => Data
124
+ /* Peer connection state */
125
+ connectionState?: () => Data
126
+ /* ICE connection state */
127
+ iceConnectionState?: () => Data
128
+ /* Signaling state */
129
+ signalingState?: () => Data
130
+ /* Last message from data channel */
131
+ lastChannelMessage?: () => Data
132
+ /* Error message */
133
+ errorMessage?: () => Data
134
+ }
135
+ }
136
+
137
+ /* WebRTC */
138
+ export type GeneratorWebRTC = Generator &
139
+ GeneratorWebRTCDef & {
140
+ templateKey: 'GENERATOR_WEBRTC'
141
+ switches: Array<
142
+ SwitchDef &
143
+ GeneratorWebRTCDef & {
144
+ conds?: Array<{
145
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
146
+ cond:
147
+ | SwitchCondInnerStateCurrentCanvas
148
+ | SwitchCondData
149
+ | {
150
+ __typename: 'SwitchCondInnerStateOutlet'
151
+ outlet:
152
+ | 'signal'
153
+ | 'sdpOffer'
154
+ | 'sdpAnswer'
155
+ | 'connectionState'
156
+ | 'iceConnectionState'
157
+ | 'signalingState'
158
+ | 'lastChannelMessage'
159
+ | 'errorMessage'
160
+ value: any
161
+ }
162
+ }>
163
+ }
164
+ >
165
+ }
@@ -0,0 +1,142 @@
1
+ import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
2
+ import type { Data, DataLink } from '../data'
3
+ import type {
4
+ Generator,
5
+ EventAction,
6
+ ActionWithDataParams,
7
+ ActionWithParams,
8
+ Action,
9
+ EventProperty,
10
+ } from '../common'
11
+
12
+ /* Connect */
13
+ export type GeneratorWebSocketActionConnect = Action & {
14
+ __actionName: 'GENERATOR_WEB_SOCKET_CONNECT'
15
+ }
16
+
17
+ /* Disconnect */
18
+ export type GeneratorWebSocketActionDisconnect = Action & {
19
+ __actionName: 'GENERATOR_WEB_SOCKET_DISCONNECT'
20
+ }
21
+
22
+ /* Emit event (Acknowledgement: It's callback, the channel of Socket.IO server can used it as last argument) */
23
+ export type GeneratorWebSocketActionEmit = ActionWithParams & {
24
+ __actionName: 'GENERATOR_WEB_SOCKET_EMIT'
25
+ params?: Array<
26
+ | {
27
+ input: 'eventName'
28
+ value?: string | DataLink | EventProperty
29
+ mapping?: string
30
+ }
31
+ | {
32
+ input: 'arguments'
33
+ value?: Array<any> | DataLink | EventProperty
34
+ mapping?: string
35
+ }
36
+ | {
37
+ input: 'acknowledgementType'
38
+ value?: 'text' | 'json' | DataLink | EventProperty
39
+ mapping?: string
40
+ }
41
+ | {
42
+ input: 'withAcknowledgement'
43
+ value?: boolean | DataLink | EventProperty
44
+ mapping?: string
45
+ }
46
+ >
47
+ }
48
+
49
+ /* Emit `message` */
50
+ export type GeneratorWebSocketActionSend = ActionWithParams & {
51
+ __actionName: 'GENERATOR_WEB_SOCKET_SEND'
52
+ params?: Array<{
53
+ input: 'value'
54
+ value?: string | DataLink | EventProperty
55
+ mapping?: string
56
+ }>
57
+ }
58
+
59
+ interface GeneratorWebSocketDef {
60
+ /*
61
+ Default property:
62
+ {}
63
+ */
64
+ property?: {
65
+ /* Try to connect on generator initialized */
66
+ init?: boolean | DataLink
67
+ /* Endpoint URL (support namespace) */
68
+ url?: string | DataLink
69
+ /* Name of the path that is captured on the server side */
70
+ path?: string | DataLink
71
+ /* URL query parameters */
72
+ query?: {} | DataLink
73
+ /* Whether to reconnect automatically */
74
+ reconnection?: boolean | DataLink
75
+ /* Number of reconnection attempts before giving up */
76
+ attemptTimes?: number | DataLink
77
+ /* How long to initially wait before attempting a new reconnection (1000). Affected by +/- randomizationFactor, for example the default initial delay will be between 500 to 1500ms. */
78
+ delayBase?: number | DataLink
79
+ /* Maximum amount of time to wait between reconnections (5000). Each attempt increases the reconnection delay by 2x along with a randomization as above */
80
+ delayMax?: number | DataLink
81
+ /* Randomization factor 0 <= deplayRandom <= 1 */
82
+ delayRandom?: number | DataLink
83
+ /* Message type, if type is json it's will auto transform to object */
84
+ messageType?: 'json' | 'text' | DataLink
85
+ /* Use Socket.IO as transport channel */
86
+ socketIoEnable?: boolean | DataLink
87
+ /* Socket.IO Version */
88
+ socketIoVersion?: 'latest' | 'v4' | 'v2' | DataLink
89
+ /* Whether to reuse an existing connection */
90
+ socketIoForceNew?: boolean | DataLink
91
+ /* Connection timeout before a connect_error and connect_timeout events are emitted */
92
+ socketIoTimeout?: number | DataLink
93
+ /* Event name to be subscribe */
94
+ socketIoEventName?: string | DataLink
95
+ /* Additional query parameters that are sent when connecting a namespace (then found in socket.handshake.query object on the server-side) */
96
+ socketIoQuery?: {} | DataLink
97
+ /* Protocols to be used in the WebSocket connection */
98
+ wsProtocols?: Array<string | DataLink> | DataLink | string | DataLink | DataLink
99
+ }
100
+ events?: {
101
+ /* Event for connected to server */
102
+ onOpen?: Array<EventAction>
103
+ /* Event for disconnect from server */
104
+ onClose?: Array<EventAction>
105
+ /* Event for receive message */
106
+ onMessage?: Array<EventAction>
107
+ /* Event for error occurred */
108
+ onError?: Array<EventAction>
109
+ }
110
+ outlets?: {
111
+ /* Show socket.io connected or not */
112
+ readyState?: () => Data
113
+ /* Results of each countdown change, it will save to Data */
114
+ message?: () => Data
115
+ /* When Socket.IO mode server can response acknowledgemnt with data to client */
116
+ acknowledgeData?: () => Data
117
+ /* Error message */
118
+ errorMessage?: () => Data
119
+ }
120
+ }
121
+
122
+ /* WebSocket or Socket.IO Generator */
123
+ export type GeneratorWebSocket = Generator &
124
+ GeneratorWebSocketDef & {
125
+ templateKey: 'GENERATOR_WEB_SOCKET'
126
+ switches: Array<
127
+ SwitchDef &
128
+ GeneratorWebSocketDef & {
129
+ conds?: Array<{
130
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
131
+ cond:
132
+ | SwitchCondInnerStateCurrentCanvas
133
+ | SwitchCondData
134
+ | {
135
+ __typename: 'SwitchCondInnerStateOutlet'
136
+ outlet: 'readyState' | 'message' | 'acknowledgeData' | 'errorMessage'
137
+ value: any
138
+ }
139
+ }>
140
+ }
141
+ >
142
+ }
@@ -0,0 +1,50 @@
1
+ export * from './Tick'
2
+ export * from './AlarmClock'
3
+ export * from './File'
4
+ export * from './MediaFlow'
5
+ export * from './DataBank'
6
+ export * from './GraphQl'
7
+ export * from './Http'
8
+ export * from './SoundPlayer'
9
+ export * from './Keyboard'
10
+ export * from './WebSocket'
11
+ export * from './CanvasMap'
12
+ export * from './Step'
13
+ export * from './Iterator'
14
+ export * from './Watchdog'
15
+ export * from './MqttClient'
16
+ export * from './MqttBroker'
17
+ export * from './BleCentral'
18
+ export * from './SerialPort'
19
+ export * from './Tcp'
20
+ export * from './TcpServer'
21
+ export * from './Udp'
22
+ export * from './HttpServer'
23
+ export * from './WebRtc'
24
+ export * from './WebCrawler'
25
+ export * from './SoundRecorder'
26
+ export * from './BlePeripheral'
27
+ export * from './Question'
28
+ export * from './Information'
29
+ export * from './Intent'
30
+ export * from './CastlesPay'
31
+ export * from './SpeechToTextPlatform'
32
+ export * from './ThermalPrinter'
33
+ export * from './SqLite'
34
+ export * from './McpServer'
35
+ export * from './Mcp'
36
+ export * from './TextToSpeechOnnx'
37
+ export * from './LlmOnnx'
38
+ export * from './SpeechToTextOnnx'
39
+ export * from './SpeechToTextGgml'
40
+ export * from './VadGgml'
41
+ export * from './RealtimeTranscription'
42
+ export * from './LlmGgml'
43
+ export * from './TextToSpeechGgml'
44
+ export * from './RerankerGgml'
45
+ export * from './LlmQualcommAiEngine'
46
+ export * from './LlmOpenAiCompat'
47
+ export * from './TextToSpeechOpenAiLike'
48
+ export * from './LlmAnthropicCompat'
49
+ export * from './Assistant'
50
+ export * from './VectorStore'
package/types/system.ts CHANGED
@@ -467,6 +467,16 @@ export type SystemActionChannelPublish = ActionWithParams & {
467
467
  >
468
468
  }
469
469
 
470
+ /* Delay for a certain time between actions */
471
+ export type SystemActionDelay = ActionWithParams & {
472
+ __actionName: 'DELAY'
473
+ params?: Array<{
474
+ input: 'time'
475
+ value?: number | DataLink | EventProperty
476
+ mapping?: string
477
+ }>
478
+ }
479
+
470
480
  /* [Internal] Use a shared application */
471
481
  export type SystemActionUseShareApplication = ActionWithParams & {
472
482
  __actionName: 'USE_SHARE_APPLICATION'
@@ -599,3 +609,57 @@ export type SystemActionThrowException = ActionWithParams & {
599
609
  export type SystemActionDismissKeyboard = Action & {
600
610
  __actionName: 'DISMISS_KEYBOARD'
601
611
  }
612
+
613
+ /* Trigger application AI filter */
614
+ export type SystemActionTriggerApplicationFilter = ActionWithParams & {
615
+ __actionName: 'TRIGGER_APPLICATION_FILTER'
616
+ params?: Array<
617
+ | {
618
+ input: 'name'
619
+ value?: string | DataLink | EventProperty
620
+ mapping?: string
621
+ }
622
+ | {
623
+ input: 'variables'
624
+ value?: any | EventProperty
625
+ mapping?: string
626
+ }
627
+ | {
628
+ input: 'result'
629
+ value?: string | DataLink | (() => Data) | EventProperty
630
+ mapping?: string
631
+ }
632
+ | {
633
+ input: 'error'
634
+ value?: string | DataLink | (() => Data) | EventProperty
635
+ mapping?: string
636
+ }
637
+ >
638
+ }
639
+
640
+ /* Stop running application AI filter */
641
+ export type SystemActionStopApplicationFilter = Action & {
642
+ __actionName: 'STOP_APPLICATION_FILTER'
643
+ }
644
+
645
+ /* Save update snapshot (from Application Filter or DevTools MCP Server) to media system */
646
+ export type SystemActionSaveUpdateSnapshot = ActionWithParams & {
647
+ __actionName: 'SAVE_UPDATE_SNAPSHOT'
648
+ params?: Array<
649
+ | {
650
+ input: 'snapshotFileIndentifier'
651
+ value?: string | DataLink | EventProperty
652
+ mapping?: string
653
+ }
654
+ | {
655
+ input: 'snapshotSaveResult'
656
+ value?: string | DataLink | (() => Data) | EventProperty
657
+ mapping?: string
658
+ }
659
+ | {
660
+ input: 'snapshotErrorResult'
661
+ value?: string | DataLink | (() => Data) | EventProperty
662
+ mapping?: string
663
+ }
664
+ >
665
+ }
package/utils/data.ts CHANGED
@@ -64,6 +64,7 @@ type SystemDataName =
64
64
  | 'workspaceName'
65
65
  | 'applicationInfo'
66
66
  | 'applicationName'
67
+ | 'deviceID'
67
68
  | 'macAddress'
68
69
  | 'bindDeviceCode'
69
70
  | 'bindDeviceCodeExpire'
@@ -74,6 +75,10 @@ type SystemDataName =
74
75
  | 'env'
75
76
  | 'isViewDebugModeEnabled'
76
77
  | 'language'
78
+ | 'aiFilters'
79
+ | 'systemOpenAIApiKey'
80
+ | 'systemAnthropicApiKey'
81
+ | 'systemGeminiApiKey'
77
82
 
78
83
  type SystemDataInfo = {
79
84
  name: SystemDataName
@@ -343,6 +348,14 @@ export const systemDataList: Array<SystemDataInfo> = [
343
348
  type: 'string',
344
349
  value: '',
345
350
  },
351
+ {
352
+ name: 'deviceID',
353
+ id: 'PROPERTY_BANK_DATA_NODE_8b5c2d9e-f0a1-4b2c-8d3e-4f5a6b7c8d9e',
354
+ title: 'SYSTEM: Device ID',
355
+ description: 'Device ID of current device',
356
+ type: 'string',
357
+ value: 'unknown',
358
+ },
346
359
  {
347
360
  name: 'macAddress',
348
361
  id: 'PROPERTY_BANK_DATA_NODE_f01fcc78-0723-11ed-ac00-877339de1030',
@@ -423,6 +436,38 @@ export const systemDataList: Array<SystemDataInfo> = [
423
436
  type: 'string',
424
437
  value: '',
425
438
  },
439
+ {
440
+ name: 'aiFilters',
441
+ id: 'PROPERTY_BANK_DATA_NODE_3ffc1e98-8f65-4cc8-a949-3da8d2092ccb',
442
+ title: 'SYSTEM: AI Filters',
443
+ description: 'AI filters configuration from the application',
444
+ type: 'array',
445
+ value: [],
446
+ },
447
+ {
448
+ name: 'systemOpenAIApiKey',
449
+ id: 'PROPERTY_BANK_DATA_NODE_a1b2c3d4-5e6f-7890-abcd-ef1234567890',
450
+ title: 'SYSTEM: OpenAI API Key',
451
+ description: 'System OpenAI API Key (only available if application enabled)',
452
+ type: 'string',
453
+ value: '',
454
+ },
455
+ {
456
+ name: 'systemAnthropicApiKey',
457
+ id: 'PROPERTY_BANK_DATA_NODE_b2c3d4e5-6f78-9012-bcde-f23456789012',
458
+ title: 'SYSTEM: Anthropic API Key',
459
+ description: 'System Anthropic API Key (only available if application enabled)',
460
+ type: 'string',
461
+ value: '',
462
+ },
463
+ {
464
+ name: 'systemGeminiApiKey',
465
+ id: 'PROPERTY_BANK_DATA_NODE_c3d4e5f6-7890-1234-cdef-345678901234',
466
+ title: 'SYSTEM: Gemini API Key',
467
+ description: 'System Gemini API Key (only available if application enabled)',
468
+ type: 'string',
469
+ value: '',
470
+ },
426
471
  ]
427
472
 
428
473
  export const useSystemData = (name: SystemDataName): Data => {