@fugood/bricks-project 2.22.8 → 2.22.10

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 (66) hide show
  1. package/api/instance.ts +37 -5
  2. package/compile/action-name-map.ts +1 -0
  3. package/compile/index.ts +2 -0
  4. package/package.json +1 -1
  5. package/tools/deploy.ts +33 -2
  6. package/tools/postinstall.ts +0 -6
  7. package/tools/pull.ts +1 -1
  8. package/types/bricks/Image.ts +5 -0
  9. package/types/bricks/WebView.ts +7 -1
  10. package/types/data-calc-command.ts +7003 -0
  11. package/types/data-calc-script.ts +21 -0
  12. package/types/data-calc.ts +0 -7021
  13. package/types/data.ts +2 -0
  14. package/types/generators/AlarmClock.ts +1 -0
  15. package/types/generators/Assistant.ts +13 -5
  16. package/types/generators/BleCentral.ts +1 -0
  17. package/types/generators/BlePeripheral.ts +1 -0
  18. package/types/generators/CanvasMap.ts +1 -0
  19. package/types/generators/CastlesPay.ts +1 -0
  20. package/types/generators/DataBank.ts +1 -0
  21. package/types/generators/File.ts +1 -0
  22. package/types/generators/GraphQl.ts +1 -0
  23. package/types/generators/Http.ts +10 -2
  24. package/types/generators/HttpServer.ts +4 -1
  25. package/types/generators/Information.ts +1 -0
  26. package/types/generators/Intent.ts +1 -0
  27. package/types/generators/Iterator.ts +1 -0
  28. package/types/generators/Keyboard.ts +1 -0
  29. package/types/generators/LlmAnthropicCompat.ts +1 -0
  30. package/types/generators/LlmGgml.ts +1 -0
  31. package/types/generators/LlmOnnx.ts +1 -0
  32. package/types/generators/LlmOpenAiCompat.ts +1 -0
  33. package/types/generators/LlmQualcommAiEngine.ts +1 -0
  34. package/types/generators/Mcp.ts +5 -4
  35. package/types/generators/McpServer.ts +7 -6
  36. package/types/generators/MediaFlow.ts +1 -0
  37. package/types/generators/MqttBroker.ts +1 -0
  38. package/types/generators/MqttClient.ts +1 -0
  39. package/types/generators/Question.ts +1 -0
  40. package/types/generators/RealtimeTranscription.ts +3 -2
  41. package/types/generators/RerankerGgml.ts +1 -0
  42. package/types/generators/SerialPort.ts +1 -0
  43. package/types/generators/SoundPlayer.ts +1 -0
  44. package/types/generators/SoundRecorder.ts +1 -0
  45. package/types/generators/SpeechToTextGgml.ts +1 -0
  46. package/types/generators/SpeechToTextOnnx.ts +1 -0
  47. package/types/generators/SpeechToTextPlatform.ts +1 -0
  48. package/types/generators/SqLite.ts +1 -0
  49. package/types/generators/Step.ts +1 -0
  50. package/types/generators/Tcp.ts +1 -0
  51. package/types/generators/TcpServer.ts +4 -1
  52. package/types/generators/TextToSpeechGgml.ts +1 -0
  53. package/types/generators/TextToSpeechOnnx.ts +1 -0
  54. package/types/generators/TextToSpeechOpenAiLike.ts +1 -0
  55. package/types/generators/ThermalPrinter.ts +1 -0
  56. package/types/generators/Tick.ts +1 -0
  57. package/types/generators/Udp.ts +1 -0
  58. package/types/generators/VadGgml.ts +1 -0
  59. package/types/generators/VectorStore.ts +1 -0
  60. package/types/generators/Watchdog.ts +1 -0
  61. package/types/generators/WebCrawler.ts +1 -0
  62. package/types/generators/WebRtc.ts +3 -2
  63. package/types/generators/WebSocket.ts +1 -0
  64. package/types/index.ts +2 -0
  65. package/types/system.ts +42 -6
  66. package/utils/event-props.ts +1 -0
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -59,9 +60,9 @@ Default property:
59
60
  /* Calee ID, to ilter caller signal */
60
61
  calleeId?: string | DataLink
61
62
  /* Target local WebRTC stream preview brick ID */
62
- localVideoTarget?: string | DataLink
63
+ localVideoTarget?: string | DataLink | (() => Brick)
63
64
  /* Target remote WebRTC stream brick ID */
64
- remoteVideoTarget?: string | DataLink
65
+ remoteVideoTarget?: string | DataLink | (() => Brick)
65
66
  /* ICE Server list
66
67
  Default use Google public STUN servers if not setted. */
67
68
  iceServers?:
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
package/types/index.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  export * from './data'
2
2
  export * from './data-calc'
3
+ export * from './data-calc-script'
4
+ export * from './data-calc-command'
3
5
  export * from './generators'
4
6
  export * from './bricks'
5
7
  export * from './animation'
package/types/system.ts CHANGED
@@ -11,7 +11,7 @@ import type { Animation } from './animation'
11
11
  import type { Canvas } from './canvas'
12
12
  import type { Data, DataLink } from './data'
13
13
 
14
- /* Change Data value with script expression */
14
+ /* Change Data value with script expression. One expression of return value */
15
15
  export type SystemActionPropertyBankExpression = ActionWithParams & {
16
16
  __actionName: 'PROPERTY_BANK_EXPRESSION'
17
17
  params?: Array<
@@ -22,7 +22,13 @@ export type SystemActionPropertyBankExpression = ActionWithParams & {
22
22
  }
23
23
  | {
24
24
  input: 'variables'
25
- value?: {} | DataLink | EventProperty
25
+ value?:
26
+ | Array<{
27
+ id?: string
28
+ key?: string
29
+ }>
30
+ | DataLink
31
+ | EventProperty
26
32
  mapping?: string
27
33
  }
28
34
  | {
@@ -153,7 +159,13 @@ export type SystemActionChangeCanvas = ActionWithParams & {
153
159
  }
154
160
  | {
155
161
  input: 'canvasKeyMapList'
156
- value?: {} | DataLink | EventProperty
162
+ value?:
163
+ | Array<{
164
+ key?: string
165
+ value?: string
166
+ }>
167
+ | DataLink
168
+ | EventProperty
157
169
  mapping?: string
158
170
  }
159
171
  | {
@@ -218,7 +230,15 @@ export type SystemActionAlert = ActionWithParams & {
218
230
  }
219
231
  | {
220
232
  input: 'selections'
221
- value?: {} | DataLink | EventProperty
233
+ value?:
234
+ | Array<{
235
+ label?: string
236
+ color?: string
237
+ value?: string
238
+ disableResult?: boolean
239
+ }>
240
+ | DataLink
241
+ | EventProperty
222
242
  mapping?: string
223
243
  }
224
244
  | {
@@ -415,7 +435,15 @@ export type SystemActionChannelSubscribe = ActionWithParams & {
415
435
  }
416
436
  | {
417
437
  input: 'dataAssignList'
418
- value?: {} | DataLink | EventProperty
438
+ value?:
439
+ | Array<{
440
+ path?: string
441
+ type?: any
442
+ id?: string
443
+ required?: boolean
444
+ }>
445
+ | DataLink
446
+ | EventProperty
419
447
  mapping?: string
420
448
  }
421
449
  | {
@@ -425,7 +453,15 @@ export type SystemActionChannelSubscribe = ActionWithParams & {
425
453
  }
426
454
  | {
427
455
  input: 'progressAssignList'
428
- value?: {} | DataLink | EventProperty
456
+ value?:
457
+ | Array<{
458
+ path?: string
459
+ type?: any
460
+ id?: string
461
+ required?: boolean
462
+ }>
463
+ | DataLink
464
+ | EventProperty
429
465
  mapping?: string
430
466
  }
431
467
  | {
@@ -952,6 +952,7 @@ export const templateEventPropsMap = {
952
952
  'GENERATOR_ASSISTANT_MESSAGES', // type: array
953
953
  'GENERATOR_ASSISTANT_LAST_MESSAGE', // type: object
954
954
  'GENERATOR_ASSISTANT_IS_ERROR', // type: bool
955
+ 'GENERATOR_ASSISTANT_FINISH_REASON', // type: string
955
956
  ],
956
957
  },
957
958
  GENERATOR_VECTOR_STORE: {