@fugood/bricks-project 2.24.0-beta.4 → 2.24.0-beta.40

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 (125) hide show
  1. package/compile/action-name-map.ts +38 -0
  2. package/compile/index.ts +429 -160
  3. package/compile/util.ts +2 -0
  4. package/package.json +7 -3
  5. package/package.json.bak +27 -0
  6. package/skills/bricks-design/LICENSE.txt +180 -0
  7. package/skills/bricks-design/SKILL.md +66 -0
  8. package/skills/bricks-project/SKILL.md +2 -2
  9. package/skills/bricks-project/rules/animation.md +1 -1
  10. package/skills/bricks-project/rules/architecture-patterns.md +7 -0
  11. package/skills/bricks-project/rules/automations.md +74 -28
  12. package/skills/bricks-project/rules/buttress.md +10 -7
  13. package/skills/bricks-project/rules/data-calculation.md +1 -1
  14. package/skills/bricks-project/rules/local-sync.md +2 -2
  15. package/skills/bricks-project/rules/media-flow.md +3 -3
  16. package/skills/bricks-project/rules/remote-data-bank.md +6 -6
  17. package/skills/bricks-project/rules/standby-transition.md +1 -1
  18. package/tools/deploy.ts +66 -12
  19. package/tools/icons/fa6pro-meta.json +3669 -26125
  20. package/tools/mcp-server.ts +11 -878
  21. package/tools/mcp-tools/compile.ts +91 -0
  22. package/tools/mcp-tools/huggingface.ts +762 -0
  23. package/tools/mcp-tools/icons.ts +70 -0
  24. package/tools/mcp-tools/lottie.ts +102 -0
  25. package/tools/mcp-tools/media.ts +110 -0
  26. package/tools/postinstall.ts +137 -40
  27. package/tools/preview-main.mjs +146 -9
  28. package/tools/preview.ts +30 -2
  29. package/tools/pull.ts +37 -19
  30. package/tsconfig.json +16 -0
  31. package/types/animation.ts +4 -0
  32. package/types/automation.ts +4 -1
  33. package/types/brick-base.ts +1 -1
  34. package/types/bricks/Camera.ts +48 -13
  35. package/types/bricks/Chart.ts +10 -4
  36. package/types/bricks/GenerativeMedia.ts +30 -14
  37. package/types/bricks/Icon.ts +9 -5
  38. package/types/bricks/Image.ts +10 -6
  39. package/types/bricks/Items.ts +29 -15
  40. package/types/bricks/Lottie.ts +15 -7
  41. package/types/bricks/Maps.ts +16 -8
  42. package/types/bricks/QrCode.ts +9 -5
  43. package/types/bricks/Rect.ts +45 -6
  44. package/types/bricks/RichText.ts +9 -5
  45. package/types/bricks/Rive.ts +21 -11
  46. package/types/bricks/Slideshow.ts +20 -10
  47. package/types/bricks/Svg.ts +8 -4
  48. package/types/bricks/Text.ts +9 -5
  49. package/types/bricks/TextInput.ts +23 -13
  50. package/types/bricks/Video.ts +11 -7
  51. package/types/bricks/VideoStreaming.ts +8 -4
  52. package/types/bricks/WebRtcStream.ts +7 -3
  53. package/types/bricks/WebView.ts +12 -8
  54. package/types/canvas.ts +4 -2
  55. package/types/common.ts +19 -12
  56. package/types/data-calc-command.ts +2 -0
  57. package/types/data-calc.ts +1 -0
  58. package/types/data.ts +2 -0
  59. package/types/generators/AlarmClock.ts +17 -11
  60. package/types/generators/Assistant.ts +69 -18
  61. package/types/generators/BleCentral.ts +31 -11
  62. package/types/generators/BlePeripheral.ts +11 -7
  63. package/types/generators/CanvasMap.ts +10 -6
  64. package/types/generators/CastlesPay.ts +15 -7
  65. package/types/generators/DataBank.ts +44 -9
  66. package/types/generators/File.ts +109 -30
  67. package/types/generators/GraphQl.ts +12 -6
  68. package/types/generators/Http.ts +33 -10
  69. package/types/generators/HttpServer.ts +23 -15
  70. package/types/generators/Information.ts +9 -5
  71. package/types/generators/Intent.ts +15 -5
  72. package/types/generators/Iterator.ts +15 -11
  73. package/types/generators/Keyboard.ts +27 -13
  74. package/types/generators/LlmAnthropicCompat.ts +33 -11
  75. package/types/generators/LlmAppleBuiltin.ts +25 -10
  76. package/types/generators/LlmGgml.ts +140 -31
  77. package/types/generators/LlmMediaTekNeuroPilot.ts +235 -0
  78. package/types/generators/LlmMlx.ts +227 -0
  79. package/types/generators/LlmOnnx.ts +34 -14
  80. package/types/generators/LlmOpenAiCompat.ts +47 -11
  81. package/types/generators/LlmQualcommAiEngine.ts +45 -13
  82. package/types/generators/Mcp.ts +375 -34
  83. package/types/generators/McpServer.ts +58 -19
  84. package/types/generators/MediaFlow.ts +38 -12
  85. package/types/generators/MqttBroker.ts +29 -11
  86. package/types/generators/MqttClient.ts +19 -9
  87. package/types/generators/Question.ts +13 -9
  88. package/types/generators/RealtimeTranscription.ts +108 -19
  89. package/types/generators/RerankerGgml.ts +43 -12
  90. package/types/generators/SerialPort.ts +18 -10
  91. package/types/generators/SoundPlayer.ts +10 -4
  92. package/types/generators/SoundRecorder.ts +24 -9
  93. package/types/generators/SpeechToTextGgml.ts +52 -18
  94. package/types/generators/SpeechToTextOnnx.ts +18 -11
  95. package/types/generators/SpeechToTextPlatform.ts +15 -7
  96. package/types/generators/SqLite.ts +20 -10
  97. package/types/generators/Step.ts +9 -5
  98. package/types/generators/SttAppleBuiltin.ts +22 -9
  99. package/types/generators/Tcp.ts +13 -9
  100. package/types/generators/TcpServer.ts +20 -14
  101. package/types/generators/TextToSpeechAppleBuiltin.ts +21 -8
  102. package/types/generators/TextToSpeechGgml.ts +29 -11
  103. package/types/generators/TextToSpeechOnnx.ts +19 -12
  104. package/types/generators/TextToSpeechOpenAiLike.ts +14 -8
  105. package/types/generators/ThermalPrinter.ts +13 -9
  106. package/types/generators/Tick.ts +11 -7
  107. package/types/generators/Udp.ts +17 -8
  108. package/types/generators/VadGgml.ts +51 -14
  109. package/types/generators/VadOnnx.ts +42 -12
  110. package/types/generators/VadTraditional.ts +28 -13
  111. package/types/generators/VectorStore.ts +33 -12
  112. package/types/generators/Watchdog.ts +19 -10
  113. package/types/generators/WebCrawler.ts +11 -7
  114. package/types/generators/WebRtc.ts +30 -16
  115. package/types/generators/WebSocket.ts +11 -7
  116. package/types/generators/index.ts +2 -0
  117. package/types/subspace.ts +3 -0
  118. package/types/system.ts +1 -1
  119. package/utils/calc.ts +12 -8
  120. package/utils/event-props.ts +833 -1022
  121. package/utils/id.ts +4 -0
  122. package/api/index.ts +0 -1
  123. package/api/instance.ts +0 -213
  124. package/types/generators/TextToSpeechApple.ts +0 -113
  125. package/types/generators/TtsAppleBuiltin.ts +0 -105
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Display styled text with font, color, alignment, and truncation controls
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickTextDef {
17
21
  /*
@@ -105,9 +109,9 @@ Default property:
105
109
  }
106
110
  outlets?: {
107
111
  /* Brick is pressing */
108
- brickPressing?: () => Data
112
+ brickPressing?: () => Data<boolean>
109
113
  /* Brick is focusing (Use TV Device with controller) */
110
- brickFocusing?: () => Data
114
+ brickFocusing?: () => Data<boolean>
111
115
  }
112
116
  animation?: AnimationBasicEvents & {
113
117
  onPress?: Animation
@@ -121,11 +125,11 @@ Default property:
121
125
  }
122
126
  }
123
127
 
124
- /* Text brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378574-text)) */
128
+ /* Display styled text with font, color, alignment, and truncation controls */
125
129
  export type BrickText = Brick &
126
130
  BrickTextDef & {
127
131
  templateKey: 'BRICK_TEXT'
128
- switches: Array<
132
+ switches?: Array<
129
133
  SwitchDef &
130
134
  BrickTextDef & {
131
135
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Editable text input field with keyboard type, placeholder, and validation support
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Focus TextInput */
17
21
  export type BrickTextInputActionFocus = Action & {
@@ -172,29 +176,35 @@ Default property:
172
176
  /* Event of the TextInput is empty */
173
177
  onEmpty?: Array<EventAction>
174
178
  /* Event of the TextInput value change */
175
- onChange?: Array<EventAction>
179
+ onChange?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onChange']>>
176
180
  /* Event of the TextInput submit */
177
- onSubmit?: Array<EventAction>
181
+ onSubmit?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onSubmit']>>
178
182
  /* Event of the TextInput match regex (check every value change) */
179
- onMatch?: Array<EventAction>
183
+ onMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onMatch']>>
180
184
  /* Event of the TextInput not match regex (check every value change) */
181
- onNotMatch?: Array<EventAction>
185
+ onNotMatch?: Array<EventAction<string & keyof TemplateEventPropsMap['TextInput']['onNotMatch']>>
182
186
  /* Event of the TextInput not match regex (check every submit) */
183
- onResultNotMatch?: Array<EventAction>
187
+ onResultNotMatch?: Array<
188
+ EventAction<string & keyof TemplateEventPropsMap['TextInput']['onResultNotMatch']>
189
+ >
184
190
  /* Event of the TextInput reach max length or match regex */
185
191
  onFullFill?: Array<EventAction>
186
192
  }
187
193
  outlets?: {
188
194
  /* The raw input */
189
- rawInput?: () => Data
195
+ rawInput?: () => Data<any>
190
196
  /* The regex result */
191
- resultVariable?: () => Data
197
+ resultVariable?: () => Data<{ [key: string]: any }>
192
198
  /* Last key in */
193
- lastKey?: () => Data
199
+ lastKey?: () => Data<any>
194
200
  /* Selection of the TextInput (start, end, text) */
195
- selection?: () => Data
201
+ selection?: () => Data<{
202
+ start?: number
203
+ end?: number
204
+ text?: string
205
+ }>
196
206
  /* Selection text of the TextInput */
197
- selectionText?: () => Data
207
+ selectionText?: () => Data<string>
198
208
  }
199
209
  animation?: AnimationBasicEvents & {
200
210
  onFocus?: Animation
@@ -209,11 +219,11 @@ Default property:
209
219
  }
210
220
  }
211
221
 
212
- /* Text Input brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378575-text-input)) */
222
+ /* Editable text input field with keyboard type, placeholder, and validation support */
213
223
  export type BrickTextInput = Brick &
214
224
  BrickTextInputDef & {
215
225
  templateKey: 'BRICK_TEXT_INPUT'
216
- switches: Array<
226
+ switches?: Array<
217
227
  SwitchDef &
218
228
  BrickTextInputDef & {
219
229
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Video playback with play/pause controls and streaming support
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Play the video */
17
21
  export type BrickVideoActionPlay = Action & {
@@ -117,7 +121,7 @@ Default property:
117
121
  /* Event of the brick blur (Use TV Device with controller) */
118
122
  onBlur?: Array<EventAction>
119
123
  /* Event of the next video on change start */
120
- nextVideo?: Array<EventAction>
124
+ nextVideo?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['nextVideo']>>
121
125
  /* Event on plays of path are totally end */
122
126
  roundEnd?: Array<EventAction>
123
127
  /* Event on video load */
@@ -125,13 +129,13 @@ Default property:
125
129
  /* Event of the video playing error */
126
130
  onError?: Array<EventAction>
127
131
  /* Event of the video progress interval */
128
- onProgress?: Array<EventAction>
132
+ onProgress?: Array<EventAction<string & keyof TemplateEventPropsMap['Video']['onProgress']>>
129
133
  }
130
134
  outlets?: {
131
135
  /* Brick is pressing */
132
- brickPressing?: () => Data
136
+ brickPressing?: () => Data<boolean>
133
137
  /* Brick is focusing (Use TV Device with controller) */
134
- brickFocusing?: () => Data
138
+ brickFocusing?: () => Data<boolean>
135
139
  }
136
140
  animation?: AnimationBasicEvents & {
137
141
  onPress?: Animation
@@ -148,11 +152,11 @@ Default property:
148
152
  }
149
153
  }
150
154
 
151
- /* Video brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378577-video)) */
155
+ /* Video playback with play/pause controls and streaming support */
152
156
  export type BrickVideo = Brick &
153
157
  BrickVideoDef & {
154
158
  templateKey: 'BRICK_VIDEO'
155
- switches: Array<
159
+ switches?: Array<
156
160
  SwitchDef &
157
161
  BrickVideoDef & {
158
162
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Brick video streaming component, supports RTSP / RTMP streaming.
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickVideoStreamingDef {
17
21
  /*
@@ -68,9 +72,9 @@ Default property:
68
72
  }
69
73
  outlets?: {
70
74
  /* Brick is pressing */
71
- brickPressing?: () => Data
75
+ brickPressing?: () => Data<boolean>
72
76
  /* Brick is focusing (Use TV Device with controller) */
73
- brickFocusing?: () => Data
77
+ brickFocusing?: () => Data<boolean>
74
78
  }
75
79
  animation?: AnimationBasicEvents & {
76
80
  onPress?: Animation
@@ -89,7 +93,7 @@ Default property:
89
93
  export type BrickVideoStreaming = Brick &
90
94
  BrickVideoStreamingDef & {
91
95
  templateKey: 'BRICK_VIDEO_STREAMING'
92
- switches: Array<
96
+ switches?: Array<
93
97
  SwitchDef &
94
98
  BrickVideoStreamingDef & {
95
99
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Display WebRTC video/audio stream from a WebRTC generator connection
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  interface BrickWebRTCStreamDef {
17
21
  /*
@@ -38,11 +42,11 @@ Default property:
38
42
  }
39
43
  }
40
44
 
41
- /* WebRTCStream brick */
45
+ /* Display WebRTC video/audio stream from a WebRTC generator connection */
42
46
  export type BrickWebRTCStream = Brick &
43
47
  BrickWebRTCStreamDef & {
44
48
  templateKey: 'BRICK_WEBRTC_STREAM'
45
- switches: Array<
49
+ switches?: Array<
46
50
  SwitchDef &
47
51
  BrickWebRTCStreamDef & {
48
52
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type { Animation, AnimationBasicEvents } from '../animation'
@@ -12,6 +15,7 @@ import type {
12
15
  EventProperty,
13
16
  } from '../common'
14
17
  import type { BrickBasicProperty, BrickBasicEvents, BrickBasicEventsForItem } from '../brick-base'
18
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
15
19
 
16
20
  /* Run Javascript on the WebView */
17
21
  export type BrickWebViewActionInjectJavascript = ActionWithParams & {
@@ -122,17 +126,17 @@ Default property:
122
126
  }
123
127
  events?: BrickBasicEvents & {
124
128
  /* Event of the WebView on load */
125
- onLoad?: Array<EventAction>
129
+ onLoad?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onLoad']>>
126
130
  /* Event when the WebView load fails */
127
- onError?: Array<EventAction>
131
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onError']>>
128
132
  /* Event of the webview on message by `window.ReactNativeWebView.postMessage` on you're injected javascript code */
129
- onMessage?: Array<EventAction>
133
+ onMessage?: Array<EventAction<string & keyof TemplateEventPropsMap['Webview']['onMessage']>>
130
134
  }
131
135
  outlets?: {
132
136
  /* The result of the query selector action */
133
- queryResult?: () => Data
137
+ queryResult?: () => Data<any>
134
138
  /* The error of the query selector action */
135
- queryError?: () => Data
139
+ queryError?: () => Data<string>
136
140
  }
137
141
  animation?: AnimationBasicEvents & {
138
142
  onLoad?: Animation
@@ -141,11 +145,11 @@ Default property:
141
145
  }
142
146
  }
143
147
 
144
- /* WebView brick ([Tutorial](https://intercom.help/bricks-dag-inc/articles/5378588-web-view)) */
148
+ /* Embedded web browser with JS injection, DOM query selectors, content cropping, navigation control, and permission management */
145
149
  export type BrickWebView = Brick &
146
150
  BrickWebViewDef & {
147
151
  templateKey: 'BRICK_WEBVIEW'
148
- switches: Array<
152
+ switches?: Array<
149
153
  SwitchDef &
150
154
  BrickWebViewDef & {
151
155
  conds?: Array<{
package/types/canvas.ts CHANGED
@@ -36,9 +36,11 @@ interface CanvasDef {
36
36
  export type Canvas = CanvasDef & {
37
37
  __typename: 'Canvas'
38
38
  id: string
39
- title: string
39
+ alias?: string
40
+ title?: string
40
41
  description?: string
41
- switches: Array<
42
+ hideShortRef?: boolean
43
+ switches?: Array<
42
44
  SwitchDef &
43
45
  CanvasDef & {
44
46
  conds?: Array<{
package/types/common.ts CHANGED
@@ -6,9 +6,11 @@ import type { AutomationMap } from './automation'
6
6
  export interface Brick {
7
7
  __typename: 'Brick'
8
8
  id: string
9
+ alias?: string
9
10
  templateKey: string
10
- title: string
11
- description: string
11
+ title?: string
12
+ description?: string
13
+ hideShortRef?: boolean
12
14
  property?: {}
13
15
  events: {}
14
16
  outlets?: {}
@@ -24,9 +26,11 @@ export enum LocalSyncStrategy {
24
26
  export interface Generator {
25
27
  __typename: 'Generator'
26
28
  id: string
29
+ alias?: string
27
30
  templateKey: string
28
- title: string
29
- description: string
31
+ title?: string
32
+ description?: string
33
+ hideShortRef?: boolean
30
34
  localSyncRunMode?: LocalSyncStrategy
31
35
  property?: {}
32
36
  events: {}
@@ -43,34 +47,36 @@ export type Action = {
43
47
  name?: string
44
48
  }
45
49
 
46
- // Find correct key in bricks-project/utils/event-props for EventAction
50
+ // For standalone action types where specific event properties are not known
47
51
  export type EventProperty = string
48
52
 
49
- export type ActionWithParams = Action & {
53
+ export type ActionWithParams<EP extends string = string> = Action & {
50
54
  params?: Array<{
51
55
  input: string
52
- value?: any | EventProperty
56
+ value?: any | EP
53
57
  mapping?: string
54
58
  }>
55
59
  }
56
60
 
57
- export type ActionWithDataParams = Action & {
61
+ export type ActionWithDataParams<EP extends string = string> = Action & {
58
62
  dataParams?: Array<{
59
63
  input: () => Data
60
- value?: any | EventProperty
64
+ value?: any | EP
61
65
  mapping?: string
62
66
  }>
63
67
  }
64
68
 
65
69
  export type ItemBrickID = string
66
70
 
67
- export type EventAction = {
71
+ // EP carries available event property keys for this event context
72
+ // Use: EventAction<string & keyof TemplateEventPropsMap['Name']['event']>
73
+ export type EventAction<EP extends string = string> = {
68
74
  handler: 'system' | (() => Brick | Generator) | SubspaceID | ItemBrickID
69
- action: ActionWithParams | ActionWithDataParams
75
+ action: ActionWithParams<EP> | ActionWithDataParams<EP>
70
76
  waitAsync?: boolean
71
77
  }
72
78
 
73
- export type EventActionForItem = {
79
+ export type EventActionForItem<EP extends string = string> = {
74
80
  handler:
75
81
  | 'system'
76
82
  | (() => Brick | Generator | { brickId: string; templateKey: string })
@@ -121,6 +127,7 @@ export type ApplicationSettings = {
121
127
  useOpenAiApiKeySystemData?: boolean
122
128
  useGeminiApiKeySystemData?: boolean
123
129
  }
130
+ hideShortRefs?: boolean
124
131
  }
125
132
 
126
133
  export type Application = {
@@ -6,6 +6,7 @@ export interface DataCalculationData {
6
6
  __typename: 'DataCalculationData'
7
7
  title?: string
8
8
  description?: string
9
+ hideShortRef?: boolean
9
10
  data: () => Data
10
11
  inputs: Array<{
11
12
  key: 'change'
@@ -26,6 +27,7 @@ export interface DataCommand {
26
27
  id: string
27
28
  title?: string
28
29
  description?: string
30
+ hideShortRef?: boolean
29
31
  inputs: Array<{
30
32
  key: string
31
33
  source: (() => DataCalculationData | DataCommand) | any
@@ -4,6 +4,7 @@ export interface DataCalculation {
4
4
  id: string
5
5
  title?: string
6
6
  description?: string
7
+ hideShortRef?: boolean
7
8
  // Auto: Run the calculation when inputs change and allow triggers. Careful with circular dependencies!
8
9
  // Manual: Only run the calculation when manually triggered by System Action PROPERTY_BANK_COMMAND
9
10
  triggerMode?: 'auto' | 'manual'
package/types/data.ts CHANGED
@@ -17,8 +17,10 @@ interface DataDef {
17
17
  export type Data<T = any> = DataDef & {
18
18
  __typename: 'Data'
19
19
  id: string
20
+ alias?: string
20
21
  title: string
21
22
  description?: string
23
+ hideShortRef?: boolean
22
24
  metadata?: {
23
25
  linked?: Array<SubspaceID>
24
26
  linkedFrom?: SubspaceID
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Schedule events using cron expressions (e.g. daily, hourly)
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type {
@@ -10,6 +13,7 @@ import type {
10
13
  Action,
11
14
  EventProperty,
12
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
13
17
 
14
18
  /* Start the alarm clock */
15
19
  export type GeneratorAlarmClockActionStart = Action & {
@@ -61,31 +65,33 @@ Default property:
61
65
  }
62
66
  events?: {
63
67
  /* Event for cron rule is not invalid */
64
- onRuleInvalid?: Array<EventAction>
68
+ onRuleInvalid?: Array<
69
+ EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onRuleInvalid']>
70
+ >
65
71
  /* Event for alarm clock start */
66
- onStart?: Array<EventAction>
72
+ onStart?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onStart']>>
67
73
  /* Event for alarm clock trig */
68
- onTrig?: Array<EventAction>
74
+ onTrig?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onTrig']>>
69
75
  /* Event for alarm clock stop */
70
- onEnd?: Array<EventAction>
76
+ onEnd?: Array<EventAction<string & keyof TemplateEventPropsMap['AlarmClock']['onEnd']>>
71
77
  }
72
78
  outlets?: {
73
79
  /* Current time of each alarm clock trig */
74
- trigTime?: () => Data
80
+ trigTime?: () => Data<string>
75
81
  /* Current timestamp (unix time) of each alarm clock trig */
76
- trigTimestamp?: () => Data
82
+ trigTimestamp?: () => Data<string | number>
77
83
  /* Count of alarm clock trigs */
78
- trigCount?: () => Data
84
+ trigCount?: () => Data<string | number>
79
85
  /* Is alarm clock running? */
80
- running?: () => Data
86
+ running?: () => Data<boolean | string | number>
81
87
  }
82
88
  }
83
89
 
84
- /* Execute event by cron tab */
90
+ /* Schedule events using cron expressions (e.g. daily, hourly) */
85
91
  export type GeneratorAlarmClock = Generator &
86
92
  GeneratorAlarmClockDef & {
87
93
  templateKey: 'GENERATOR_ALARM_CLOCK'
88
- switches: Array<
94
+ switches?: Array<
89
95
  SwitchDef &
90
96
  GeneratorAlarmClockDef & {
91
97
  conds?: Array<{
@@ -1,4 +1,7 @@
1
- /* Auto generated by build script */
1
+ /* Auto generated by build script
2
+ *
3
+ * Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary
4
+ */
2
5
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
6
  import type { Data, DataLink } from '../data'
4
7
  import type {
@@ -10,6 +13,7 @@ import type {
10
13
  Action,
11
14
  EventProperty,
12
15
  } from '../common'
16
+ import type { TemplateEventPropsMap } from '../../utils/event-props'
13
17
 
14
18
  /* Add a message to the assistant */
15
19
  export type GeneratorAssistantActionAddMessage = ActionWithParams & {
@@ -364,7 +368,7 @@ export type GeneratorAssistantActionInsertMcpResource = ActionWithParams & {
364
368
  >
365
369
  }
366
370
 
367
- /* Summarize messages based on the conversation
371
+ /* Summarize messages based on the conversation
368
372
 
369
373
  Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
370
374
  export type GeneratorAssistantActionSummaryMessages = ActionWithParams & {
@@ -434,15 +438,15 @@ Default property:
434
438
  | DataLink
435
439
  /* Whether to cache messages */
436
440
  cacheMessages?: boolean | DataLink
437
- /* LLM Generator (Supports `LLM (GGML)` and `OpenAI LLM` generators) */
441
+ /* LLM Generator (Supports `LLM (GGML)`, `LLM (MLX)`, `OpenAI LLM`, `LLM (Qualcomm AI Engine)`, `LLM (ONNX)`, `LLM (Anthropic-compat)`, and `LLM (MediaTek NeuroPilot)` generators) */
438
442
  llmGeneratorId?: string | DataLink | (() => Generator)
439
- /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
443
+ /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
440
444
 
441
445
  Note: LLM (Qualcomm AI Engine) recommend use `manual` and loaded constantly. */
442
446
  llmLivePolicy?: 'only-in-use' | 'manual' | DataLink
443
447
  /* LLM main session key */
444
448
  llmSessionKey?: string | DataLink
445
- /* Auto Summary Messages (Automatically summarize messages when the LLM context is full or content gets truncated, currently only supported with LLM (GGML) generators)
449
+ /* Auto Summary Messages (Automatically summarize messages when the LLM context is full or content gets truncated, currently only supported with LLM (GGML) generators)
446
450
 
447
451
  Note: Summary uses the same LLM context size, so it is recommended only to use it when the system prompt (in Initial Messages) is long, otherwise it may still fail when the context is full (Ctx Shift is NO). */
448
452
  llmAutoSummaryMessages?: boolean | DataLink
@@ -510,41 +514,88 @@ Default property:
510
514
  }
511
515
  events?: {
512
516
  /* Error event */
513
- onError?: Array<EventAction>
517
+ onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onError']>>
514
518
  /* Log event */
515
- onLogs?: Array<EventAction>
519
+ onLogs?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onLogs']>>
516
520
  /* Messages update event */
517
- onMessagesUpdate?: Array<EventAction>
521
+ onMessagesUpdate?: Array<
522
+ EventAction<string & keyof TemplateEventPropsMap['Assistant']['onMessagesUpdate']>
523
+ >
518
524
  /* Heatup finished event */
519
525
  onHeatupFinished?: Array<EventAction>
520
526
  /* Generating event (triggered when assistant starts generating response) */
521
527
  onGenerating?: Array<EventAction>
522
528
  /* Finished event (triggered when assistant finishes generating response) */
523
- onFinished?: Array<EventAction>
529
+ onFinished?: Array<EventAction<string & keyof TemplateEventPropsMap['Assistant']['onFinished']>>
524
530
  }
525
531
  outlets?: {
526
532
  /* Whether the assistant is heating up */
527
- isHeatingUp?: () => Data
533
+ isHeatingUp?: () => Data<boolean>
528
534
  /* Whether the assistant is file processing */
529
- isFileProcessing?: () => Data
535
+ isFileProcessing?: () => Data<boolean>
530
536
  /* Whether the assistant is responding */
531
- isResponding?: () => Data
537
+ isResponding?: () => Data<boolean>
532
538
  /* Whether the assistant is busy */
533
- isBusy?: () => Data
539
+ isBusy?: () => Data<boolean>
534
540
  /* Embedding files of the assistant */
535
- files?: () => Data
541
+ files?: () => Data<Array<any>>
536
542
  /* Messages of the assistant */
537
- messages?: () => Data
543
+ messages?: () => Data<
544
+ Array<{
545
+ role?: string
546
+ name?: string
547
+ content?: any
548
+ tool_call_id?: string
549
+ tool_calls?: Array<{
550
+ id?: string
551
+ type?: string
552
+ function?: {
553
+ name?: string
554
+ arguments?: string
555
+ [key: string]: any
556
+ }
557
+ [key: string]: any
558
+ }>
559
+ reasoning_content?: string
560
+ audio?: {
561
+ generating?: boolean
562
+ [key: string]: any
563
+ }
564
+ last_generated_at?: number
565
+ responding?: boolean
566
+ is_summary?: boolean
567
+ summary_created_at?: number
568
+ [key: string]: any
569
+ }>
570
+ >
538
571
  /* MCP servers status and available tools */
539
- mcpServers?: () => Data
572
+ mcpServers?: () => Data<
573
+ Array<{
574
+ generatorId?: string
575
+ generatorKey?: string
576
+ name?: string
577
+ version?: string
578
+ connected?: boolean
579
+ error?: string
580
+ resources?: Array<{
581
+ name?: string
582
+ [key: string]: any
583
+ }>
584
+ tools?: Array<{
585
+ name?: string
586
+ [key: string]: any
587
+ }>
588
+ [key: string]: any
589
+ }>
590
+ >
540
591
  }
541
592
  }
542
593
 
543
- /* AI Assistant */
594
+ /* Conversational AI agent orchestrating LLM (GGML/MLX/OpenAI/QNN/ONNX/Anthropic/NeuroPilot), STT, TTS, MCP tool-use, and file search (RAG) with auto-summary */
544
595
  export type GeneratorAssistant = Generator &
545
596
  GeneratorAssistantDef & {
546
597
  templateKey: 'GENERATOR_ASSISTANT'
547
- switches: Array<
598
+ switches?: Array<
548
599
  SwitchDef &
549
600
  GeneratorAssistantDef & {
550
601
  conds?: Array<{