@fugood/bricks-project 2.24.6 → 2.24.7

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.
@@ -899,10 +899,12 @@ export const templateActionNameMap = {
899
899
  GENERATOR_APPLE_STT_TRANSCRIBE_FILE: {
900
900
  fileUrl: 'GENERATOR_APPLE_STT_FILE_URL',
901
901
  language: 'GENERATOR_APPLE_STT_LANGUAGE',
902
+ contextualStrings: 'GENERATOR_APPLE_STT_CONTEXTUAL_STRINGS',
902
903
  },
903
904
  GENERATOR_APPLE_STT_TRANSCRIBE_DATA: {
904
905
  data: 'GENERATOR_APPLE_STT_DATA',
905
906
  language: 'GENERATOR_APPLE_STT_LANGUAGE',
907
+ contextualStrings: 'GENERATOR_APPLE_STT_CONTEXTUAL_STRINGS',
906
908
  },
907
909
  },
908
910
  GENERATOR_APPLE_TTS: {
package/compile/index.ts CHANGED
@@ -511,9 +511,10 @@ const compileKind = (kind: Data['kind']) => {
511
511
  }
512
512
 
513
513
  const compileRemoteUpdate = (remoteUpdate: Data['remoteUpdate']) => {
514
- if (!remoteUpdate) return {}
515
- if (remoteUpdate.type === 'auto') return { enable_remote_update: true }
514
+ if (!remoteUpdate) return { bank_type: 'none' }
515
+ if (remoteUpdate.type === 'auto') return { bank_type: 'create', enable_remote_update: true }
516
516
  return {
517
+ bank_type: remoteUpdate.type === 'device-specific' ? 'create-device-specific' : 'global',
517
518
  enable_remote_update: true,
518
519
  ...(remoteUpdate.type === 'device-specific' ? { use_remote_id_prefix: true } : {}),
519
520
  ...(remoteUpdate.type === 'global-data' ? { global_remote_update_prop: remoteUpdate.id } : {}),
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.24.6",
3
+ "version": "2.24.7",
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.6",
10
+ "@fugood/bricks-cli": "^2.24.7",
11
11
  "@huggingface/gguf": "^0.3.2",
12
12
  "@iarna/toml": "^3.0.0",
13
13
  "@modelcontextprotocol/sdk": "^1.15.0",
@@ -11,24 +11,24 @@ This skill covers advanced BRICKS features not in the main project instructions.
11
11
 
12
12
  | Rule | Description |
13
13
  |------|-------------|
14
- | [Architecture Patterns](rules/architecture-patterns.md) | **Read first** — decompose flows and select patterns |
15
- | [Animation](rules/animation.md) | Animation system for brick transforms and opacity |
16
- | [Standby Transition](rules/standby-transition.md) | Canvas enter/exit animations |
17
- | [Automations](rules/automations.md) | E2E testing and scheduled tasks |
18
- | [Data Calculation](rules/data-calculation.md) | JS sandbox libraries (25+ available) |
19
- | [Local Sync](rules/local-sync.md) | LAN device synchronization |
20
- | [Remote Data Bank](rules/remote-data-bank.md) | Cloud data sync and API access |
21
- | [Media Flow](rules/media-flow.md) | Media asset management |
22
- | [Buttress](rules/buttress.md) | Remote inference for AI generators |
23
- | [Verification Toolchain](rules/verification-toolchain.md) | Definition of done, compile, preview tool selection, on-device DevTools, Path 1/2/3 decision rule |
14
+ | [Architecture Patterns](references/architecture-patterns.md) | **Read first** — decompose flows and select patterns |
15
+ | [Animation](references/animation.md) | Animation system for brick transforms and opacity |
16
+ | [Standby Transition](references/standby-transition.md) | Canvas enter/exit animations |
17
+ | [Automations](references/automations.md) | E2E testing and scheduled tasks |
18
+ | [Data Calculation](references/data-calculation.md) | JS sandbox libraries (25+ available) |
19
+ | [Local Sync](references/local-sync.md) | LAN device synchronization |
20
+ | [Remote Data Bank](references/remote-data-bank.md) | Cloud data sync and API access |
21
+ | [Media Flow](references/media-flow.md) | Media asset management |
22
+ | [Buttress](references/buttress.md) | Remote inference for AI generators |
23
+ | [Verification Toolchain](references/verification-toolchain.md) | Definition of done, compile, preview tool selection, on-device DevTools, Path 1/2/3 decision rule |
24
24
 
25
25
  ## Quick Reference
26
26
 
27
- - **Complex flows**: See [Architecture Patterns](rules/architecture-patterns.md) for decomposing multi-step workflows
28
- - **Multi-device**: See [Local Sync](rules/local-sync.md) for LAN coordination
29
- - **Cloud data**: See [Remote Data Bank](rules/remote-data-bank.md) for sync and API access
30
- - **Media assets**: See [Media Flow](rules/media-flow.md) for centralized asset management
31
- - **AI offloading**: See [Buttress](rules/buttress.md) for GPU server delegation
32
- - **E2E testing**: See [Automations](rules/automations.md) for test automation
33
- - **Enter animations**: See [Standby Transition](rules/standby-transition.md) for canvas transitions
34
- - **Verification before done**: See [Verification Toolchain](rules/verification-toolchain.md) for the definition-of-done gate and Path 1/2/3 decision rule
27
+ - **Complex flows**: See [Architecture Patterns](references/architecture-patterns.md) for decomposing multi-step workflows
28
+ - **Multi-device**: See [Local Sync](references/local-sync.md) for LAN coordination
29
+ - **Cloud data**: See [Remote Data Bank](references/remote-data-bank.md) for sync and API access
30
+ - **Media assets**: See [Media Flow](references/media-flow.md) for centralized asset management
31
+ - **AI offloading**: See [Buttress](references/buttress.md) for GPU server delegation
32
+ - **E2E testing**: See [Automations](references/automations.md) for test automation
33
+ - **Enter animations**: See [Standby Transition](references/standby-transition.md) for canvas transitions
34
+ - **Verification before done**: See [Verification Toolchain](references/verification-toolchain.md) for the definition-of-done gate and Path 1/2/3 decision rule
@@ -11,6 +11,8 @@
11
11
  * - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 1+ GPUs.
12
12
  * - Linux / Windows [@nextline - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
13
13
  * - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
14
+ * - Web: Supported with CPU and WebGPU acceleration.
15
+ * - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable.
14
16
  */
15
17
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
16
18
  import type { Data, DataLink } from '../data'
@@ -863,7 +865,9 @@ Default property:
863
865
  - Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
864
866
  - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 1+ GPUs.
865
867
  - Linux / Windows [@nextline - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
866
- - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
868
+ - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
869
+ - Web: Supported with CPU and WebGPU acceleration.
870
+ - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable. */
867
871
  export type GeneratorLLM = Generator &
868
872
  GeneratorLLMDef & {
869
873
  templateKey: 'GENERATOR_LLM'
@@ -12,6 +12,8 @@
12
12
  * - Linux / Windows
13
13
  * - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
14
14
  * - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
15
+ * - Web: Supported with CPU and WebGPU acceleration.
16
+ * - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable.
15
17
  */
16
18
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
17
19
  import type { Data, DataLink } from '../data'
@@ -163,7 +165,9 @@ Default property:
163
165
  - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 2+ GPUs.
164
166
  - Linux / Windows
165
167
  - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
166
- - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux) */
168
+ - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
169
+ - Web: Supported with CPU and WebGPU acceleration.
170
+ - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable. */
167
171
  export type GeneratorReranker = Generator &
168
172
  GeneratorRerankerDef & {
169
173
  templateKey: 'GENERATOR_RERANKER'
@@ -54,7 +54,8 @@ Default property:
54
54
  "autoCuttingVocalFreqMin": 75,
55
55
  "autoCuttingVocalFreqMax": 900,
56
56
  "autoCuttingFreqClarity": 0.5,
57
- "autoCuttingSpeakSpacing": 0.5
57
+ "autoCuttingSpeakSpacing": 0.5,
58
+ "userMediaAudioOptions": {}
58
59
  }
59
60
  */
60
61
  property?: {
@@ -86,6 +87,14 @@ Default property:
86
87
  autoCuttingVolumeThreshold?: number | DataLink
87
88
  /* Speak spacing of cutting fragments */
88
89
  autoCuttingSpeakSpacing?: number | DataLink
90
+ /* Custom getUserMedia audio options for Web / Desktop. Merged into the audio constraints. */
91
+ userMediaAudioOptions?:
92
+ | DataLink
93
+ | {
94
+ autoGainControl?: boolean | DataLink
95
+ echoCancellation?: boolean | DataLink
96
+ noiseSuppression?: boolean | DataLink
97
+ }
89
98
  }
90
99
  events?: {
91
100
  /* Event for chunk data (Base64 encoded PCM) */
@@ -7,6 +7,8 @@
7
7
  * - macOS: Supported GPU acceleration, recommended use M1+ chip device
8
8
  * - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
9
9
  * - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
10
+ * - Web: Supported with WASM CPU and optional WebGPU acceleration in Web Preview.
11
+ * - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable.
10
12
  */
11
13
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
12
14
  import type { Data, DataLink } from '../data'
@@ -389,7 +391,9 @@ Default property:
389
391
  - iOS: Supported GPU acceleration, recommended use M1+ / A17+ chip device
390
392
  - macOS: Supported GPU acceleration, recommended use M1+ chip device
391
393
  - Android: Currently not supported GPU acceleration (Coming soon), recommended use Android 13+ system
392
- - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property */
394
+ - Linux / Windows: Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
395
+ - Web: Supported with WASM CPU and optional WebGPU acceleration in Web Preview.
396
+ - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable. */
393
397
  export type GeneratorSpeechInference = Generator &
394
398
  GeneratorSpeechInferenceDef & {
395
399
  templateKey: 'GENERATOR_SPEECH_INFERENCE'
@@ -1,13 +1,13 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Speech recognition on iOS 26+ (Not supported on tvOS)
3
+ * Speech recognition on iOS 26+ and Desktop (macOS 26+). Not supported on tvOS
4
4
  *
5
5
  * ## Features
6
6
  * - Native Apple speech recognition
7
7
  * - High accuracy transcription
8
8
  * - Privacy-focused on-device processing
9
9
  * - Supports file and data transcription
10
- * - Requires iOS 26+ (Not supported on tvOS)
10
+ * - Requires iOS 26+ or Desktop on macOS 26+. Not supported on tvOS
11
11
  */
12
12
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
13
13
  import type { Data, DataLink } from '../data'
@@ -41,6 +41,11 @@ export type GeneratorAppleSTTActionTranscribeFile = ActionWithParams & {
41
41
  value?: string | DataLink | EventProperty
42
42
  mapping?: string
43
43
  }
44
+ | {
45
+ input: 'contextualStrings'
46
+ value?: Array<any> | DataLink | EventProperty
47
+ mapping?: string
48
+ }
44
49
  >
45
50
  }
46
51
 
@@ -58,15 +63,26 @@ export type GeneratorAppleSTTActionTranscribeData = ActionWithParams & {
58
63
  value?: string | DataLink | EventProperty
59
64
  mapping?: string
60
65
  }
66
+ | {
67
+ input: 'contextualStrings'
68
+ value?: Array<any> | DataLink | EventProperty
69
+ mapping?: string
70
+ }
61
71
  >
62
72
  }
63
73
 
74
+ /* Release context */
75
+ export type GeneratorAppleSTTActionReleaseContext = Action & {
76
+ __actionName: 'GENERATOR_APPLE_STT_RELEASE_CONTEXT'
77
+ }
78
+
64
79
  interface GeneratorAppleSTTDef {
65
80
  /*
66
81
  Default property:
67
82
  {
68
83
  "init": false,
69
84
  "language": "en-US",
85
+ "contextualStrings": [],
70
86
  "enablePartialResults": true
71
87
  }
72
88
  */
@@ -75,6 +91,13 @@ Default property:
75
91
  init?: boolean | DataLink
76
92
  /* Language/locale for recognition (e.g., 'en-US') */
77
93
  language?: string | DataLink
94
+ /* Phrases that should be recognized, even if they are not in the system vocabulary. */
95
+ contextualStrings?:
96
+ | Array<string | DataLink>
97
+ | DataLink
98
+ | Record<string, Array<string | DataLink> | DataLink>
99
+ | DataLink
100
+ | DataLink
78
101
  /* Enable partial results during transcription */
79
102
  enablePartialResults?: boolean | DataLink
80
103
  /* The file URL or path to be transcribed */
@@ -100,14 +123,14 @@ Default property:
100
123
  }
101
124
  }
102
125
 
103
- /* Speech recognition on iOS 26+ (Not supported on tvOS)
126
+ /* Speech recognition on iOS 26+ and Desktop (macOS 26+). Not supported on tvOS
104
127
 
105
128
  ## Features
106
129
  - Native Apple speech recognition
107
130
  - High accuracy transcription
108
131
  - Privacy-focused on-device processing
109
132
  - Supports file and data transcription
110
- - Requires iOS 26+ (Not supported on tvOS) */
133
+ - Requires iOS 26+ or Desktop on macOS 26+. Not supported on tvOS */
111
134
  export type GeneratorAppleSTT = Generator &
112
135
  GeneratorAppleSTTDef & {
113
136
  templateKey: 'GENERATOR_APPLE_STT'
@@ -1,6 +1,11 @@
1
1
  /* Auto generated by build script
2
2
  *
3
- * Local Voice Activity Detection (VAD) inference based on GGML and [whisper.rn](https://github.com/mybigday/whisper.rn)
3
+ * Local Voice Activity Detection (VAD) inference based on GGML and [whisper.cpp](https://github.com/ggerganov/whisper.cpp)
4
+ *
5
+ * ## Notice
6
+ * - Web: Supported with WASM CPU in Web Preview.
7
+ * - WebGPU is not used for browser VAD; the wasm package falls back to CPU for the VAD graph.
8
+ * - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable.
4
9
  */
5
10
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
11
  import type { Data, DataLink } from '../data'
@@ -222,7 +227,12 @@ Default property:
222
227
  }
223
228
  }
224
229
 
225
- /* Local Voice Activity Detection (VAD) inference based on GGML and [whisper.rn](https://github.com/mybigday/whisper.rn) */
230
+ /* Local Voice Activity Detection (VAD) inference based on GGML and [whisper.cpp](https://github.com/ggerganov/whisper.cpp)
231
+
232
+ ## Notice
233
+ - Web: Supported with WASM CPU in Web Preview.
234
+ - WebGPU is not used for browser VAD; the wasm package falls back to CPU for the VAD graph.
235
+ - Single thread only in the current web preview (no SharedArrayBuffer due to cross-origin isolation / CORP), so multi-thread is unavailable. */
226
236
  export type GeneratorVadInference = Generator &
227
237
  GeneratorVadInferenceDef & {
228
238
  templateKey: 'GENERATOR_VAD_INFERENCE'