@fugood/bricks-project 2.24.0-beta.16 → 2.24.0-beta.18

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 (84) hide show
  1. package/compile/index.ts +25 -0
  2. package/package.json +3 -3
  3. package/skills/bricks-project/rules/architecture-patterns.md +7 -0
  4. package/types/animation.ts +4 -0
  5. package/types/automation.ts +3 -0
  6. package/types/bricks/Camera.ts +32 -5
  7. package/types/bricks/GenerativeMedia.ts +5 -5
  8. package/types/bricks/Icon.ts +2 -2
  9. package/types/bricks/Image.ts +2 -2
  10. package/types/bricks/Items.ts +6 -6
  11. package/types/bricks/Lottie.ts +2 -2
  12. package/types/bricks/Maps.ts +2 -2
  13. package/types/bricks/QrCode.ts +2 -2
  14. package/types/bricks/Rect.ts +2 -2
  15. package/types/bricks/RichText.ts +2 -2
  16. package/types/bricks/Svg.ts +2 -2
  17. package/types/bricks/Text.ts +2 -2
  18. package/types/bricks/TextInput.ts +9 -5
  19. package/types/bricks/Video.ts +2 -2
  20. package/types/bricks/VideoStreaming.ts +2 -2
  21. package/types/bricks/WebView.ts +2 -2
  22. package/types/canvas.ts +2 -0
  23. package/types/common.ts +5 -0
  24. package/types/data-calc-command.ts +2 -0
  25. package/types/data-calc.ts +1 -0
  26. package/types/data.ts +2 -0
  27. package/types/generators/AlarmClock.ts +4 -4
  28. package/types/generators/Assistant.ts +52 -7
  29. package/types/generators/BleCentral.ts +11 -3
  30. package/types/generators/BlePeripheral.ts +3 -3
  31. package/types/generators/CanvasMap.ts +3 -3
  32. package/types/generators/CastlesPay.ts +2 -2
  33. package/types/generators/DataBank.ts +29 -2
  34. package/types/generators/File.ts +62 -13
  35. package/types/generators/GraphQl.ts +2 -2
  36. package/types/generators/Http.ts +25 -6
  37. package/types/generators/HttpServer.ts +4 -4
  38. package/types/generators/Information.ts +1 -1
  39. package/types/generators/Intent.ts +7 -1
  40. package/types/generators/Iterator.ts +5 -5
  41. package/types/generators/Keyboard.ts +15 -5
  42. package/types/generators/LlmAnthropicCompat.ts +9 -3
  43. package/types/generators/LlmAppleBuiltin.ts +4 -4
  44. package/types/generators/LlmGgml.ts +63 -13
  45. package/types/generators/LlmMlx.ts +5 -5
  46. package/types/generators/LlmOnnx.ts +13 -4
  47. package/types/generators/LlmOpenAiCompat.ts +19 -3
  48. package/types/generators/LlmQualcommAiEngine.ts +29 -5
  49. package/types/generators/Mcp.ts +331 -16
  50. package/types/generators/McpServer.ts +34 -7
  51. package/types/generators/MediaFlow.ts +24 -6
  52. package/types/generators/MqttBroker.ts +9 -3
  53. package/types/generators/MqttClient.ts +10 -4
  54. package/types/generators/Question.ts +4 -4
  55. package/types/generators/RealtimeTranscription.ts +69 -10
  56. package/types/generators/RerankerGgml.ts +19 -5
  57. package/types/generators/SerialPort.ts +5 -5
  58. package/types/generators/SoundPlayer.ts +1 -1
  59. package/types/generators/SoundRecorder.ts +4 -4
  60. package/types/generators/SpeechToTextGgml.ts +27 -7
  61. package/types/generators/SpeechToTextOnnx.ts +3 -3
  62. package/types/generators/SpeechToTextPlatform.ts +3 -3
  63. package/types/generators/SqLite.ts +9 -5
  64. package/types/generators/Step.ts +2 -2
  65. package/types/generators/SttAppleBuiltin.ts +4 -4
  66. package/types/generators/Tcp.ts +3 -3
  67. package/types/generators/TcpServer.ts +5 -5
  68. package/types/generators/TextToSpeechAppleBuiltin.ts +3 -3
  69. package/types/generators/TextToSpeechGgml.ts +3 -3
  70. package/types/generators/TextToSpeechOnnx.ts +3 -3
  71. package/types/generators/TextToSpeechOpenAiLike.ts +3 -3
  72. package/types/generators/ThermalPrinter.ts +4 -4
  73. package/types/generators/Tick.ts +2 -2
  74. package/types/generators/Udp.ts +8 -3
  75. package/types/generators/VadGgml.ts +34 -5
  76. package/types/generators/VadOnnx.ts +27 -4
  77. package/types/generators/VadTraditional.ts +13 -7
  78. package/types/generators/VectorStore.ts +22 -5
  79. package/types/generators/Watchdog.ts +10 -5
  80. package/types/generators/WebCrawler.ts +3 -3
  81. package/types/generators/WebRtc.ts +14 -8
  82. package/types/generators/WebSocket.ts +4 -4
  83. package/types/subspace.ts +1 -0
  84. package/utils/event-props.ts +89 -88
package/compile/index.ts CHANGED
@@ -266,6 +266,7 @@ const compileApplicationSettings = (settings: Application['settings']) => ({
266
266
  use_gemini_api_key_system_data: settings.ai.useGeminiApiKeySystemData,
267
267
  }
268
268
  : undefined,
269
+ hide_short_refs: settings?.hideShortRefs,
269
270
  })
270
271
 
271
272
  const animationTypeMap = {
@@ -385,6 +386,7 @@ function compileRunArray(run: unknown[]): unknown[] {
385
386
  const compileTestCase = (testCase: TestCase) => ({
386
387
  id: testCase.id,
387
388
  name: testCase.name,
389
+ hide_short_ref: testCase.hideShortRef,
388
390
  run: compileRunArray(testCase.run),
389
391
  exit_on_failed: testCase.exit_on_failed,
390
392
  commented: testCase.commented,
@@ -449,6 +451,7 @@ const compileAutomationTest = (
449
451
  return {
450
452
  id: testId,
451
453
  title: test.title,
454
+ hide_short_ref: test.hideShortRef,
452
455
  timeout: test.timeout,
453
456
  trigger_type: test.trigger_type,
454
457
  cron: test.cron,
@@ -476,6 +479,7 @@ const compileAutomationTestMap = (testMap: AutomationTestMap, mapId: string) =>
476
479
 
477
480
  return {
478
481
  title: testMap.title,
482
+ hide_short_ref: testMap.hideShortRef,
479
483
  createdAt: testMap.createdAt,
480
484
  map: arrayToIdMap(
481
485
  testMap.tests,
@@ -519,6 +523,7 @@ export const compile = async (app: Application) => {
519
523
  subspaceMap[subspaceId] = {
520
524
  title: subspace.title,
521
525
  description: subspace.description,
526
+ hide_short_ref: subspace.hideShortRef,
522
527
  _expanded: subspace.unexpanded
523
528
  ? {
524
529
  brick: !subspace.unexpanded.brick,
@@ -556,8 +561,10 @@ export const compile = async (app: Application) => {
556
561
  if (animation.__typename === 'Animation') {
557
562
  const animationDef = animation as AnimationDef
558
563
  map[animationId] = {
564
+ alias: animationDef.alias,
559
565
  title: animationDef.title,
560
566
  description: animationDef.description,
567
+ hide_short_ref: animationDef.hideShortRef,
561
568
  animationRunType: animationDef.runType,
562
569
  property: animationDef.property,
563
570
  type: animationTypeMap[animationDef.config.__type],
@@ -569,8 +576,10 @@ export const compile = async (app: Application) => {
569
576
  } else if (animation.__typename === 'AnimationCompose') {
570
577
  const animationDef = animation as AnimationComposeDef
571
578
  map[animationId] = {
579
+ alias: animationDef.alias,
572
580
  title: animationDef.title,
573
581
  description: animationDef.description,
582
+ hide_short_ref: animationDef.hideShortRef,
574
583
  animationRunType: animationDef.runType,
575
584
  compose_type: animationDef.composeType,
576
585
  item_list: animationDef.items.map((item, index) => {
@@ -690,8 +699,10 @@ export const compile = async (app: Application) => {
690
699
  }
691
700
  map[brickId] = {
692
701
  template_key: brick.templateKey,
702
+ alias: brick.alias,
693
703
  title: brick.title,
694
704
  description: brick.description,
705
+ hide_short_ref: brick.hideShortRef,
695
706
  property,
696
707
  animation: compileAnimations(
697
708
  brick.templateKey,
@@ -758,8 +769,10 @@ export const compile = async (app: Application) => {
758
769
  )
759
770
 
760
771
  map[canvasId] = {
772
+ alias: canvas.alias,
761
773
  title: canvas.title,
762
774
  description: canvas.description,
775
+ hide_short_ref: canvas.hideShortRef,
763
776
  property: compileProperty(
764
777
  canvas.property,
765
778
  `(canvas: ${canvasId}, subspace ${subspaceId})`,
@@ -838,8 +851,10 @@ export const compile = async (app: Application) => {
838
851
 
839
852
  map[generatorId] = {
840
853
  template_key: generator.templateKey,
854
+ alias: generator.alias,
841
855
  title: generator.title,
842
856
  description: generator.description,
857
+ hide_short_ref: generator.hideShortRef,
843
858
  local_sync: generator.localSyncRunMode
844
859
  ? {
845
860
  run_mode: generator.localSyncRunMode,
@@ -908,8 +923,10 @@ export const compile = async (app: Application) => {
908
923
  )
909
924
 
910
925
  map[dataId] = {
926
+ alias: data.alias,
911
927
  title: data.title,
912
928
  description: data.description,
929
+ hide_short_ref: data.hideShortRef,
913
930
  linked: data.metadata?.linked,
914
931
  linkedFrom: data.metadata?.linkedFrom,
915
932
  local_sync: data.localSyncUpdateMode
@@ -943,6 +960,7 @@ export const compile = async (app: Application) => {
943
960
  const calc: any = {
944
961
  title: dataCalc.title,
945
962
  description: dataCalc.description,
963
+ hide_short_ref: dataCalc.hideShortRef,
946
964
  }
947
965
  if (dataCalc.triggerMode) calc.trigger_type = dataCalc.triggerMode
948
966
  if (dataCalc.__typename === 'DataCalculationMap') {
@@ -1029,6 +1047,7 @@ export const compile = async (app: Application) => {
1029
1047
  acc[getNodeId(dataNode, 'data node', nodeIndex)] = {
1030
1048
  title: dataNode.title,
1031
1049
  description: dataNode.description,
1050
+ hide_short_ref: dataNode.hideShortRef,
1032
1051
  type: 'data-node',
1033
1052
  properties: {},
1034
1053
  in: generateInputPorts(dataNode.inputs),
@@ -1054,6 +1073,7 @@ export const compile = async (app: Application) => {
1054
1073
  acc[getNodeId(commandNode, 'command node', nodeIndex)] = {
1055
1074
  title: commandNode.title,
1056
1075
  description: commandNode.description,
1076
+ hide_short_ref: commandNode.hideShortRef,
1057
1077
  type: `command-node-${type}`,
1058
1078
  properties: {
1059
1079
  command: commandNode.__commandName,
@@ -1197,3 +1217,8 @@ export const compile = async (app: Application) => {
1197
1217
  }
1198
1218
  return config
1199
1219
  }
1220
+
1221
+ export const checkConfig = async (configPath: string) => {
1222
+ const { $ } = await import('bun')
1223
+ await $`bricks app check-config ${configPath}`
1224
+ }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.24.0-beta.16",
3
+ "version": "2.24.0-beta.18",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "typecheck": "tsc --noEmit",
7
7
  "build": "bun scripts/build.js"
8
8
  },
9
9
  "dependencies": {
10
- "@fugood/bricks-cli": "^2.24.0-beta.15",
10
+ "@fugood/bricks-cli": "^2.24.0-beta.18",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -24,5 +24,5 @@
24
24
  "peerDependencies": {
25
25
  "oxfmt": "^0.36.0"
26
26
  },
27
- "gitHead": "b024e1980b2c25797ae26e9b973497e3ee724265"
27
+ "gitHead": "c7d8e3252e72c78d8b356e3f366e24f072c12521"
28
28
  }
@@ -37,6 +37,13 @@ Built-in commands for direct state and UI changes.
37
37
  ### Data Calculation (Priority 4)
38
38
  ONLY for deriving, formatting, or aggregating values from other data. Not for orchestration, side effects, or flow control.
39
39
 
40
+ ## Entity Aliases
41
+
42
+ Set `alias` on entities to give them a stable, human-readable name:
43
+ - Code generation uses alias as the variable name (e.g., `alias: 'submitBtn'` → `export const submitBtn`)
44
+ - At runtime, devtools MCP tools accept alias instead of short ID and selectors can match by alias. Note: bricks-project does not directly interact with devtools MCP — aliases here primarily affect code generation
45
+ - Aliases must be unique across the application — duplicates are excluded from resolution
46
+
40
47
  ## Flow Decomposition
41
48
 
42
49
  When the user describes a complex flow, decompose it BEFORE writing code:
@@ -61,8 +61,10 @@ export interface AnimationDecayConfig {
61
61
  export interface AnimationDef {
62
62
  __typename: 'Animation'
63
63
  id: string
64
+ alias?: string
64
65
  title: string
65
66
  description?: string
67
+ hideShortRef?: boolean
66
68
  runType?: 'once' | 'loop'
67
69
  property:
68
70
  | 'transform.translateX'
@@ -80,8 +82,10 @@ export interface AnimationDef {
80
82
  export interface AnimationComposeDef {
81
83
  __typename: 'AnimationCompose'
82
84
  id: string
85
+ alias?: string
83
86
  title: string
84
87
  description?: string
88
+ hideShortRef?: boolean
85
89
  runType?: 'once' | 'loop'
86
90
  composeType: 'parallel' | 'sequence'
87
91
  items: Array<() => Animation>
@@ -182,6 +182,7 @@ export interface TestCase {
182
182
  __typename: 'TestCase'
183
183
  id: string
184
184
  name: string
185
+ hideShortRef?: boolean
185
186
  run: TestMethodRun
186
187
  exit_on_failed: boolean
187
188
  commented: boolean
@@ -203,6 +204,7 @@ export interface AutomationTest {
203
204
  __typename: 'AutomationTest'
204
205
  id: string
205
206
  title: string
207
+ hideShortRef?: boolean
206
208
  timeout: number
207
209
  trigger_type?: TestTriggerType
208
210
  cron?: string // Cron expression when trigger_type is 'cron'
@@ -220,6 +222,7 @@ export interface AutomationTestMap {
220
222
  __typename: 'AutomationTestMap'
221
223
  id: string
222
224
  title: string
225
+ hideShortRef?: boolean
223
226
  createdAt: number
224
227
  tests: AutomationTest[]
225
228
  }
@@ -167,15 +167,42 @@ Default property:
167
167
  }
168
168
  outlets?: {
169
169
  /* Camera device and format information */
170
- info?: () => Data
170
+ info?: () => Data<{ [key: string]: any }>
171
171
  /* Picture taken result */
172
- pictureTaken?: () => Data
172
+ pictureTaken?: () => Data<{
173
+ width?: number
174
+ height?: number
175
+ uri?: string
176
+ base64?: string
177
+ [key: string]: any
178
+ }>
173
179
  /* Record video result */
174
- recordVideo?: () => Data
180
+ recordVideo?: () => Data<{
181
+ uri?: string
182
+ [key: string]: any
183
+ }>
175
184
  /* Barcode read result */
176
- barcodeRead?: () => Data
185
+ barcodeRead?: () => Data<{
186
+ type?: string
187
+ data?: string
188
+ rawData?: string
189
+ bounds?: {
190
+ origin?: {
191
+ x?: number
192
+ y?: number
193
+ [key: string]: any
194
+ }
195
+ size?: {
196
+ width?: number
197
+ height?: number
198
+ [key: string]: any
199
+ }
200
+ [key: string]: any
201
+ }
202
+ [key: string]: any
203
+ }>
177
204
  /* Faces detected result */
178
- faceDetected?: () => Data
205
+ faceDetected?: () => Data<Array<{ [key: string]: any }>>
179
206
  }
180
207
  animation?: AnimationBasicEvents & {
181
208
  stateChange?: Animation
@@ -209,15 +209,15 @@ Default property:
209
209
  }
210
210
  outlets?: {
211
211
  /* Brick is pressing */
212
- brickPressing?: () => Data
212
+ brickPressing?: () => Data<boolean>
213
213
  /* Brick is focusing (Use TV Device with controller) */
214
- brickFocusing?: () => Data
214
+ brickFocusing?: () => Data<boolean>
215
215
  /* Generated media URL */
216
- url?: () => Data
216
+ url?: () => Data<string>
217
217
  /* Generated media error */
218
- error?: () => Data
218
+ error?: () => Data<string>
219
219
  /* Loading state */
220
- loading?: () => Data
220
+ loading?: () => Data<boolean>
221
221
  }
222
222
  animation?: AnimationBasicEvents & {
223
223
  generativeMediaOnPress?: Animation
@@ -57,9 +57,9 @@ Default property:
57
57
  }
58
58
  outlets?: {
59
59
  /* Brick is pressing */
60
- brickPressing?: () => Data
60
+ brickPressing?: () => Data<boolean>
61
61
  /* Brick is focusing (Use TV Device with controller) */
62
- brickFocusing?: () => Data
62
+ brickFocusing?: () => Data<boolean>
63
63
  }
64
64
  animation?: AnimationBasicEvents & {
65
65
  onPress?: Animation
@@ -71,9 +71,9 @@ Default property:
71
71
  }
72
72
  outlets?: {
73
73
  /* Brick is pressing */
74
- brickPressing?: () => Data
74
+ brickPressing?: () => Data<boolean>
75
75
  /* Brick is focusing (Use TV Device with controller) */
76
- brickFocusing?: () => Data
76
+ brickFocusing?: () => Data<boolean>
77
77
  }
78
78
  animation?: AnimationBasicEvents & {
79
79
  onPress?: Animation
@@ -411,17 +411,17 @@ Default property:
411
411
  }
412
412
  outlets?: {
413
413
  /* Catched error message */
414
- error?: () => Data
414
+ error?: () => Data<string>
415
415
  /* Current render mode */
416
- mode?: () => Data
416
+ mode?: () => Data<string>
417
417
  /* Current page index */
418
- pageIndex?: () => Data
418
+ pageIndex?: () => Data<number>
419
419
  /* Current page size */
420
- pageSize?: () => Data
420
+ pageSize?: () => Data<number>
421
421
  /* Selected item index of detail mode */
422
- selectedItemIndex?: () => Data
422
+ selectedItemIndex?: () => Data<number>
423
423
  /* Page is out of bound */
424
- pageIsOutOfBound?: () => Data
424
+ pageIsOutOfBound?: () => Data<boolean>
425
425
  }
426
426
  animation?: AnimationBasicEvents & {
427
427
  onPageRender?: Animation
@@ -120,9 +120,9 @@ Default property:
120
120
  }
121
121
  outlets?: {
122
122
  /* Brick is pressing */
123
- brickPressing?: () => Data
123
+ brickPressing?: () => Data<boolean>
124
124
  /* Brick is focusing (Use TV Device with controller) */
125
- brickFocusing?: () => Data
125
+ brickFocusing?: () => Data<boolean>
126
126
  }
127
127
  animation?: AnimationBasicEvents & {
128
128
  onPress?: Animation
@@ -213,9 +213,9 @@ Default property:
213
213
  }
214
214
  outlets?: {
215
215
  /* Brick is pressing */
216
- brickPressing?: () => Data
216
+ brickPressing?: () => Data<boolean>
217
217
  /* Brick is focusing (Use TV Device with controller) */
218
- brickFocusing?: () => Data
218
+ brickFocusing?: () => Data<boolean>
219
219
  }
220
220
  animation?: AnimationBasicEvents & {
221
221
  onPress?: Animation
@@ -76,9 +76,9 @@ Default property:
76
76
  }
77
77
  outlets?: {
78
78
  /* Brick is pressing */
79
- brickPressing?: () => Data
79
+ brickPressing?: () => Data<boolean>
80
80
  /* Brick is focusing (Use TV Device with controller) */
81
- brickFocusing?: () => Data
81
+ brickFocusing?: () => Data<boolean>
82
82
  }
83
83
  animation?: AnimationBasicEvents & {
84
84
  onPress?: Animation
@@ -74,9 +74,9 @@ Default property:
74
74
  }
75
75
  outlets?: {
76
76
  /* Brick is pressing */
77
- brickPressing?: () => Data
77
+ brickPressing?: () => Data<boolean>
78
78
  /* Brick is focusing (Use TV Device with controller) */
79
- brickFocusing?: () => Data
79
+ brickFocusing?: () => Data<boolean>
80
80
  }
81
81
  animation?: AnimationBasicEvents & {
82
82
  onPress?: Animation
@@ -87,9 +87,9 @@ Default property:
87
87
  }
88
88
  outlets?: {
89
89
  /* Brick is pressing */
90
- brickPressing?: () => Data
90
+ brickPressing?: () => Data<boolean>
91
91
  /* Brick is focusing (Use TV Device with controller) */
92
- brickFocusing?: () => Data
92
+ brickFocusing?: () => Data<boolean>
93
93
  }
94
94
  animation?: AnimationBasicEvents & {
95
95
  onPress?: Animation
@@ -58,9 +58,9 @@ Default property:
58
58
  }
59
59
  outlets?: {
60
60
  /* Brick is pressing */
61
- brickPressing?: () => Data
61
+ brickPressing?: () => Data<boolean>
62
62
  /* Brick is focusing (Use TV Device with controller) */
63
- brickFocusing?: () => Data
63
+ brickFocusing?: () => Data<boolean>
64
64
  }
65
65
  animation?: AnimationBasicEvents & {
66
66
  onPress?: Animation
@@ -105,9 +105,9 @@ Default property:
105
105
  }
106
106
  outlets?: {
107
107
  /* Brick is pressing */
108
- brickPressing?: () => Data
108
+ brickPressing?: () => Data<boolean>
109
109
  /* Brick is focusing (Use TV Device with controller) */
110
- brickFocusing?: () => Data
110
+ brickFocusing?: () => Data<boolean>
111
111
  }
112
112
  animation?: AnimationBasicEvents & {
113
113
  onPress?: Animation
@@ -186,15 +186,19 @@ Default property:
186
186
  }
187
187
  outlets?: {
188
188
  /* The raw input */
189
- rawInput?: () => Data
189
+ rawInput?: () => Data<any>
190
190
  /* The regex result */
191
- resultVariable?: () => Data
191
+ resultVariable?: () => Data<{ [key: string]: any }>
192
192
  /* Last key in */
193
- lastKey?: () => Data
193
+ lastKey?: () => Data<any>
194
194
  /* Selection of the TextInput (start, end, text) */
195
- selection?: () => Data
195
+ selection?: () => Data<{
196
+ start?: number
197
+ end?: number
198
+ text?: string
199
+ }>
196
200
  /* Selection text of the TextInput */
197
- selectionText?: () => Data
201
+ selectionText?: () => Data<string>
198
202
  }
199
203
  animation?: AnimationBasicEvents & {
200
204
  onFocus?: Animation
@@ -129,9 +129,9 @@ Default property:
129
129
  }
130
130
  outlets?: {
131
131
  /* Brick is pressing */
132
- brickPressing?: () => Data
132
+ brickPressing?: () => Data<boolean>
133
133
  /* Brick is focusing (Use TV Device with controller) */
134
- brickFocusing?: () => Data
134
+ brickFocusing?: () => Data<boolean>
135
135
  }
136
136
  animation?: AnimationBasicEvents & {
137
137
  onPress?: Animation
@@ -68,9 +68,9 @@ Default property:
68
68
  }
69
69
  outlets?: {
70
70
  /* Brick is pressing */
71
- brickPressing?: () => Data
71
+ brickPressing?: () => Data<boolean>
72
72
  /* Brick is focusing (Use TV Device with controller) */
73
- brickFocusing?: () => Data
73
+ brickFocusing?: () => Data<boolean>
74
74
  }
75
75
  animation?: AnimationBasicEvents & {
76
76
  onPress?: Animation
@@ -130,9 +130,9 @@ Default property:
130
130
  }
131
131
  outlets?: {
132
132
  /* The result of the query selector action */
133
- queryResult?: () => Data
133
+ queryResult?: () => Data<any>
134
134
  /* The error of the query selector action */
135
- queryError?: () => Data
135
+ queryError?: () => Data<string>
136
136
  }
137
137
  animation?: AnimationBasicEvents & {
138
138
  onLoad?: Animation
package/types/canvas.ts CHANGED
@@ -36,8 +36,10 @@ interface CanvasDef {
36
36
  export type Canvas = CanvasDef & {
37
37
  __typename: 'Canvas'
38
38
  id: string
39
+ alias?: string
39
40
  title?: string
40
41
  description?: string
42
+ hideShortRef?: boolean
41
43
  switches?: Array<
42
44
  SwitchDef &
43
45
  CanvasDef & {
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
11
  title?: string
11
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
31
  title?: string
29
32
  description?: string
33
+ hideShortRef?: boolean
30
34
  localSyncRunMode?: LocalSyncStrategy
31
35
  property?: {}
32
36
  events: {}
@@ -121,6 +125,7 @@ export type ApplicationSettings = {
121
125
  useOpenAiApiKeySystemData?: boolean
122
126
  useGeminiApiKeySystemData?: boolean
123
127
  }
128
+ hideShortRefs?: boolean
124
129
  }
125
130
 
126
131
  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
@@ -71,13 +71,13 @@ Default property:
71
71
  }
72
72
  outlets?: {
73
73
  /* Current time of each alarm clock trig */
74
- trigTime?: () => Data
74
+ trigTime?: () => Data<string>
75
75
  /* Current timestamp (unix time) of each alarm clock trig */
76
- trigTimestamp?: () => Data
76
+ trigTimestamp?: () => Data<string | number>
77
77
  /* Count of alarm clock trigs */
78
- trigCount?: () => Data
78
+ trigCount?: () => Data<string | number>
79
79
  /* Is alarm clock running? */
80
- running?: () => Data
80
+ running?: () => Data<boolean | string | number>
81
81
  }
82
82
  }
83
83
 
@@ -524,19 +524,64 @@ Default property:
524
524
  }
525
525
  outlets?: {
526
526
  /* Whether the assistant is heating up */
527
- isHeatingUp?: () => Data
527
+ isHeatingUp?: () => Data<boolean>
528
528
  /* Whether the assistant is file processing */
529
- isFileProcessing?: () => Data
529
+ isFileProcessing?: () => Data<boolean>
530
530
  /* Whether the assistant is responding */
531
- isResponding?: () => Data
531
+ isResponding?: () => Data<boolean>
532
532
  /* Whether the assistant is busy */
533
- isBusy?: () => Data
533
+ isBusy?: () => Data<boolean>
534
534
  /* Embedding files of the assistant */
535
- files?: () => Data
535
+ files?: () => Data<Array<any>>
536
536
  /* Messages of the assistant */
537
- messages?: () => Data
537
+ messages?: () => Data<
538
+ Array<{
539
+ role?: string
540
+ name?: string
541
+ content?: any
542
+ tool_call_id?: string
543
+ tool_calls?: Array<{
544
+ id?: string
545
+ type?: string
546
+ function?: {
547
+ name?: string
548
+ arguments?: string
549
+ [key: string]: any
550
+ }
551
+ [key: string]: any
552
+ }>
553
+ reasoning_content?: string
554
+ audio?: {
555
+ generating?: boolean
556
+ [key: string]: any
557
+ }
558
+ last_generated_at?: number
559
+ responding?: boolean
560
+ is_summary?: boolean
561
+ summary_created_at?: number
562
+ [key: string]: any
563
+ }>
564
+ >
538
565
  /* MCP servers status and available tools */
539
- mcpServers?: () => Data
566
+ mcpServers?: () => Data<
567
+ Array<{
568
+ generatorId?: string
569
+ generatorKey?: string
570
+ name?: string
571
+ version?: string
572
+ connected?: boolean
573
+ error?: string
574
+ resources?: Array<{
575
+ name?: string
576
+ [key: string]: any
577
+ }>
578
+ tools?: Array<{
579
+ name?: string
580
+ [key: string]: any
581
+ }>
582
+ [key: string]: any
583
+ }>
584
+ >
540
585
  }
541
586
  }
542
587