@fugood/bricks-project 2.22.0-beta.10 → 2.22.0-beta.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.22.0-beta.10",
3
+ "version": "2.22.0-beta.11",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
@@ -14,5 +14,5 @@
14
14
  "lodash": "^4.17.4",
15
15
  "uuid": "^8.3.1"
16
16
  },
17
- "gitHead": "a66b1a510bfd78709dc6251ef5b83bc470049308"
17
+ "gitHead": "a6ee3595eab6b78d68c51effdeac7224e666134c"
18
18
  }
package/types/bricks.ts CHANGED
@@ -1870,7 +1870,7 @@ Default property:
1870
1870
  verticalMaxQuantity?: number | DataLink
1871
1871
  /* Resize mode */
1872
1872
  resizeMode?: 'auto' | 'fix' | DataLink
1873
- /* Align Content */
1873
+ /* Justify Content */
1874
1874
  justifyContent?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | DataLink
1875
1875
  /* Align Content */
1876
1876
  alignContent?:
@@ -47,7 +47,7 @@ Default property:
47
47
  completed?: Array<EventAction>
48
48
  }
49
49
  outlets?: {
50
- /* Result of each countdown change */
50
+ /* Countdown step value */
51
51
  countdown?: () => Data
52
52
  }
53
53
  }
@@ -691,7 +691,7 @@ Default property:
691
691
  }
692
692
  */
693
693
  property?: {
694
- /* Start query on generator initialized */
694
+ /* Start generator initialization execution immediately */
695
695
  init?: boolean | DataLink
696
696
  /* Data Bank Space ID */
697
697
  spacename?: string | DataLink
@@ -730,7 +730,7 @@ Default property:
730
730
  }
731
731
  }
732
732
 
733
- /* Fetch data & subscribe data change from Data Bank */
733
+ /* Get Data or subscribe to Data changes from Data Bank */
734
734
  export type GeneratorDataBank = Generator &
735
735
  GeneratorDataBankDef & {
736
736
  templateKey: 'GENERATOR_DATA_BANK'
@@ -752,7 +752,7 @@ export type GeneratorDataBank = Generator &
752
752
  >
753
753
  }
754
754
 
755
- /* Run GraphQL query with defined properties */
755
+ /* Execute GraphQL request with defined properties */
756
756
  export type GeneratorGraphQLActionRunQuery = ActionWithParams & {
757
757
  __actionName: 'GENERATOR_GRAPHQL_RUN_QUERY'
758
758
  params?: Array<
@@ -797,7 +797,7 @@ Default property:
797
797
  }
798
798
  */
799
799
  property?: {
800
- /* Start GraphQL query on generator initialized */
800
+ /* Start GraphQL request immediately after generator initialization */
801
801
  init?: boolean | DataLink
802
802
  /* GraphQL request type */
803
803
  type?: 'query' | 'mutation' | 'subscription' | DataLink
@@ -805,9 +805,9 @@ Default property:
805
805
  headers?: {} | DataLink
806
806
  /* HTTP request URL endpoint */
807
807
  endpoint?: string | DataLink
808
- /* Subscrpition endpoint */
808
+ /* Subscription endpoint */
809
809
  endpointForSubscription?: string | DataLink
810
- /* Subscrpition connection params */
810
+ /* Subscription connection params */
811
811
  connectionParams?: {} | DataLink
812
812
  /* Query content */
813
813
  query?: string | DataLink
@@ -831,9 +831,9 @@ Default property:
831
831
  firebaseMessagingSenderId?: string | DataLink
832
832
  }
833
833
  events?: {
834
- /* Event of subscription on connection */
834
+ /* Event triggered when subscription connection is successful */
835
835
  subscriptionOnConnection?: Array<EventAction>
836
- /* Server connections error of GraphQL subscription */
836
+ /* Event triggered when subscription connection error occurs */
837
837
  subscriptionOnConnectionError?: Array<EventAction>
838
838
  }
839
839
  outlets?: {
@@ -973,22 +973,22 @@ export type GeneratorHTTP = Generator &
973
973
  >
974
974
  }
975
975
 
976
- /* Start play sound */
976
+ /* Start playing sound */
977
977
  export type GeneratorSoundPlayerActionPlay = Action & {
978
978
  __actionName: 'GENERATOR_SOUND_PLAYER_PLAY'
979
979
  }
980
980
 
981
- /* Pause play sound */
981
+ /* Pause playing sound */
982
982
  export type GeneratorSoundPlayerActionPause = Action & {
983
983
  __actionName: 'GENERATOR_SOUND_PLAYER_PAUSE'
984
984
  }
985
985
 
986
- /* Resume play sound from pause */
986
+ /* Resume playing sound from pause */
987
987
  export type GeneratorSoundPlayerActionResume = Action & {
988
988
  __actionName: 'GENERATOR_SOUND_PLAYER_RESUME'
989
989
  }
990
990
 
991
- /* Stop play sound */
991
+ /* Stop playing sound */
992
992
  export type GeneratorSoundPlayerActionRelease = Action & {
993
993
  __actionName: 'GENERATOR_SOUND_PLAYER_RELEASE'
994
994
  }
@@ -1002,32 +1002,32 @@ Default property:
1002
1002
  }
1003
1003
  */
1004
1004
  property?: {
1005
- /* The sound file path */
1005
+ /* Sound file path */
1006
1006
  filePath?: string | DataLink
1007
- /* The checksum of file */
1007
+ /* MD5 */
1008
1008
  md5?: string | DataLink
1009
- /* Repeat the sound */
1009
+ /* Repeat playback */
1010
1010
  loop?: boolean | DataLink
1011
- /* The volume of sound (0 - 100) */
1011
+ /* Sound volume (0 - 100) */
1012
1012
  volume?: number | DataLink
1013
1013
  }
1014
1014
  events?: {
1015
- /* Event on sound file loaded */
1015
+ /* Sound file loaded successfully */
1016
1016
  onLoad?: Array<EventAction>
1017
- /* Event on load error */
1017
+ /* Sound file load error */
1018
1018
  onLoadError?: Array<EventAction>
1019
- /* Event on sound play */
1019
+ /* Sound playback complete */
1020
1020
  onPlay?: Array<EventAction>
1021
- /* Event on sound end */
1021
+ /* Sound file playback end */
1022
1022
  onEnd?: Array<EventAction>
1023
1023
  }
1024
1024
  outlets?: {
1025
- /* Is sound playing */
1025
+ /* Whether the sound is playing */
1026
1026
  isPlaying?: () => Data
1027
1027
  }
1028
1028
  }
1029
1029
 
1030
- /* Play sound file from file system, support sound format refer this https://developer.android.com/guide/topics/media/media-formats */
1030
+ /* Play sound, see supported formats at https://developer.android.com/guide/topics/media/media-formats */
1031
1031
  export type GeneratorSoundPlayer = Generator &
1032
1032
  GeneratorSoundPlayerDef & {
1033
1033
  templateKey: 'GENERATOR_SOUND_PLAYER'
@@ -1062,43 +1062,42 @@ Default property:
1062
1062
  }
1063
1063
  */
1064
1064
  property?: {
1065
- /* Enable listening */
1065
+ /* Enable listening for input */
1066
1066
  enabled?: boolean | DataLink
1067
- /* Key map to convert key or key code to specify content (e.g. { 37: 'left' }) */
1067
+ /* Key map to transform key or key code to the designated content (e.g. { 37: 'left' }) */
1068
1068
  keyMap?: {} | DataLink
1069
- /* Key outlet prefer use key code or key.
1070
- Please note that the key code is not supported on iOS / tvOS, so it will use `key` if value is `auto`. */
1069
+ /* Key outlet preference use key code or key. */
1071
1070
  keyOutletPrefer?: 'auto' | 'key-code' | 'key' | DataLink
1072
- /* Stop key or code to finish batch */
1071
+ /* Key or code to finish continuous input */
1073
1072
  batchStopKeys?: Array<string | DataLink | number | DataLink | DataLink> | DataLink
1074
- /* Debounce time to finish batch (ms) */
1073
+ /* Debounce time (ms) to finish continuous input */
1075
1074
  batchDebounce?: number | DataLink
1076
- /* Max wait time to finish batch (ms) (Default: No limit) */
1075
+ /* Maximum wait time (ms) to finish continuous input (default: unlimited) */
1077
1076
  batchDebounceMaxWait?: number | DataLink
1078
1077
  }
1079
1078
  events?: {
1080
- /* Event of key down */
1079
+ /* Event on key press */
1081
1080
  onDown?: Array<EventAction>
1082
- /* Event of key up */
1081
+ /* Event on key up */
1083
1082
  onUp?: Array<EventAction>
1084
- /* Event of batch input finished */
1083
+ /* Event on continuous input complete */
1085
1084
  onBatch?: Array<EventAction>
1086
1085
  }
1087
1086
  outlets?: {
1088
- /* Last key down code */
1087
+ /* Last key code pressed */
1089
1088
  lastKeyDown?: () => Data
1090
- /* Last key down flags */
1089
+ /* Modifier key information on last key press */
1091
1090
  lastKeyDownFlags?: () => Data
1092
- /* Last key up code */
1091
+ /* Last key code released */
1093
1092
  lastKeyUp?: () => Data
1094
- /* Last key up flags */
1093
+ /* Modifier key information on last key release */
1095
1094
  lastKeyUpFlags?: () => Data
1096
- /* Last batch events */
1095
+ /* Last continuous event */
1097
1096
  lastBatchEvents?: () => Data
1098
1097
  }
1099
1098
  }
1100
1099
 
1101
- /* Listening keyboard (controller) event */
1100
+ /* Access keyboard (remote control) events */
1102
1101
  export type GeneratorKeyboard = Generator &
1103
1102
  GeneratorKeyboardDef & {
1104
1103
  templateKey: 'GENERATOR_KEYBOARD'
@@ -1395,22 +1394,22 @@ export type GeneratorStep = Generator &
1395
1394
  >
1396
1395
  }
1397
1396
 
1398
- /* Start the next iterate */
1397
+ /* Proceed to next iteration */
1399
1398
  export type GeneratorIteratorActionNext = Action & {
1400
1399
  __actionName: 'GENERATOR_ITERATOR_NEXT'
1401
1400
  }
1402
1401
 
1403
- /* Back to the previous iterate */
1402
+ /* Go back to previous iteration */
1404
1403
  export type GeneratorIteratorActionPrevious = Action & {
1405
1404
  __actionName: 'GENERATOR_ITERATOR_PREVIOUS'
1406
1405
  }
1407
1406
 
1408
- /* Skip to last iterate element (Ignore loop) */
1407
+ /* Jump to the last iteration element (ignoring the loop setting) */
1409
1408
  export type GeneratorIteratorActionLast = Action & {
1410
1409
  __actionName: 'GENERATOR_ITERATOR_LAST'
1411
1410
  }
1412
1411
 
1413
- /* Reset the iterator state */
1412
+ /* Reset iteration state */
1414
1413
  export type GeneratorIteratorActionReset = Action & {
1415
1414
  __actionName: 'GENERATOR_ITERATOR_RESET'
1416
1415
  }
@@ -1425,40 +1424,40 @@ Default property:
1425
1424
  }
1426
1425
  */
1427
1426
  property?: {
1428
- /* The data source of the value. If it is an array, the value element is used. If it is an object, Object.values() is used as the data. If it is a string, the source character of the value is taken. If it is a number, it represents a count of 1N. */
1427
+ /* Data source for iteration. If it's an Array, it will iterate through elements. If it's an Object, it will use Object.values() as data source. If it's a String, it will iterate through characters. If it's a Number, it represents count from 1 to N. */
1429
1428
  data?: any
1430
- /* Starting element index */
1429
+ /* Starting element position */
1431
1430
  start?: number | DataLink
1432
- /* Iterate step */
1431
+ /* Step size for each iteration */
1433
1432
  step?: number | DataLink
1434
- /* The maximum number of iterations (Set -1 for unlimited) */
1433
+ /* Maximum number of iterations (can be set to -1 for unlimited) */
1435
1434
  maxQuantity?: number | DataLink
1436
- /* Loop iterate */
1435
+ /* Whether to loop the iteration */
1437
1436
  loop?: boolean | DataLink
1438
1437
  }
1439
1438
  events?: {
1440
- /* Event on iterate */
1439
+ /* Event triggered on each iteration */
1441
1440
  iterate?: Array<EventAction>
1442
- /* Event on iterate round start */
1441
+ /* Event triggered on the first iteration of a round */
1443
1442
  first?: Array<EventAction>
1444
- /* Event on iterate round end */
1443
+ /* Event triggered on the last iteration of a round */
1445
1444
  end?: Array<EventAction>
1446
1445
  }
1447
1446
  outlets?: {
1448
- /* Elements that have been iterated (Included current iterated) */
1447
+ /* Elements that have been iterated (including current one) */
1449
1448
  iteratedArray?: () => Data
1450
- /* Elements not yet iterated */
1449
+ /* Elements that will be iterated but have not been iterated yet */
1451
1450
  upcomingArray?: () => Data
1452
- /* Current iterated element */
1451
+ /* Current iteration element */
1453
1452
  value?: () => Data
1454
- /* Current Key of iterated element (number: same as value; array, string: index; object: string) */
1453
+ /* Key of the current iteration element (for number: same as value, for array/string: index, for object: string key) */
1455
1454
  key?: () => Data
1456
- /* The current number of iterations (if data is 6 and step is 2, this value will be returned in order: 1, 2, 3) */
1455
+ /* Current iteration count (if data is 6 and step is 2, this will return: 1,2,3 in sequence) */
1457
1456
  index?: () => Data
1458
1457
  }
1459
1458
  }
1460
1459
 
1461
- /* Iterate values (Array, Object, Number, String) */
1460
+ /* Iterate through values (Array, Object, Number, String) */
1462
1461
  export type GeneratorIterator = Generator &
1463
1462
  GeneratorIteratorDef & {
1464
1463
  templateKey: 'GENERATOR_ITERATOR'
@@ -2065,14 +2064,11 @@ Default property:
2065
2064
  }
2066
2065
  */
2067
2066
  property?: {
2068
- /* Try attach on generator initialized
2069
- On web require user activation to attach device */
2067
+ /* Try attach on generator initialized On web require user activation to attach device */
2070
2068
  attachOnInit?: boolean | DataLink
2071
2069
  /* The serial device driver */
2072
2070
  driver?: 'fd' | 'usb' | DataLink
2073
- /* The serial device path
2074
- e.g. /dev/ttyS0 or /dev/bus/usb/001/001
2075
- For desktop and web is device index number */
2071
+ /* The serial device path e.g. /dev/ttyS0 or /dev/bus/usb/001/001 For desktop and web is device index number */
2076
2072
  path?: string | DataLink
2077
2073
  /* The serial USB vendor id (autoconnect first) */
2078
2074
  vendorId?: number | DataLink
@@ -4349,7 +4345,9 @@ Default property:
4349
4345
  `detect-data-change`: Watch data target change to return data,
4350
4346
  please update data with ({ id: string, content: string | object }),
4351
4347
  and ensure the id is same with request id
4352
- `script`: Not implemented yet */
4348
+ `script`: Run a JavaScript code to return data
4349
+ - Script can define members to call generator functions
4350
+ - Script support async/await */
4353
4351
  resources?:
4354
4352
  | Array<
4355
4353
  | DataLink
@@ -4365,7 +4363,7 @@ Default property:
4365
4363
  | {
4366
4364
  target?: string | DataLink
4367
4365
  timeout?: number | DataLink
4368
- payload?: any
4366
+ additionalParams?: {} | DataLink
4369
4367
  }
4370
4368
  scriptConfig?:
4371
4369
  | DataLink
@@ -4381,7 +4379,7 @@ Default property:
4381
4379
  }
4382
4380
  >
4383
4381
  | DataLink
4384
- payload?: any
4382
+ additionalParams?: {} | DataLink
4385
4383
  }
4386
4384
  }
4387
4385
  >
@@ -4391,7 +4389,9 @@ Default property:
4391
4389
  `detect-data-change`: Watch data target change to return data,
4392
4390
  please update data with ({ id: string, content: string | object }),
4393
4391
  and ensure the id is same with request id.
4394
- `script`: Not implemented yet */
4392
+ `script`: Run a JavaScript code to return data
4393
+ - Script can define members to call generator functions
4394
+ - Script support async/await */
4395
4395
  tools?:
4396
4396
  | Array<
4397
4397
  | DataLink
@@ -4406,7 +4406,7 @@ Default property:
4406
4406
  | {
4407
4407
  target?: string | DataLink
4408
4408
  timeout?: number | DataLink
4409
- payload?: any
4409
+ additionalParams?: {} | DataLink
4410
4410
  }
4411
4411
  scriptConfig?:
4412
4412
  | DataLink
@@ -4422,7 +4422,7 @@ Default property:
4422
4422
  }
4423
4423
  >
4424
4424
  | DataLink
4425
- payload?: any
4425
+ additionalParams?: {} | DataLink
4426
4426
  }
4427
4427
  }
4428
4428
  >
@@ -4433,7 +4433,9 @@ Default property:
4433
4433
  `detect-data-change`: Watch data target change to return data,
4434
4434
  please update data with ({ id: string, content: string | object }),
4435
4435
  and ensure the id is same with request id
4436
- `script`: Not implemented yet */
4436
+ `script`: Run a JavaScript code to return data
4437
+ - Script can define members to call generator functions
4438
+ - Script support async/await */
4437
4439
  prompts?:
4438
4440
  | Array<
4439
4441
  | DataLink
@@ -4449,7 +4451,7 @@ Default property:
4449
4451
  | {
4450
4452
  target?: string | DataLink
4451
4453
  timeout?: number | DataLink
4452
- payload?: any
4454
+ additionalParams?: {} | DataLink
4453
4455
  }
4454
4456
  scriptConfig?:
4455
4457
  | DataLink
@@ -4465,7 +4467,7 @@ Default property:
4465
4467
  }
4466
4468
  >
4467
4469
  | DataLink
4468
- payload?: any
4470
+ additionalParams?: {} | DataLink
4469
4471
  }
4470
4472
  }
4471
4473
  >
@@ -6174,7 +6176,7 @@ Default property:
6174
6176
  "cacheVType": "f16",
6175
6177
  "ctxShift": true,
6176
6178
  "transformScriptEnabled": false,
6177
- "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables } \*\/\nreturn inputs.prompt",
6179
+ "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
6178
6180
  "transformScriptVariables": {},
6179
6181
  "sessionMinSaveSize": 50,
6180
6182
  "sessionRemain": 10,