@fugood/bricks-project 2.24.0-beta.7 → 2.24.0-beta.9

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 (80) hide show
  1. package/package.json +3 -3
  2. package/skills/bricks-project/rules/automations.md +68 -22
  3. package/types/bricks/Camera.ts +1 -1
  4. package/types/bricks/Chart.ts +1 -1
  5. package/types/bricks/GenerativeMedia.ts +1 -1
  6. package/types/bricks/Icon.ts +1 -1
  7. package/types/bricks/Image.ts +1 -1
  8. package/types/bricks/Items.ts +1 -1
  9. package/types/bricks/Lottie.ts +1 -1
  10. package/types/bricks/Maps.ts +1 -1
  11. package/types/bricks/QrCode.ts +1 -1
  12. package/types/bricks/Rect.ts +1 -1
  13. package/types/bricks/RichText.ts +1 -1
  14. package/types/bricks/Rive.ts +1 -1
  15. package/types/bricks/Slideshow.ts +1 -1
  16. package/types/bricks/Svg.ts +1 -1
  17. package/types/bricks/Text.ts +1 -1
  18. package/types/bricks/TextInput.ts +1 -1
  19. package/types/bricks/Video.ts +1 -1
  20. package/types/bricks/VideoStreaming.ts +1 -1
  21. package/types/bricks/WebRtcStream.ts +1 -1
  22. package/types/bricks/WebView.ts +1 -1
  23. package/types/canvas.ts +2 -2
  24. package/types/common.ts +4 -4
  25. package/types/generators/AlarmClock.ts +1 -1
  26. package/types/generators/Assistant.ts +1 -1
  27. package/types/generators/BleCentral.ts +1 -1
  28. package/types/generators/BlePeripheral.ts +1 -1
  29. package/types/generators/CanvasMap.ts +1 -1
  30. package/types/generators/CastlesPay.ts +1 -1
  31. package/types/generators/DataBank.ts +1 -1
  32. package/types/generators/File.ts +1 -1
  33. package/types/generators/GraphQl.ts +1 -1
  34. package/types/generators/Http.ts +1 -1
  35. package/types/generators/HttpServer.ts +1 -1
  36. package/types/generators/Information.ts +1 -1
  37. package/types/generators/Intent.ts +1 -1
  38. package/types/generators/Iterator.ts +1 -1
  39. package/types/generators/Keyboard.ts +1 -1
  40. package/types/generators/LlmAnthropicCompat.ts +1 -1
  41. package/types/generators/LlmAppleBuiltin.ts +1 -1
  42. package/types/generators/LlmGgml.ts +1 -1
  43. package/types/generators/LlmOnnx.ts +1 -1
  44. package/types/generators/LlmOpenAiCompat.ts +1 -1
  45. package/types/generators/LlmQualcommAiEngine.ts +1 -1
  46. package/types/generators/Mcp.ts +1 -1
  47. package/types/generators/McpServer.ts +1 -1
  48. package/types/generators/MediaFlow.ts +1 -1
  49. package/types/generators/MqttBroker.ts +1 -1
  50. package/types/generators/MqttClient.ts +1 -1
  51. package/types/generators/Question.ts +1 -1
  52. package/types/generators/RealtimeTranscription.ts +1 -1
  53. package/types/generators/RerankerGgml.ts +1 -1
  54. package/types/generators/SerialPort.ts +1 -1
  55. package/types/generators/SoundPlayer.ts +1 -1
  56. package/types/generators/SoundRecorder.ts +1 -1
  57. package/types/generators/SpeechToTextGgml.ts +1 -1
  58. package/types/generators/SpeechToTextOnnx.ts +1 -1
  59. package/types/generators/SpeechToTextPlatform.ts +1 -1
  60. package/types/generators/SqLite.ts +1 -1
  61. package/types/generators/Step.ts +1 -1
  62. package/types/generators/SttAppleBuiltin.ts +1 -1
  63. package/types/generators/Tcp.ts +1 -1
  64. package/types/generators/TcpServer.ts +1 -1
  65. package/types/generators/TextToSpeechAppleBuiltin.ts +1 -1
  66. package/types/generators/TextToSpeechGgml.ts +1 -1
  67. package/types/generators/TextToSpeechOnnx.ts +1 -1
  68. package/types/generators/TextToSpeechOpenAiLike.ts +1 -1
  69. package/types/generators/ThermalPrinter.ts +1 -1
  70. package/types/generators/Tick.ts +1 -1
  71. package/types/generators/Udp.ts +1 -1
  72. package/types/generators/VadGgml.ts +1 -1
  73. package/types/generators/VadOnnx.ts +1 -1
  74. package/types/generators/VadTraditional.ts +1 -1
  75. package/types/generators/VectorStore.ts +1 -1
  76. package/types/generators/Watchdog.ts +1 -1
  77. package/types/generators/WebCrawler.ts +1 -1
  78. package/types/generators/WebRtc.ts +1 -1
  79. package/types/generators/WebSocket.ts +1 -1
  80. package/utils/id.ts +4 -0
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.24.0-beta.7",
3
+ "version": "2.24.0-beta.9",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "bun scripts/build.js"
7
7
  },
8
8
  "dependencies": {
9
- "@fugood/bricks-cli": "^2.24.0-beta.7",
9
+ "@fugood/bricks-cli": "^2.24.0-beta.8",
10
10
  "@huggingface/gguf": "^0.3.2",
11
11
  "@iarna/toml": "^3.0.0",
12
12
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -19,5 +19,5 @@
19
19
  "lodash": "^4.17.4",
20
20
  "uuid": "^8.3.1"
21
21
  },
22
- "gitHead": "f65832e45dc04049f9fa91e55109e72ebc438d11"
22
+ "gitHead": "e95218456eba0a34caafc17f3ffdd74035695c8b"
23
23
  }
@@ -4,15 +4,16 @@ E2E testing and scheduled execution for BRICKS applications. Simulates user beha
4
4
 
5
5
  ## Automation Types
6
6
 
7
- | Type | Description |
8
- |------|-------------|
9
- | `launch` | Run on application launch (restarts app when run manually) |
10
- | `anytime` | Execute anytime via manual trigger |
11
- | `cron` | Scheduled execution using crontab expressions |
7
+ | Type | Description |
8
+ | --------- | ---------------------------------------------------------- |
9
+ | `launch` | Run on application launch (restarts app when run manually) |
10
+ | `anytime` | Execute anytime via manual trigger |
11
+ | `cron` | Scheduled execution using crontab expressions |
12
12
 
13
13
  ## Simulation Actions
14
14
 
15
15
  Automations can simulate:
16
+
16
17
  - **Brick Press**: Tap/click on bricks
17
18
  - **Key Events**: Key up/down for keyboard input
18
19
  - **HTTP Request**: API calls
@@ -21,6 +22,7 @@ Automations can simulate:
21
22
  ## Assertions
22
23
 
23
24
  Automations can validate:
25
+
24
26
  - **Brick Exists**: Check if brick is rendered
25
27
  - **Event Triggered**: Verify event from Brick/Generator/Canvas
26
28
  - **Canvas Changed**: Confirm canvas navigation
@@ -100,25 +102,58 @@ const testLoginFlow: AutomationTest = {
100
102
 
101
103
  ## Test Methods
102
104
 
103
- | Method | Signature | Description |
104
- |--------|-----------|-------------|
105
- | `brick_press` | `[subspace, brick, options?]` | Simulate brick press |
106
- | `brick_exists` | `[subspace, brick, frame?]` | Check brick exists |
107
- | `wait_until_brick_exists` | `[subspace, brick, timeout?, frame?]` | Wait for brick |
108
- | `wait_until_event_trigger` | `[subspace, sender, eventKey, timeout?]` | Wait for event |
109
- | `wait_until_canvas_change` | `[subspace, canvas, timeout?]` | Wait for canvas |
110
- | `keydown` | `[keyCode, pressedKey?, flags?]` | Key down event |
111
- | `keyup` | `[keyCode, pressedKey?, flags?]` | Key up event |
112
- | `http_request` | `[url, options?]` | HTTP request |
113
- | `assert_property` | `[subspace, property, value]` | Assert data value |
114
- | `wait_until_property_change` | `[subspace, property, value, timeout?]` | Wait for value |
115
- | `execute_action` | `[subspace, handler, action, params?, options?]` | Execute action |
116
- | `match_screenshot` | `[name, threshold?, maxRetry?]` | Screenshot compare |
117
- | `delay` | `[subspace?, property?, defaultValue?]` | Delay execution |
105
+ | Method | Signature | Description |
106
+ | ---------------------------- | ------------------------------------------------ | -------------------- |
107
+ | `brick_press` | `[subspace, brick, options?]` | Simulate brick press |
108
+ | `brick_exists` | `[subspace, brick, frame?]` | Check brick exists |
109
+ | `wait_until_brick_exists` | `[subspace, brick, timeout?, frame?]` | Wait for brick |
110
+ | `wait_until_event_trigger` | `[subspace, sender, eventKey, timeout?]` | Wait for event |
111
+ | `wait_until_canvas_change` | `[subspace, canvas, timeout?]` | Wait for canvas |
112
+ | `keydown` | `[keyCode, pressedKey?, flags?]` | Key down event |
113
+ | `keyup` | `[keyCode, pressedKey?, flags?]` | Key up event |
114
+ | `http_request` | `[url, options?]` | HTTP request |
115
+ | `assert_property` | `[subspace, property, value]` | Assert data value |
116
+ | `wait_until_property_change` | `[subspace, property, value, timeout?]` | Wait for value |
117
+ | `execute_action` | `[subspace, handler, action, params?, options?]` | Execute action |
118
+ | `match_screenshot` | `[name, threshold?, maxRetry?]` | Screenshot compare |
119
+ | `delay` | `[subspace?, property?, defaultValue?]` | Delay execution |
120
+
121
+ ### execute_action Params
122
+
123
+ The `params` object in `execute_action` uses **runtime event property keys** from `event-props.ts`, NOT the action config `input` names from type definitions.
124
+
125
+ ```typescript
126
+ // CORRECT — use runtime event property key
127
+ run: ['execute_action', () => subspace0, bricks.bInput.id, 'BRICK_TEXT_INPUT_SET_TEXT',
128
+ { BRICK_TEXT_INPUT_TEXT: 'hello' }]
129
+
130
+ // WRONG — action config input name doesn't work in automation
131
+ run: ['execute_action', () => subspace0, bricks.bInput.id, 'BRICK_TEXT_INPUT_SET_TEXT',
132
+ { text: 'hello' }]
133
+ ```
134
+
135
+ Reference `event-props.ts` for the correct runtime keys (e.g., `BRICK_TEXT_INPUT_TEXT`, `GENERATOR_MQTT_PAYLOAD`).
136
+
137
+ ### Prefer UI Interactions Over Direct Generator Calls
138
+
139
+ For realistic E2E testing, prefer simulating user actions (set text input + press button) over calling generator actions directly:
140
+
141
+ ```typescript
142
+ // GOOD — simulates real user behavior
143
+ { run: ['execute_action', () => sub, bricks.bInput.id, 'BRICK_TEXT_INPUT_SET_TEXT',
144
+ { BRICK_TEXT_INPUT_TEXT: 'hello' }] },
145
+ { run: ['brick_press', () => sub, () => bricks.bSendBtn] },
146
+ { run: ['wait_until_property_change', () => sub, () => data.dPayload, 'hello', 10000] },
147
+
148
+ // AVOID — bypasses UI, doesn't test the full flow
149
+ { run: ['execute_action', () => sub, generators.gClient.id, 'GENERATOR_MQTT_PUBLISH',
150
+ { topic: 'test', payload: 'hello', qos: '0' }] },
151
+ ```
118
152
 
119
153
  ## Recording Automations
120
154
 
121
155
  In BRICKS Editor Preview mode:
156
+
122
157
  1. Perform operations normally
123
158
  2. Open menu (right-bottom corner)
124
159
  3. Select "Record Events as Automation"
@@ -127,12 +162,15 @@ In BRICKS Editor Preview mode:
127
162
  ## Running Automations
128
163
 
129
164
  ### Manual Run
165
+
130
166
  `Menu` → `Automations` → Select automation → `Run`
131
167
 
132
168
  ### On Launch
169
+
133
170
  `Bind Device` → `Select Automation` (only `launch` or `cron` types)
134
171
 
135
172
  ### Scheduled (Cron)
173
+
136
174
  `Bind Device` → `Cron Automation` (allows multi-select)
137
175
 
138
176
  Use [crontab.guru](https://crontab.guru) to build cron expressions.
@@ -144,7 +182,7 @@ Visual regression testing with screenshot comparison:
144
182
  ```typescript
145
183
  {
146
184
  __typename: 'TestCase',
147
- id: 'screenshot-dashboard',
185
+ id: makeId('test_case'),
148
186
  name: 'Match dashboard screenshot',
149
187
  run: ['match_screenshot', 'dashboard-initial-state', 0.01, 3],
150
188
  exit_on_failed: true,
@@ -156,6 +194,7 @@ Visual regression testing with screenshot comparison:
156
194
  ```
157
195
 
158
196
  Screenshots can be stored:
197
+
159
198
  - Local file system
160
199
  - Media Flow workspace
161
200
 
@@ -165,11 +204,18 @@ First run captures baseline. Use "Run with Update" to update baseline.
165
204
 
166
205
  Automations work with Modules. Use Manual Run in Preview mode for module testing.
167
206
 
207
+ ## Important Notes
208
+
209
+ - **Automation map key**: Always use `'AUTOMATION_MAP_DEFAULT'` as the automation map ID (not `makeId()`). The preview test runner reads from `automationMap['AUTOMATION_MAP_DEFAULT']?.map`.
210
+ - **Valid makeId types**: Use `'test'` for AutomationTest, `'test_case'` for TestCase, `'test_var'` for TestVariable. Do NOT use `'automation_test'` or `'automation_test_map'`.
211
+ - **handler in execute_action**: Pass the entity's `.id` string (e.g., `bricks.bInput.id`), not a getter function.
212
+
168
213
  ## Best Practices
169
214
 
170
215
  1. **Test culture**: Create automations for every significant flow
171
216
  2. **CI/CD integration**: Use `launch` automations for deployment validation
172
- 3. **Incremental waits**: Use `EXPECT_*` steps with appropriate timeouts
217
+ 3. **Incremental waits**: Use `wait_until_property_change` with appropriate timeouts
173
218
  4. **Visual testing**: Add screenshot comparisons for critical UI states
174
219
  5. **Cron monitoring**: Schedule health checks for production displays
175
220
  6. **Isolation**: Each automation should be independent and idempotent
221
+ 7. **UI-first testing**: Simulate real user interactions (text input, button press) rather than calling generators directly
@@ -192,7 +192,7 @@ Default property:
192
192
  export type BrickCamera = Brick &
193
193
  BrickCameraDef & {
194
194
  templateKey: 'BRICK_CAMERA'
195
- switches: Array<
195
+ switches?: Array<
196
196
  SwitchDef &
197
197
  BrickCameraDef & {
198
198
  conds?: Array<{
@@ -347,7 +347,7 @@ Default property:
347
347
  export type BrickChart = Brick &
348
348
  BrickChartDef & {
349
349
  templateKey: 'BRICK_CHART'
350
- switches: Array<
350
+ switches?: Array<
351
351
  SwitchDef &
352
352
  BrickChartDef & {
353
353
  conds?: Array<{
@@ -241,7 +241,7 @@ Default property:
241
241
  export type GenerativeMedia = Brick &
242
242
  GenerativeMediaDef & {
243
243
  templateKey: 'BRICK_GENERATIVE_MEDIA'
244
- switches: Array<
244
+ switches?: Array<
245
245
  SwitchDef &
246
246
  GenerativeMediaDef & {
247
247
  conds?: Array<{
@@ -75,7 +75,7 @@ Default property:
75
75
  export type BrickIcon = Brick &
76
76
  BrickIconDef & {
77
77
  templateKey: 'BRICK_ICON'
78
- switches: Array<
78
+ switches?: Array<
79
79
  SwitchDef &
80
80
  BrickIconDef & {
81
81
  conds?: Array<{
@@ -91,7 +91,7 @@ Default property:
91
91
  export type BrickImage = Brick &
92
92
  BrickImageDef & {
93
93
  templateKey: 'BRICK_IMAGE'
94
- switches: Array<
94
+ switches?: Array<
95
95
  SwitchDef &
96
96
  BrickImageDef & {
97
97
  conds?: Array<{
@@ -437,7 +437,7 @@ Default property:
437
437
  export type BrickItems = Brick &
438
438
  BrickItemsDef & {
439
439
  templateKey: 'BRICK_ITEMS'
440
- switches: Array<
440
+ switches?: Array<
441
441
  SwitchDef &
442
442
  BrickItemsDef & {
443
443
  conds?: Array<{
@@ -141,7 +141,7 @@ Default property:
141
141
  export type BrickLottie = Brick &
142
142
  BrickLottieDef & {
143
143
  templateKey: 'BRICK_LOTTIE'
144
- switches: Array<
144
+ switches?: Array<
145
145
  SwitchDef &
146
146
  BrickLottieDef & {
147
147
  conds?: Array<{
@@ -235,7 +235,7 @@ Default property:
235
235
  export type BrickMaps = Brick &
236
236
  BrickMapsDef & {
237
237
  templateKey: 'BRICK_MAPS'
238
- switches: Array<
238
+ switches?: Array<
239
239
  SwitchDef &
240
240
  BrickMapsDef & {
241
241
  conds?: Array<{
@@ -94,7 +94,7 @@ Default property:
94
94
  export type BrickQrcode = Brick &
95
95
  BrickQrcodeDef & {
96
96
  templateKey: 'BRICK_QRCODE'
97
- switches: Array<
97
+ switches?: Array<
98
98
  SwitchDef &
99
99
  BrickQrcodeDef & {
100
100
  conds?: Array<{
@@ -92,7 +92,7 @@ Default property:
92
92
  export type BrickRect = Brick &
93
93
  BrickRectDef & {
94
94
  templateKey: 'BRICK_RECT'
95
- switches: Array<
95
+ switches?: Array<
96
96
  SwitchDef &
97
97
  BrickRectDef & {
98
98
  conds?: Array<{
@@ -105,7 +105,7 @@ Default property:
105
105
  export type BrickRichText = Brick &
106
106
  BrickRichTextDef & {
107
107
  templateKey: 'BRICK_RICH_TEXT'
108
- switches: Array<
108
+ switches?: Array<
109
109
  SwitchDef &
110
110
  BrickRichTextDef & {
111
111
  conds?: Array<{
@@ -191,7 +191,7 @@ Default property:
191
191
  export type BrickRive = Brick &
192
192
  BrickRiveDef & {
193
193
  templateKey: 'BRICK_RIVE'
194
- switches: Array<
194
+ switches?: Array<
195
195
  SwitchDef &
196
196
  BrickRiveDef & {
197
197
  conds?: Array<{
@@ -172,7 +172,7 @@ Default property:
172
172
  export type BrickSlideshow = Brick &
173
173
  BrickSlideshowDef & {
174
174
  templateKey: 'BRICK_SLIDESHOW'
175
- switches: Array<
175
+ switches?: Array<
176
176
  SwitchDef &
177
177
  BrickSlideshowDef & {
178
178
  conds?: Array<{
@@ -76,7 +76,7 @@ Default property:
76
76
  export type BrickSvg = Brick &
77
77
  BrickSvgDef & {
78
78
  templateKey: 'BRICK_SVG'
79
- switches: Array<
79
+ switches?: Array<
80
80
  SwitchDef &
81
81
  BrickSvgDef & {
82
82
  conds?: Array<{
@@ -125,7 +125,7 @@ Default property:
125
125
  export type BrickText = Brick &
126
126
  BrickTextDef & {
127
127
  templateKey: 'BRICK_TEXT'
128
- switches: Array<
128
+ switches?: Array<
129
129
  SwitchDef &
130
130
  BrickTextDef & {
131
131
  conds?: Array<{
@@ -213,7 +213,7 @@ Default property:
213
213
  export type BrickTextInput = Brick &
214
214
  BrickTextInputDef & {
215
215
  templateKey: 'BRICK_TEXT_INPUT'
216
- switches: Array<
216
+ switches?: Array<
217
217
  SwitchDef &
218
218
  BrickTextInputDef & {
219
219
  conds?: Array<{
@@ -152,7 +152,7 @@ Default property:
152
152
  export type BrickVideo = Brick &
153
153
  BrickVideoDef & {
154
154
  templateKey: 'BRICK_VIDEO'
155
- switches: Array<
155
+ switches?: Array<
156
156
  SwitchDef &
157
157
  BrickVideoDef & {
158
158
  conds?: Array<{
@@ -89,7 +89,7 @@ Default property:
89
89
  export type BrickVideoStreaming = Brick &
90
90
  BrickVideoStreamingDef & {
91
91
  templateKey: 'BRICK_VIDEO_STREAMING'
92
- switches: Array<
92
+ switches?: Array<
93
93
  SwitchDef &
94
94
  BrickVideoStreamingDef & {
95
95
  conds?: Array<{
@@ -42,7 +42,7 @@ Default property:
42
42
  export type BrickWebRTCStream = Brick &
43
43
  BrickWebRTCStreamDef & {
44
44
  templateKey: 'BRICK_WEBRTC_STREAM'
45
- switches: Array<
45
+ switches?: Array<
46
46
  SwitchDef &
47
47
  BrickWebRTCStreamDef & {
48
48
  conds?: Array<{
@@ -145,7 +145,7 @@ Default property:
145
145
  export type BrickWebView = Brick &
146
146
  BrickWebViewDef & {
147
147
  templateKey: 'BRICK_WEBVIEW'
148
- switches: Array<
148
+ switches?: Array<
149
149
  SwitchDef &
150
150
  BrickWebViewDef & {
151
151
  conds?: Array<{
package/types/canvas.ts CHANGED
@@ -36,9 +36,9 @@ interface CanvasDef {
36
36
  export type Canvas = CanvasDef & {
37
37
  __typename: 'Canvas'
38
38
  id: string
39
- title: string
39
+ title?: string
40
40
  description?: string
41
- switches: Array<
41
+ switches?: Array<
42
42
  SwitchDef &
43
43
  CanvasDef & {
44
44
  conds?: Array<{
package/types/common.ts CHANGED
@@ -7,8 +7,8 @@ export interface Brick {
7
7
  __typename: 'Brick'
8
8
  id: string
9
9
  templateKey: string
10
- title: string
11
- description: string
10
+ title?: string
11
+ description?: string
12
12
  property?: {}
13
13
  events: {}
14
14
  outlets?: {}
@@ -25,8 +25,8 @@ export interface Generator {
25
25
  __typename: 'Generator'
26
26
  id: string
27
27
  templateKey: string
28
- title: string
29
- description: string
28
+ title?: string
29
+ description?: string
30
30
  localSyncRunMode?: LocalSyncStrategy
31
31
  property?: {}
32
32
  events: {}
@@ -85,7 +85,7 @@ Default property:
85
85
  export type GeneratorAlarmClock = Generator &
86
86
  GeneratorAlarmClockDef & {
87
87
  templateKey: 'GENERATOR_ALARM_CLOCK'
88
- switches: Array<
88
+ switches?: Array<
89
89
  SwitchDef &
90
90
  GeneratorAlarmClockDef & {
91
91
  conds?: Array<{
@@ -544,7 +544,7 @@ Default property:
544
544
  export type GeneratorAssistant = Generator &
545
545
  GeneratorAssistantDef & {
546
546
  templateKey: 'GENERATOR_ASSISTANT'
547
- switches: Array<
547
+ switches?: Array<
548
548
  SwitchDef &
549
549
  GeneratorAssistantDef & {
550
550
  conds?: Array<{
@@ -208,7 +208,7 @@ Default property:
208
208
  export type GeneratorBleCentral = Generator &
209
209
  GeneratorBleCentralDef & {
210
210
  templateKey: 'GENERATOR_BLE_CENTRAL'
211
- switches: Array<
211
+ switches?: Array<
212
212
  SwitchDef &
213
213
  GeneratorBleCentralDef & {
214
214
  conds?: Array<{
@@ -185,7 +185,7 @@ Default property:
185
185
  export type GeneratorBlePeripheral = Generator &
186
186
  GeneratorBlePeripheralDef & {
187
187
  templateKey: 'GENERATOR_BLE_PERIPHERAL'
188
- switches: Array<
188
+ switches?: Array<
189
189
  SwitchDef &
190
190
  GeneratorBlePeripheralDef & {
191
191
  conds?: Array<{
@@ -51,7 +51,7 @@ Default property:
51
51
  export type GeneratorCanvasMap = Generator &
52
52
  GeneratorCanvasMapDef & {
53
53
  templateKey: 'GENERATOR_CANVAS_MAP'
54
- switches: Array<
54
+ switches?: Array<
55
55
  SwitchDef &
56
56
  GeneratorCanvasMapDef & {
57
57
  conds?: Array<{
@@ -60,7 +60,7 @@ Default property:
60
60
  export type GeneratorCastlesPay = Generator &
61
61
  GeneratorCastlesPayDef & {
62
62
  templateKey: 'GENERATOR_CASTLES_PAY'
63
- switches: Array<
63
+ switches?: Array<
64
64
  SwitchDef &
65
65
  GeneratorCastlesPayDef & {
66
66
  conds?: Array<{
@@ -106,7 +106,7 @@ Default property:
106
106
  export type GeneratorDataBank = Generator &
107
107
  GeneratorDataBankDef & {
108
108
  templateKey: 'GENERATOR_DATA_BANK'
109
- switches: Array<
109
+ switches?: Array<
110
110
  SwitchDef &
111
111
  GeneratorDataBankDef & {
112
112
  conds?: Array<{
@@ -321,7 +321,7 @@ Default property:
321
321
  export type GeneratorFile = Generator &
322
322
  GeneratorFileDef & {
323
323
  templateKey: 'GENERATOR_FILE'
324
- switches: Array<
324
+ switches?: Array<
325
325
  SwitchDef &
326
326
  GeneratorFileDef & {
327
327
  conds?: Array<{
@@ -107,7 +107,7 @@ Default property:
107
107
  export type GeneratorGraphQL = Generator &
108
108
  GeneratorGraphQLDef & {
109
109
  templateKey: 'GENERATOR_GRAPHQL'
110
- switches: Array<
110
+ switches?: Array<
111
111
  SwitchDef &
112
112
  GeneratorGraphQLDef & {
113
113
  conds?: Array<{
@@ -174,7 +174,7 @@ Default property:
174
174
  export type GeneratorHTTP = Generator &
175
175
  GeneratorHTTPDef & {
176
176
  templateKey: 'GENERATOR_HTTP'
177
- switches: Array<
177
+ switches?: Array<
178
178
  SwitchDef &
179
179
  GeneratorHTTPDef & {
180
180
  conds?: Array<{
@@ -149,7 +149,7 @@ Default property:
149
149
  export type GeneratorHTTPServer = Generator &
150
150
  GeneratorHTTPServerDef & {
151
151
  templateKey: 'GENERATOR_HTTP_SERVER'
152
- switches: Array<
152
+ switches?: Array<
153
153
  SwitchDef &
154
154
  GeneratorHTTPServerDef & {
155
155
  conds?: Array<{
@@ -80,7 +80,7 @@ Default property:
80
80
  export type GeneratorInformation = Generator &
81
81
  GeneratorInformationDef & {
82
82
  templateKey: 'GENERATOR_INFORMATION'
83
- switches: Array<
83
+ switches?: Array<
84
84
  SwitchDef &
85
85
  GeneratorInformationDef & {
86
86
  conds?: Array<{
@@ -139,7 +139,7 @@ Default property:
139
139
  export type GeneratorIntent = Generator &
140
140
  GeneratorIntentDef & {
141
141
  templateKey: 'GENERATOR_INTENT'
142
- switches: Array<
142
+ switches?: Array<
143
143
  SwitchDef &
144
144
  GeneratorIntentDef & {
145
145
  conds?: Array<{
@@ -85,7 +85,7 @@ Default property:
85
85
  export type GeneratorIterator = Generator &
86
86
  GeneratorIteratorDef & {
87
87
  templateKey: 'GENERATOR_ITERATOR'
88
- switches: Array<
88
+ switches?: Array<
89
89
  SwitchDef &
90
90
  GeneratorIteratorDef & {
91
91
  conds?: Array<{
@@ -67,7 +67,7 @@ Default property:
67
67
  export type GeneratorKeyboard = Generator &
68
68
  GeneratorKeyboardDef & {
69
69
  templateKey: 'GENERATOR_KEYBOARD'
70
- switches: Array<
70
+ switches?: Array<
71
71
  SwitchDef &
72
72
  GeneratorKeyboardDef & {
73
73
  conds?: Array<{
@@ -171,7 +171,7 @@ Default property:
171
171
  export type GeneratorAnthropicLLM = Generator &
172
172
  GeneratorAnthropicLLMDef & {
173
173
  templateKey: 'GENERATOR_ANTHROPIC_LLM'
174
- switches: Array<
174
+ switches?: Array<
175
175
  SwitchDef &
176
176
  GeneratorAnthropicLLMDef & {
177
177
  conds?: Array<{
@@ -121,7 +121,7 @@ Default property:
121
121
  export type GeneratorAppleLLM = Generator &
122
122
  GeneratorAppleLLMDef & {
123
123
  templateKey: 'GENERATOR_APPLE_LLM'
124
- switches: Array<
124
+ switches?: Array<
125
125
  SwitchDef &
126
126
  GeneratorAppleLLMDef & {
127
127
  conds?: Array<{
@@ -720,7 +720,7 @@ Default property:
720
720
  export type GeneratorLLM = Generator &
721
721
  GeneratorLLMDef & {
722
722
  templateKey: 'GENERATOR_LLM'
723
- switches: Array<
723
+ switches?: Array<
724
724
  SwitchDef &
725
725
  GeneratorLLMDef & {
726
726
  conds?: Array<{
@@ -174,7 +174,7 @@ Default property:
174
174
  export type GeneratorOnnxLLM = Generator &
175
175
  GeneratorOnnxLLMDef & {
176
176
  templateKey: 'GENERATOR_ONNX_LLM'
177
- switches: Array<
177
+ switches?: Array<
178
178
  SwitchDef &
179
179
  GeneratorOnnxLLMDef & {
180
180
  conds?: Array<{
@@ -189,7 +189,7 @@ Default property:
189
189
  export type GeneratorOpenAILLM = Generator &
190
190
  GeneratorOpenAILLMDef & {
191
191
  templateKey: 'GENERATOR_OPENAI_LLM'
192
- switches: Array<
192
+ switches?: Array<
193
193
  SwitchDef &
194
194
  GeneratorOpenAILLMDef & {
195
195
  conds?: Array<{
@@ -191,7 +191,7 @@ Default property:
191
191
  export type GeneratorQnnLlm = Generator &
192
192
  GeneratorQnnLlmDef & {
193
193
  templateKey: 'GENERATOR_QNN_LLM'
194
- switches: Array<
194
+ switches?: Array<
195
195
  SwitchDef &
196
196
  GeneratorQnnLlmDef & {
197
197
  conds?: Array<{
@@ -261,7 +261,7 @@ Default property:
261
261
  export type GeneratorMCP = Generator &
262
262
  GeneratorMCPDef & {
263
263
  templateKey: 'GENERATOR_MCP'
264
- switches: Array<
264
+ switches?: Array<
265
265
  SwitchDef &
266
266
  GeneratorMCPDef & {
267
267
  conds?: Array<{
@@ -224,7 +224,7 @@ Default property:
224
224
  export type GeneratorMCPServer = Generator &
225
225
  GeneratorMCPServerDef & {
226
226
  templateKey: 'GENERATOR_MCP_SERVER'
227
- switches: Array<
227
+ switches?: Array<
228
228
  SwitchDef &
229
229
  GeneratorMCPServerDef & {
230
230
  conds?: Array<{
@@ -119,7 +119,7 @@ Default property:
119
119
  export type GeneratorMediaFlow = Generator &
120
120
  GeneratorMediaFlowDef & {
121
121
  templateKey: 'GENERATOR_MEDIA_FLOW'
122
- switches: Array<
122
+ switches?: Array<
123
123
  SwitchDef &
124
124
  GeneratorMediaFlowDef & {
125
125
  conds?: Array<{
@@ -104,7 +104,7 @@ Default property:
104
104
  export type GeneratorMQTTBroker = Generator &
105
105
  GeneratorMQTTBrokerDef & {
106
106
  templateKey: 'GENERATOR_MQTT_BROKER'
107
- switches: Array<
107
+ switches?: Array<
108
108
  SwitchDef &
109
109
  GeneratorMQTTBrokerDef & {
110
110
  conds?: Array<{
@@ -112,7 +112,7 @@ Default property:
112
112
  export type GeneratorMQTT = Generator &
113
113
  GeneratorMQTTDef & {
114
114
  templateKey: 'GENERATOR_MQTT'
115
- switches: Array<
115
+ switches?: Array<
116
116
  SwitchDef &
117
117
  GeneratorMQTTDef & {
118
118
  conds?: Array<{
@@ -385,7 +385,7 @@ Default property:
385
385
  export type GeneratorQuestion = Generator &
386
386
  GeneratorQuestionDef & {
387
387
  templateKey: 'GENERATOR_QUESTION'
388
- switches: Array<
388
+ switches?: Array<
389
389
  SwitchDef &
390
390
  GeneratorQuestionDef & {
391
391
  conds?: Array<{
@@ -161,7 +161,7 @@ Default property:
161
161
  export type GeneratorRealtimeTranscription = Generator &
162
162
  GeneratorRealtimeTranscriptionDef & {
163
163
  templateKey: 'GENERATOR_REALTIME_TRANSCRIPTION'
164
- switches: Array<
164
+ switches?: Array<
165
165
  SwitchDef &
166
166
  GeneratorRealtimeTranscriptionDef & {
167
167
  conds?: Array<{
@@ -136,7 +136,7 @@ Default property:
136
136
  export type GeneratorReranker = Generator &
137
137
  GeneratorRerankerDef & {
138
138
  templateKey: 'GENERATOR_RERANKER'
139
- switches: Array<
139
+ switches?: Array<
140
140
  SwitchDef &
141
141
  GeneratorRerankerDef & {
142
142
  conds?: Array<{
@@ -119,7 +119,7 @@ Default property:
119
119
  export type GeneratorSerialPort = Generator &
120
120
  GeneratorSerialPortDef & {
121
121
  templateKey: 'GENERATOR_SERIAL_PORT'
122
- switches: Array<
122
+ switches?: Array<
123
123
  SwitchDef &
124
124
  GeneratorSerialPortDef & {
125
125
  conds?: Array<{
@@ -69,7 +69,7 @@ Default property:
69
69
  export type GeneratorSoundPlayer = Generator &
70
70
  GeneratorSoundPlayerDef & {
71
71
  templateKey: 'GENERATOR_SOUND_PLAYER'
72
- switches: Array<
72
+ switches?: Array<
73
73
  SwitchDef &
74
74
  GeneratorSoundPlayerDef & {
75
75
  conds?: Array<{
@@ -96,7 +96,7 @@ Default property:
96
96
  export type GeneratorSoundRecorder = Generator &
97
97
  GeneratorSoundRecorderDef & {
98
98
  templateKey: 'GENERATOR_SOUND_RECORDER'
99
- switches: Array<
99
+ switches?: Array<
100
100
  SwitchDef &
101
101
  GeneratorSoundRecorderDef & {
102
102
  conds?: Array<{
@@ -355,7 +355,7 @@ Default property:
355
355
  export type GeneratorSpeechInference = Generator &
356
356
  GeneratorSpeechInferenceDef & {
357
357
  templateKey: 'GENERATOR_SPEECH_INFERENCE'
358
- switches: Array<
358
+ switches?: Array<
359
359
  SwitchDef &
360
360
  GeneratorSpeechInferenceDef & {
361
361
  conds?: Array<{
@@ -210,7 +210,7 @@ Default property:
210
210
  export type GeneratorOnnxSTT = Generator &
211
211
  GeneratorOnnxSTTDef & {
212
212
  templateKey: 'GENERATOR_ONNX_STT'
213
- switches: Array<
213
+ switches?: Array<
214
214
  SwitchDef &
215
215
  GeneratorOnnxSTTDef & {
216
216
  conds?: Array<{
@@ -58,7 +58,7 @@ Default property:
58
58
  export type GeneratorPlatformSTT = Generator &
59
59
  GeneratorPlatformSTTDef & {
60
60
  templateKey: 'GENERATOR_PLATFORM_STT'
61
- switches: Array<
61
+ switches?: Array<
62
62
  SwitchDef &
63
63
  GeneratorPlatformSTTDef & {
64
64
  conds?: Array<{
@@ -130,7 +130,7 @@ Default property:
130
130
  export type GeneratorSqlite = Generator &
131
131
  GeneratorSqliteDef & {
132
132
  templateKey: 'GENERATOR_SQLITE'
133
- switches: Array<
133
+ switches?: Array<
134
134
  SwitchDef &
135
135
  GeneratorSqliteDef & {
136
136
  conds?: Array<{
@@ -84,7 +84,7 @@ Default property:
84
84
  export type GeneratorStep = Generator &
85
85
  GeneratorStepDef & {
86
86
  templateKey: 'GENERATOR_STEP'
87
- switches: Array<
87
+ switches?: Array<
88
88
  SwitchDef &
89
89
  GeneratorStepDef & {
90
90
  conds?: Array<{
@@ -98,7 +98,7 @@ Default property:
98
98
  export type GeneratorAppleSTT = Generator &
99
99
  GeneratorAppleSTTDef & {
100
100
  templateKey: 'GENERATOR_APPLE_STT'
101
- switches: Array<
101
+ switches?: Array<
102
102
  SwitchDef &
103
103
  GeneratorAppleSTTDef & {
104
104
  conds?: Array<{
@@ -103,7 +103,7 @@ Default property:
103
103
  export type GeneratorTCP = Generator &
104
104
  GeneratorTCPDef & {
105
105
  templateKey: 'GENERATOR_TCP'
106
- switches: Array<
106
+ switches?: Array<
107
107
  SwitchDef &
108
108
  GeneratorTCPDef & {
109
109
  conds?: Array<{
@@ -122,7 +122,7 @@ Default property:
122
122
  export type GeneratorTCPServer = Generator &
123
123
  GeneratorTCPServerDef & {
124
124
  templateKey: 'GENERATOR_TCP_SERVER'
125
- switches: Array<
125
+ switches?: Array<
126
126
  SwitchDef &
127
127
  GeneratorTCPServerDef & {
128
128
  conds?: Array<{
@@ -95,7 +95,7 @@ Default property:
95
95
  export type GeneratorAppleTTS = Generator &
96
96
  GeneratorAppleTTSDef & {
97
97
  templateKey: 'GENERATOR_APPLE_TTS'
98
- switches: Array<
98
+ switches?: Array<
99
99
  SwitchDef &
100
100
  GeneratorAppleTTSDef & {
101
101
  conds?: Array<{
@@ -184,7 +184,7 @@ Default property:
184
184
  export type GeneratorGGMLTTS = Generator &
185
185
  GeneratorGGMLTTSDef & {
186
186
  templateKey: 'GENERATOR_GGML_TTS'
187
- switches: Array<
187
+ switches?: Array<
188
188
  SwitchDef &
189
189
  GeneratorGGMLTTSDef & {
190
190
  conds?: Array<{
@@ -152,7 +152,7 @@ Default property:
152
152
  export type GeneratorTTS = Generator &
153
153
  GeneratorTTSDef & {
154
154
  templateKey: 'GENERATOR_TTS'
155
- switches: Array<
155
+ switches?: Array<
156
156
  SwitchDef &
157
157
  GeneratorTTSDef & {
158
158
  conds?: Array<{
@@ -96,7 +96,7 @@ Default property:
96
96
  export type GeneratorOpenAiTTS = Generator &
97
97
  GeneratorOpenAiTTSDef & {
98
98
  templateKey: 'GENERATOR_OPENAI_TTS'
99
- switches: Array<
99
+ switches?: Array<
100
100
  SwitchDef &
101
101
  GeneratorOpenAiTTSDef & {
102
102
  conds?: Array<{
@@ -168,7 +168,7 @@ Default property:
168
168
  export type GeneratorThermalPrinter = Generator &
169
169
  GeneratorThermalPrinterDef & {
170
170
  templateKey: 'GENERATOR_THERMAL_PRINTER'
171
- switches: Array<
171
+ switches?: Array<
172
172
  SwitchDef &
173
173
  GeneratorThermalPrinterDef & {
174
174
  conds?: Array<{
@@ -60,7 +60,7 @@ Default property:
60
60
  export type GeneratorTick = Generator &
61
61
  GeneratorTickDef & {
62
62
  templateKey: 'GENERATOR_TICK'
63
- switches: Array<
63
+ switches?: Array<
64
64
  SwitchDef &
65
65
  GeneratorTickDef & {
66
66
  conds?: Array<{
@@ -92,7 +92,7 @@ Default property:
92
92
  export type GeneratorUDP = Generator &
93
93
  GeneratorUDPDef & {
94
94
  templateKey: 'GENERATOR_UDP'
95
- switches: Array<
95
+ switches?: Array<
96
96
  SwitchDef &
97
97
  GeneratorUDPDef & {
98
98
  conds?: Array<{
@@ -189,7 +189,7 @@ Default property:
189
189
  export type GeneratorVadInference = Generator &
190
190
  GeneratorVadInferenceDef & {
191
191
  templateKey: 'GENERATOR_VAD_INFERENCE'
192
- switches: Array<
192
+ switches?: Array<
193
193
  SwitchDef &
194
194
  GeneratorVadInferenceDef & {
195
195
  conds?: Array<{
@@ -182,7 +182,7 @@ Default property:
182
182
  export type GeneratorVadInferenceOnnx = Generator &
183
183
  GeneratorVadInferenceOnnxDef & {
184
184
  templateKey: 'GENERATOR_ONNX_VAD'
185
- switches: Array<
185
+ switches?: Array<
186
186
  SwitchDef &
187
187
  GeneratorVadInferenceOnnxDef & {
188
188
  conds?: Array<{
@@ -97,7 +97,7 @@ Default property:
97
97
  export type GeneratorVadInferenceTraditional = Generator &
98
98
  GeneratorVadInferenceTraditionalDef & {
99
99
  templateKey: 'GENERATOR_TRADITIONAL_VAD'
100
- switches: Array<
100
+ switches?: Array<
101
101
  SwitchDef &
102
102
  GeneratorVadInferenceTraditionalDef & {
103
103
  conds?: Array<{
@@ -217,7 +217,7 @@ Default property:
217
217
  export type GeneratorVectorStore = Generator &
218
218
  GeneratorVectorStoreDef & {
219
219
  templateKey: 'GENERATOR_VECTOR_STORE'
220
- switches: Array<
220
+ switches?: Array<
221
221
  SwitchDef &
222
222
  GeneratorVectorStoreDef & {
223
223
  conds?: Array<{
@@ -74,7 +74,7 @@ Default property:
74
74
  export type GeneratorWatchdog = Generator &
75
75
  GeneratorWatchdogDef & {
76
76
  templateKey: 'GENERATOR_WATCHDOG'
77
- switches: Array<
77
+ switches?: Array<
78
78
  SwitchDef &
79
79
  GeneratorWatchdogDef & {
80
80
  conds?: Array<{
@@ -80,7 +80,7 @@ Default property:
80
80
  export type GeneratorWebCrawler = Generator &
81
81
  GeneratorWebCrawlerDef & {
82
82
  templateKey: 'GENERATOR_WEB_CRAWLER'
83
- switches: Array<
83
+ switches?: Array<
84
84
  SwitchDef &
85
85
  GeneratorWebCrawlerDef & {
86
86
  conds?: Array<{
@@ -140,7 +140,7 @@ Default property:
140
140
  export type GeneratorWebRTC = Generator &
141
141
  GeneratorWebRTCDef & {
142
142
  templateKey: 'GENERATOR_WEBRTC'
143
- switches: Array<
143
+ switches?: Array<
144
144
  SwitchDef &
145
145
  GeneratorWebRTCDef & {
146
146
  conds?: Array<{
@@ -125,7 +125,7 @@ Default property:
125
125
  export type GeneratorWebSocket = Generator &
126
126
  GeneratorWebSocketDef & {
127
127
  templateKey: 'GENERATOR_WEB_SOCKET'
128
- switches: Array<
128
+ switches?: Array<
129
129
  SwitchDef &
130
130
  GeneratorWebSocketDef & {
131
131
  conds?: Array<{
package/utils/id.ts CHANGED
@@ -21,6 +21,7 @@ export const makeId = (
21
21
  | 'property_bank_command'
22
22
  | 'property_bank_calc'
23
23
  | 'dynamic-brick'
24
+ | 'automation_map'
24
25
  | 'test'
25
26
  | 'test_case'
26
27
  | 'test_var'
@@ -61,6 +62,9 @@ export const makeId = (
61
62
  case 'property_bank_calc':
62
63
  prefix = 'PROPERTY_BANK_COMMAND_MAP_'
63
64
  break
65
+ case 'automation_map':
66
+ prefix = 'AUTOMATION_MAP_'
67
+ break
64
68
  case 'test':
65
69
  prefix = 'TEST_'
66
70
  break