@fugood/bricks-project 2.24.0-beta.36 → 2.24.0-beta.37
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 +14 -6
- package/package.json +2 -2
- package/types/bricks/Camera.ts +10 -5
- package/types/bricks/Chart.ts +5 -2
- package/types/bricks/GenerativeMedia.ts +20 -7
- package/types/bricks/Icon.ts +1 -0
- package/types/bricks/Image.ts +2 -1
- package/types/bricks/Items.ts +17 -6
- package/types/bricks/Lottie.ts +7 -2
- package/types/bricks/Maps.ts +8 -3
- package/types/bricks/QrCode.ts +1 -0
- package/types/bricks/Rect.ts +1 -0
- package/types/bricks/RichText.ts +1 -0
- package/types/bricks/Rive.ts +15 -8
- package/types/bricks/Slideshow.ts +12 -5
- package/types/bricks/Svg.ts +1 -0
- package/types/bricks/Text.ts +1 -0
- package/types/bricks/TextInput.ts +8 -5
- package/types/bricks/Video.ts +3 -2
- package/types/bricks/VideoStreaming.ts +1 -0
- package/types/bricks/WebRtcStream.ts +1 -0
- package/types/bricks/WebView.ts +4 -3
- package/types/common.ts +10 -8
- package/types/generators/AlarmClock.ts +7 -4
- package/types/generators/Assistant.ts +7 -4
- package/types/generators/BleCentral.ts +14 -5
- package/types/generators/BlePeripheral.ts +1 -0
- package/types/generators/CanvasMap.ts +2 -1
- package/types/generators/CastlesPay.ts +7 -2
- package/types/generators/DataBank.ts +8 -3
- package/types/generators/File.ts +41 -14
- package/types/generators/GraphQl.ts +4 -1
- package/types/generators/Http.ts +1 -0
- package/types/generators/HttpServer.ts +9 -4
- package/types/generators/Information.ts +2 -1
- package/types/generators/Intent.ts +3 -2
- package/types/generators/Iterator.ts +5 -4
- package/types/generators/Keyboard.ts +4 -3
- package/types/generators/LlmAnthropicCompat.ts +11 -4
- package/types/generators/LlmAppleBuiltin.ts +8 -3
- package/types/generators/LlmGgml.ts +12 -5
- package/types/generators/LlmMediaTekNeuroPilot.ts +11 -4
- package/types/generators/LlmMlx.ts +11 -4
- package/types/generators/LlmOnnx.ts +11 -4
- package/types/generators/LlmOpenAiCompat.ts +11 -4
- package/types/generators/LlmQualcommAiEngine.ts +9 -4
- package/types/generators/Mcp.ts +38 -15
- package/types/generators/McpServer.ts +15 -6
- package/types/generators/MediaFlow.ts +8 -3
- package/types/generators/MqttBroker.ts +14 -5
- package/types/generators/MqttClient.ts +3 -2
- package/types/generators/Question.ts +2 -1
- package/types/generators/RealtimeTranscription.ts +22 -7
- package/types/generators/RerankerGgml.ts +5 -2
- package/types/generators/SerialPort.ts +7 -2
- package/types/generators/SoundPlayer.ts +4 -1
- package/types/generators/SoundRecorder.ts +3 -2
- package/types/generators/SpeechToTextGgml.ts +8 -3
- package/types/generators/SpeechToTextOnnx.ts +5 -2
- package/types/generators/SpeechToTextPlatform.ts +7 -2
- package/types/generators/SqLite.ts +5 -2
- package/types/generators/Step.ts +2 -1
- package/types/generators/SttAppleBuiltin.ts +5 -2
- package/types/generators/Tcp.ts +3 -2
- package/types/generators/TcpServer.ts +8 -5
- package/types/generators/TextToSpeechAppleBuiltin.ts +5 -2
- package/types/generators/TextToSpeechGgml.ts +5 -2
- package/types/generators/TextToSpeechOnnx.ts +5 -2
- package/types/generators/TextToSpeechOpenAiLike.ts +5 -2
- package/types/generators/ThermalPrinter.ts +2 -1
- package/types/generators/Tick.ts +3 -2
- package/types/generators/Udp.ts +3 -2
- package/types/generators/VadGgml.ts +8 -3
- package/types/generators/VadOnnx.ts +6 -3
- package/types/generators/VadTraditional.ts +8 -3
- package/types/generators/VectorStore.ts +2 -1
- package/types/generators/Watchdog.ts +3 -2
- package/types/generators/WebCrawler.ts +1 -0
- package/types/generators/WebRtc.ts +8 -3
- package/types/generators/WebSocket.ts +2 -1
- package/utils/event-props.ts +833 -1059
|
@@ -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 scan */
|
|
18
19
|
export type GeneratorBleCentralActionStartScan = Action & {
|
|
@@ -181,21 +182,29 @@ Default property:
|
|
|
181
182
|
/* Event for state change */
|
|
182
183
|
onStateChange?: Array<EventAction>
|
|
183
184
|
/* Event for error occurred */
|
|
184
|
-
onError?: Array<EventAction
|
|
185
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onError']>>
|
|
185
186
|
/* Event for start scan */
|
|
186
187
|
onStartScan?: Array<EventAction>
|
|
187
188
|
/* Event for stop scan */
|
|
188
189
|
onStopScan?: Array<EventAction>
|
|
189
190
|
/* Event for discover device */
|
|
190
|
-
onDiscoverDevice?: Array<
|
|
191
|
+
onDiscoverDevice?: Array<
|
|
192
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onDiscoverDevice']>
|
|
193
|
+
>
|
|
191
194
|
/* Event for device connected */
|
|
192
|
-
onConnectDevice?: Array<
|
|
195
|
+
onConnectDevice?: Array<
|
|
196
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onConnectDevice']>
|
|
197
|
+
>
|
|
193
198
|
/* Event for device disconnected */
|
|
194
199
|
onDisconnectDevice?: Array<EventAction>
|
|
195
200
|
/* Event for receive on read */
|
|
196
|
-
onReadReceive?: Array<
|
|
201
|
+
onReadReceive?: Array<
|
|
202
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onReadReceive']>
|
|
203
|
+
>
|
|
197
204
|
/* Event for receive on monitor */
|
|
198
|
-
onMonitorReceive?: Array<
|
|
205
|
+
onMonitorReceive?: Array<
|
|
206
|
+
EventAction<string & keyof TemplateEventPropsMap['BleCentral']['onMonitorReceive']>
|
|
207
|
+
>
|
|
199
208
|
}
|
|
200
209
|
outlets?: {
|
|
201
210
|
/* Is scaning */
|
|
@@ -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
|
interface GeneratorCanvasMapDef {
|
|
18
19
|
/*
|
|
@@ -38,7 +39,7 @@ Default property:
|
|
|
38
39
|
}
|
|
39
40
|
events?: {
|
|
40
41
|
/* Event triggered when a rule matches and canvas navigation occurs */
|
|
41
|
-
onNavigate?: Array<EventAction
|
|
42
|
+
onNavigate?: Array<EventAction<string & keyof TemplateEventPropsMap['CanvasMap']['onNavigate']>>
|
|
42
43
|
}
|
|
43
44
|
outlets?: {
|
|
44
45
|
/* Last matched trigger rule that caused canvas navigation */
|
|
@@ -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
|
/* Sale */
|
|
18
19
|
export type GeneratorCastlesPayActionSale = ActionWithParams & {
|
|
@@ -47,9 +48,13 @@ Default property:
|
|
|
47
48
|
property?: {}
|
|
48
49
|
events?: {
|
|
49
50
|
/* Action Success */
|
|
50
|
-
onActionSuccess?: Array<
|
|
51
|
+
onActionSuccess?: Array<
|
|
52
|
+
EventAction<string & keyof TemplateEventPropsMap['CastlesPay']['onActionSuccess']>
|
|
53
|
+
>
|
|
51
54
|
/* Action Error */
|
|
52
|
-
onActionError?: Array<
|
|
55
|
+
onActionError?: Array<
|
|
56
|
+
EventAction<string & keyof TemplateEventPropsMap['CastlesPay']['onActionError']>
|
|
57
|
+
>
|
|
53
58
|
}
|
|
54
59
|
outlets?: {
|
|
55
60
|
/* Last Transaction Result */
|
|
@@ -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 Data Bank fetch */
|
|
18
19
|
export type GeneratorDataBankActionFetch = Action & {
|
|
@@ -85,17 +86,21 @@ Default property:
|
|
|
85
86
|
}
|
|
86
87
|
events?: {
|
|
87
88
|
/* Event of Data Bank fetch response */
|
|
88
|
-
onFetchResponse?: Array<
|
|
89
|
+
onFetchResponse?: Array<
|
|
90
|
+
EventAction<string & keyof TemplateEventPropsMap['DataBank']['onFetchResponse']>
|
|
91
|
+
>
|
|
89
92
|
/* Event of Data Bank change from subscription */
|
|
90
93
|
onChange?: Array<EventAction>
|
|
91
94
|
/* Event of Data Bank fetch error */
|
|
92
95
|
onFetchError?: Array<EventAction>
|
|
93
96
|
/* Event of error */
|
|
94
|
-
onError?: Array<EventAction
|
|
97
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['DataBank']['onError']>>
|
|
95
98
|
/* Event of subscription on connection */
|
|
96
99
|
subscribeDataOnConnect?: Array<EventAction>
|
|
97
100
|
/* Server connections error of subscription */
|
|
98
|
-
subscribeDataOnConnectError?: Array<
|
|
101
|
+
subscribeDataOnConnectError?: Array<
|
|
102
|
+
EventAction<string & keyof TemplateEventPropsMap['DataBank']['subscribeDataOnConnectError']>
|
|
103
|
+
>
|
|
99
104
|
}
|
|
100
105
|
outlets?: {
|
|
101
106
|
/* Response for Data Bank fetch request, it will save to Data */
|
package/types/generators/File.ts
CHANGED
|
@@ -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
|
/* Read stats */
|
|
18
19
|
export type GeneratorFileActionReadStats = Action & {
|
|
@@ -262,33 +263,59 @@ Default property:
|
|
|
262
263
|
}
|
|
263
264
|
events?: {
|
|
264
265
|
/* On file handler init error */
|
|
265
|
-
initError?: Array<EventAction
|
|
266
|
+
initError?: Array<EventAction<string & keyof TemplateEventPropsMap['File']['initError']>>
|
|
266
267
|
/* On file status change */
|
|
267
|
-
onFileStatusChange?: Array<
|
|
268
|
+
onFileStatusChange?: Array<
|
|
269
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onFileStatusChange']>
|
|
270
|
+
>
|
|
268
271
|
/* On read stats error */
|
|
269
|
-
onReadStatsError?: Array<
|
|
272
|
+
onReadStatsError?: Array<
|
|
273
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onReadStatsError']>
|
|
274
|
+
>
|
|
270
275
|
/* On read content error */
|
|
271
|
-
onReadContentError?: Array<
|
|
276
|
+
onReadContentError?: Array<
|
|
277
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onReadContentError']>
|
|
278
|
+
>
|
|
272
279
|
/* On read content error */
|
|
273
|
-
onAppendContentError?: Array<
|
|
280
|
+
onAppendContentError?: Array<
|
|
281
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onAppendContentError']>
|
|
282
|
+
>
|
|
274
283
|
/* On write content error */
|
|
275
|
-
onWriteContentError?: Array<
|
|
284
|
+
onWriteContentError?: Array<
|
|
285
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onWriteContentError']>
|
|
286
|
+
>
|
|
276
287
|
/* On upload progress */
|
|
277
|
-
onUploadProgress?: Array<
|
|
288
|
+
onUploadProgress?: Array<
|
|
289
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadProgress']>
|
|
290
|
+
>
|
|
278
291
|
/* On upload error */
|
|
279
|
-
onUploadError?: Array<
|
|
292
|
+
onUploadError?: Array<
|
|
293
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadError']>
|
|
294
|
+
>
|
|
280
295
|
/* On upload complete */
|
|
281
|
-
onUploadComplete?: Array<
|
|
296
|
+
onUploadComplete?: Array<
|
|
297
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadComplete']>
|
|
298
|
+
>
|
|
282
299
|
/* On upload all done */
|
|
283
|
-
onUploadAllComplete?: Array<
|
|
300
|
+
onUploadAllComplete?: Array<
|
|
301
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onUploadAllComplete']>
|
|
302
|
+
>
|
|
284
303
|
/* On download progress */
|
|
285
|
-
onDownloadProgress?: Array<
|
|
304
|
+
onDownloadProgress?: Array<
|
|
305
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadProgress']>
|
|
306
|
+
>
|
|
286
307
|
/* On download error */
|
|
287
|
-
onDownloadError?: Array<
|
|
308
|
+
onDownloadError?: Array<
|
|
309
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadError']>
|
|
310
|
+
>
|
|
288
311
|
/* On download complete */
|
|
289
|
-
onDownloadComplete?: Array<
|
|
312
|
+
onDownloadComplete?: Array<
|
|
313
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadComplete']>
|
|
314
|
+
>
|
|
290
315
|
/* On download all done */
|
|
291
|
-
onDownloadAllComplete?: Array<
|
|
316
|
+
onDownloadAllComplete?: Array<
|
|
317
|
+
EventAction<string & keyof TemplateEventPropsMap['File']['onDownloadAllComplete']>
|
|
318
|
+
>
|
|
292
319
|
}
|
|
293
320
|
outlets?: {
|
|
294
321
|
/* File init error result will be stored in 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
|
/* Execute GraphQL request with defined properties */
|
|
18
19
|
export type GeneratorGraphQLActionRunQuery = ActionWithParams & {
|
|
@@ -96,7 +97,9 @@ Default property:
|
|
|
96
97
|
/* Event triggered when subscription connection is successful */
|
|
97
98
|
subscriptionOnConnection?: Array<EventAction>
|
|
98
99
|
/* Event triggered when subscription connection error occurs */
|
|
99
|
-
subscriptionOnConnectionError?: Array<
|
|
100
|
+
subscriptionOnConnectionError?: Array<
|
|
101
|
+
EventAction<string & keyof TemplateEventPropsMap['Graphql']['subscriptionOnConnectionError']>
|
|
102
|
+
>
|
|
100
103
|
}
|
|
101
104
|
outlets?: {
|
|
102
105
|
/* Response for GraphQL request, it will save to Data */
|
package/types/generators/Http.ts
CHANGED
|
@@ -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 HTTP server */
|
|
18
19
|
export type GeneratorHTTPServerActionStart = Action & {
|
|
@@ -126,15 +127,19 @@ Default property:
|
|
|
126
127
|
/* Event of HTTP server is ready */
|
|
127
128
|
onReady?: Array<EventAction>
|
|
128
129
|
/* Event of HTTP server accept the request */
|
|
129
|
-
onRequest?: Array<EventAction
|
|
130
|
+
onRequest?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onRequest']>>
|
|
130
131
|
/* Event of client close connection */
|
|
131
|
-
onClientClose?: Array<
|
|
132
|
+
onClientClose?: Array<
|
|
133
|
+
EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientClose']>
|
|
134
|
+
>
|
|
132
135
|
/* Event of client error */
|
|
133
|
-
onClientError?: Array<
|
|
136
|
+
onClientError?: Array<
|
|
137
|
+
EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onClientError']>
|
|
138
|
+
>
|
|
134
139
|
/* Event of server close */
|
|
135
140
|
onClose?: Array<EventAction>
|
|
136
141
|
/* Event of server error */
|
|
137
|
-
onError?: Array<EventAction
|
|
142
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['HttpServer']['onError']>>
|
|
138
143
|
}
|
|
139
144
|
outlets?: {
|
|
140
145
|
/* Server is listening */
|
|
@@ -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
|
/* Show information */
|
|
18
19
|
export type GeneratorInformationActionShow = ActionWithParams & {
|
|
@@ -71,7 +72,7 @@ Default property:
|
|
|
71
72
|
/* Trigger when user confirms the information */
|
|
72
73
|
onConfirm?: Array<EventAction>
|
|
73
74
|
/* Trigger when error occurs */
|
|
74
|
-
onError?: Array<EventAction
|
|
75
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Information']['onError']>>
|
|
75
76
|
}
|
|
76
77
|
outlets?: {
|
|
77
78
|
/* Error message */
|
|
@@ -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
|
/* Read stats */
|
|
18
19
|
export type GeneratorIntentActionSendIntent = ActionWithParams & {
|
|
@@ -128,9 +129,9 @@ Default property:
|
|
|
128
129
|
}
|
|
129
130
|
events?: {
|
|
130
131
|
/* On intent return a result trigger */
|
|
131
|
-
onResult?: Array<EventAction
|
|
132
|
+
onResult?: Array<EventAction<string & keyof TemplateEventPropsMap['Intent']['onResult']>>
|
|
132
133
|
/* On intent error trigger */
|
|
133
|
-
onError?: Array<EventAction
|
|
134
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Intent']['onError']>>
|
|
134
135
|
}
|
|
135
136
|
outlets?: {
|
|
136
137
|
/* Last intent result */
|
|
@@ -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
|
/* Proceed to next iteration */
|
|
18
19
|
export type GeneratorIteratorActionNext = Action & {
|
|
@@ -62,13 +63,13 @@ Default property:
|
|
|
62
63
|
}
|
|
63
64
|
events?: {
|
|
64
65
|
/* Event triggered on each iteration */
|
|
65
|
-
iterate?: Array<EventAction
|
|
66
|
+
iterate?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['iterate']>>
|
|
66
67
|
/* Event triggered on the first iteration of a round */
|
|
67
|
-
first?: Array<EventAction
|
|
68
|
+
first?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['first']>>
|
|
68
69
|
/* Event triggered on the last iteration of a round */
|
|
69
|
-
end?: Array<EventAction
|
|
70
|
+
end?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['end']>>
|
|
70
71
|
/* Event triggered when data type is invalid or unexpected */
|
|
71
|
-
error?: Array<EventAction
|
|
72
|
+
error?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['error']>>
|
|
72
73
|
}
|
|
73
74
|
outlets?: {
|
|
74
75
|
/* Elements that have been iterated (including current one) */
|
|
@@ -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
|
interface GeneratorKeyboardDef {
|
|
18
19
|
/*
|
|
@@ -46,11 +47,11 @@ Default property:
|
|
|
46
47
|
}
|
|
47
48
|
events?: {
|
|
48
49
|
/* Event on key press */
|
|
49
|
-
onDown?: Array<EventAction
|
|
50
|
+
onDown?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onDown']>>
|
|
50
51
|
/* Event on key up */
|
|
51
|
-
onUp?: Array<EventAction
|
|
52
|
+
onUp?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onUp']>>
|
|
52
53
|
/* Event on batch input complete */
|
|
53
|
-
onBatch?: Array<EventAction
|
|
54
|
+
onBatch?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onBatch']>>
|
|
54
55
|
}
|
|
55
56
|
outlets?: {
|
|
56
57
|
/* Last key code pressed */
|
|
@@ -19,6 +19,7 @@ import type {
|
|
|
19
19
|
Action,
|
|
20
20
|
EventProperty,
|
|
21
21
|
} from '../common'
|
|
22
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
22
23
|
|
|
23
24
|
/* Run text completion */
|
|
24
25
|
export type GeneratorAnthropicLLMActionCompletion = ActionWithParams & {
|
|
@@ -152,13 +153,19 @@ Default property:
|
|
|
152
153
|
}
|
|
153
154
|
events?: {
|
|
154
155
|
/* Error event */
|
|
155
|
-
onError?: Array<EventAction
|
|
156
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onError']>>
|
|
156
157
|
/* Completion event */
|
|
157
|
-
onCompletion?: Array<
|
|
158
|
+
onCompletion?: Array<
|
|
159
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onCompletion']>
|
|
160
|
+
>
|
|
158
161
|
/* Completion finished event */
|
|
159
|
-
onCompletionFinished?: Array<
|
|
162
|
+
onCompletionFinished?: Array<
|
|
163
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onCompletionFinished']>
|
|
164
|
+
>
|
|
160
165
|
/* Tool use event */
|
|
161
|
-
onToolUse?: Array<
|
|
166
|
+
onToolUse?: Array<
|
|
167
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onToolUse']>
|
|
168
|
+
>
|
|
162
169
|
}
|
|
163
170
|
outlets?: {
|
|
164
171
|
/* Evaluating outlet */
|
|
@@ -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 model */
|
|
25
26
|
export type GeneratorAppleLLMActionLoadModel = Action & {
|
|
@@ -100,13 +101,17 @@ Default property:
|
|
|
100
101
|
}
|
|
101
102
|
events?: {
|
|
102
103
|
/* Error event */
|
|
103
|
-
onError?: Array<EventAction
|
|
104
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onError']>>
|
|
104
105
|
/* Model loaded event */
|
|
105
106
|
onModelLoaded?: Array<EventAction>
|
|
106
107
|
/* Completion event */
|
|
107
|
-
onCompletion?: Array<
|
|
108
|
+
onCompletion?: Array<
|
|
109
|
+
EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletion']>
|
|
110
|
+
>
|
|
108
111
|
/* Completion finished event */
|
|
109
|
-
onCompletionFinished?: Array<
|
|
112
|
+
onCompletionFinished?: Array<
|
|
113
|
+
EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletionFinished']>
|
|
114
|
+
>
|
|
110
115
|
}
|
|
111
116
|
outlets?: {
|
|
112
117
|
/* Context state outlet */
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
Action,
|
|
24
24
|
EventProperty,
|
|
25
25
|
} from '../common'
|
|
26
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
26
27
|
|
|
27
28
|
/* Load the model */
|
|
28
29
|
export type GeneratorLLMActionLoadModel = Action & {
|
|
@@ -718,15 +719,21 @@ Default property:
|
|
|
718
719
|
}
|
|
719
720
|
events?: {
|
|
720
721
|
/* Event triggered when context state changes */
|
|
721
|
-
onContextStateChange?: Array<
|
|
722
|
+
onContextStateChange?: Array<
|
|
723
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onContextStateChange']>
|
|
724
|
+
>
|
|
722
725
|
/* Event triggered when error occurs */
|
|
723
|
-
onError?: Array<EventAction
|
|
726
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Llm']['onError']>>
|
|
724
727
|
/* Event triggered when completion */
|
|
725
|
-
onCompletion?: Array<EventAction
|
|
728
|
+
onCompletion?: Array<EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletion']>>
|
|
726
729
|
/* Event triggered when completion finished */
|
|
727
|
-
onCompletionFinished?: Array<
|
|
730
|
+
onCompletionFinished?: Array<
|
|
731
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletionFinished']>
|
|
732
|
+
>
|
|
728
733
|
/* Event triggered on get function call request */
|
|
729
|
-
onCompletionFunctionCall?: Array<
|
|
734
|
+
onCompletionFunctionCall?: Array<
|
|
735
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletionFunctionCall']>
|
|
736
|
+
>
|
|
730
737
|
}
|
|
731
738
|
outlets?: {
|
|
732
739
|
/* 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
|
/* Load or validate the NeuroPilot model context */
|
|
18
19
|
export type GeneratorNeuropilotLlmActionLoadModel = ActionWithParams & {
|
|
@@ -172,13 +173,19 @@ Default property:
|
|
|
172
173
|
}
|
|
173
174
|
events?: {
|
|
174
175
|
/* Event triggered when the NeuroPilot context state changes */
|
|
175
|
-
onContextStateChange?: Array<
|
|
176
|
+
onContextStateChange?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onContextStateChange']>
|
|
178
|
+
>
|
|
176
179
|
/* Event triggered when a completion token or partial result is emitted */
|
|
177
|
-
onCompletion?: Array<
|
|
180
|
+
onCompletion?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletion']>
|
|
182
|
+
>
|
|
178
183
|
/* Event triggered when generation finishes */
|
|
179
|
-
onCompletionFinished?: Array<
|
|
184
|
+
onCompletionFinished?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletionFinished']>
|
|
186
|
+
>
|
|
180
187
|
/* Event triggered when a NeuroPilot error occurs */
|
|
181
|
-
onError?: Array<EventAction
|
|
188
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onError']>>
|
|
182
189
|
}
|
|
183
190
|
outlets?: {
|
|
184
191
|
/* Current NeuroPilot context state */
|
|
@@ -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 model */
|
|
25
26
|
export type GeneratorMlxLLMActionLoadModel = ActionWithParams & {
|
|
@@ -163,13 +164,19 @@ Default property:
|
|
|
163
164
|
}
|
|
164
165
|
events?: {
|
|
165
166
|
/* Event triggered when context state changes */
|
|
166
|
-
onContextStateChange?: Array<
|
|
167
|
+
onContextStateChange?: Array<
|
|
168
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onContextStateChange']>
|
|
169
|
+
>
|
|
167
170
|
/* Error event */
|
|
168
|
-
onError?: Array<EventAction
|
|
171
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onError']>>
|
|
169
172
|
/* Completion streaming event (emitted for each token) */
|
|
170
|
-
onCompletion?: Array<
|
|
173
|
+
onCompletion?: Array<
|
|
174
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletion']>
|
|
175
|
+
>
|
|
171
176
|
/* Completion finished event */
|
|
172
|
-
onCompletionFinished?: Array<
|
|
177
|
+
onCompletionFinished?: Array<
|
|
178
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletionFinished']>
|
|
179
|
+
>
|
|
173
180
|
}
|
|
174
181
|
outlets?: {
|
|
175
182
|
/* 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 GeneratorOnnxLLMActionLoadModel = Action & {
|
|
@@ -153,13 +154,19 @@ Default property:
|
|
|
153
154
|
}
|
|
154
155
|
events?: {
|
|
155
156
|
/* Event triggered when state change */
|
|
156
|
-
onContextStateChange?: Array<
|
|
157
|
+
onContextStateChange?: Array<
|
|
158
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onContextStateChange']>
|
|
159
|
+
>
|
|
157
160
|
/* Event triggered on get function call request */
|
|
158
|
-
onFunctionCall?: Array<
|
|
161
|
+
onFunctionCall?: Array<
|
|
162
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onFunctionCall']>
|
|
163
|
+
>
|
|
159
164
|
/* Event triggered on completion finished */
|
|
160
|
-
onCompletionFinished?: Array<
|
|
165
|
+
onCompletionFinished?: Array<
|
|
166
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onCompletionFinished']>
|
|
167
|
+
>
|
|
161
168
|
/* Event triggered when error occurs */
|
|
162
|
-
onError?: Array<EventAction
|
|
169
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onError']>>
|
|
163
170
|
}
|
|
164
171
|
outlets?: {
|
|
165
172
|
/* Context state */
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
Action,
|
|
24
24
|
EventProperty,
|
|
25
25
|
} from '../common'
|
|
26
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
26
27
|
|
|
27
28
|
/* Run text completion */
|
|
28
29
|
export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
|
|
@@ -170,13 +171,19 @@ Default property:
|
|
|
170
171
|
}
|
|
171
172
|
events?: {
|
|
172
173
|
/* Error event */
|
|
173
|
-
onError?: Array<EventAction
|
|
174
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onError']>>
|
|
174
175
|
/* Completion event */
|
|
175
|
-
onCompletion?: Array<
|
|
176
|
+
onCompletion?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletion']>
|
|
178
|
+
>
|
|
176
179
|
/* Completion finished event */
|
|
177
|
-
onCompletionFinished?: Array<
|
|
180
|
+
onCompletionFinished?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFinished']>
|
|
182
|
+
>
|
|
178
183
|
/* Completion function call event */
|
|
179
|
-
onCompletionFunctionCall?: Array<
|
|
184
|
+
onCompletionFunctionCall?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFunctionCall']>
|
|
186
|
+
>
|
|
180
187
|
}
|
|
181
188
|
outlets?: {
|
|
182
189
|
/* Evaluating outlet */
|
|
@@ -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 GeneratorQnnLlmActionLoadModel = Action & {
|
|
@@ -168,13 +169,17 @@ Default property:
|
|
|
168
169
|
}
|
|
169
170
|
events?: {
|
|
170
171
|
/* Event triggered when context state changes */
|
|
171
|
-
onContextStateChange?: Array<
|
|
172
|
+
onContextStateChange?: Array<
|
|
173
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onContextStateChange']>
|
|
174
|
+
>
|
|
172
175
|
/* Event triggered when generate is done */
|
|
173
|
-
onGenerate?: Array<EventAction
|
|
176
|
+
onGenerate?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onGenerate']>>
|
|
174
177
|
/* Event triggered on get function call request */
|
|
175
|
-
onFunctionCall?: Array<
|
|
178
|
+
onFunctionCall?: Array<
|
|
179
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onFunctionCall']>
|
|
180
|
+
>
|
|
176
181
|
/* Event triggered when error occurs */
|
|
177
|
-
onError?: Array<EventAction
|
|
182
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onError']>>
|
|
178
183
|
}
|
|
179
184
|
outlets?: {
|
|
180
185
|
/* Context state */
|