@fugood/bricks-ctor 2.25.0-beta.60 → 2.25.0-beta.61

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 (190) hide show
  1. package/package.json +4 -28
  2. package/tools/deploy.ts +19 -176
  3. package/tools/mcp-server.ts +16 -33
  4. package/tools/postinstall.ts +21 -292
  5. package/tools/pull.ts +15 -195
  6. package/tools/push-config.ts +18 -113
  7. package/tools/simulator.ts +19 -148
  8. package/compile/__tests__/config-diff.test.js +0 -100
  9. package/compile/__tests__/index.test.js +0 -461
  10. package/compile/__tests__/util.test.js +0 -450
  11. package/compile/action-name-map.ts +0 -1079
  12. package/compile/config-diff.ts +0 -155
  13. package/compile/index.ts +0 -1594
  14. package/compile/util.ts +0 -482
  15. package/index.ts +0 -6
  16. package/skills/bricks-ctor/SKILL.md +0 -38
  17. package/skills/bricks-ctor/references/animation.md +0 -160
  18. package/skills/bricks-ctor/references/architecture-patterns.md +0 -88
  19. package/skills/bricks-ctor/references/automations.md +0 -232
  20. package/skills/bricks-ctor/references/buttress.md +0 -245
  21. package/skills/bricks-ctor/references/data-calculation.md +0 -252
  22. package/skills/bricks-ctor/references/local-sync.md +0 -129
  23. package/skills/bricks-ctor/references/media-flow.md +0 -165
  24. package/skills/bricks-ctor/references/remote-data-bank.md +0 -196
  25. package/skills/bricks-ctor/references/simulator.md +0 -132
  26. package/skills/bricks-ctor/references/source-editing-tools.md +0 -81
  27. package/skills/bricks-ctor/references/standby-transition.md +0 -124
  28. package/skills/bricks-ctor/references/verification-toolchain.md +0 -200
  29. package/skills/bricks-design/SKILL.md +0 -171
  30. package/skills/bricks-design/references/architecture-truths.md +0 -132
  31. package/skills/bricks-design/references/avoiding-complexity.md +0 -91
  32. package/skills/bricks-design/references/design-critique.md +0 -195
  33. package/skills/bricks-design/references/design-languages.md +0 -265
  34. package/skills/bricks-design/references/performance.md +0 -116
  35. package/skills/bricks-design/references/presentation-and-slideshow.md +0 -137
  36. package/skills/bricks-design/references/translating-inputs.md +0 -152
  37. package/skills/bricks-design/references/variations-and-tweaks.md +0 -124
  38. package/skills/bricks-design/references/when-the-brief-is-branded.md +0 -284
  39. package/skills/bricks-design/references/when-the-brief-is-vague.md +0 -85
  40. package/skills/bricks-design/references/workflow.md +0 -134
  41. package/skills/bricks-ux/SKILL.md +0 -114
  42. package/skills/bricks-ux/references/accessibility.md +0 -162
  43. package/skills/bricks-ux/references/flow-states.md +0 -175
  44. package/skills/bricks-ux/references/interaction-archetypes.md +0 -189
  45. package/skills/bricks-ux/references/monitoring-screens.md +0 -153
  46. package/skills/bricks-ux/references/pressable-composition.md +0 -126
  47. package/skills/bricks-ux/references/user-journey.md +0 -168
  48. package/skills/bricks-ux/references/ux-critique.md +0 -256
  49. package/skills/rive-marketplace/SKILL.md +0 -99
  50. package/tools/__tests__/_cli-error.test.ts +0 -35
  51. package/tools/__tests__/_mcp-config.test.ts +0 -67
  52. package/tools/__tests__/pull.test.ts +0 -108
  53. package/tools/_cli-error.ts +0 -17
  54. package/tools/_edits-log.ts +0 -41
  55. package/tools/_git-author.ts +0 -37
  56. package/tools/_last-pushed-commit.ts +0 -28
  57. package/tools/_mcp-config.ts +0 -42
  58. package/tools/_shell.ts +0 -180
  59. package/tools/icons/.gitattributes +0 -1
  60. package/tools/icons/fa6pro-glyphmap.json +0 -4686
  61. package/tools/icons/fa6pro-meta.json +0 -1
  62. package/tools/mcp-env.ts +0 -13
  63. package/tools/mcp-tools/__tests__/data-calc-editing.test.js +0 -516
  64. package/tools/mcp-tools/__tests__/entry-editing.test.js +0 -866
  65. package/tools/mcp-tools/__tests__/huggingface.test.ts +0 -49
  66. package/tools/mcp-tools/__tests__/icons.test.ts +0 -21
  67. package/tools/mcp-tools/__tests__/mcp-env.test.js +0 -19
  68. package/tools/mcp-tools/_editing-helpers.ts +0 -98
  69. package/tools/mcp-tools/_verify.ts +0 -50
  70. package/tools/mcp-tools/compile.ts +0 -104
  71. package/tools/mcp-tools/data-calc-editing.ts +0 -1311
  72. package/tools/mcp-tools/entry-editing.ts +0 -2297
  73. package/tools/mcp-tools/huggingface.ts +0 -772
  74. package/tools/mcp-tools/icons.ts +0 -97
  75. package/tools/mcp-tools/lottie.ts +0 -102
  76. package/tools/mcp-tools/media.ts +0 -113
  77. package/tools/simulator-main.mjs +0 -488
  78. package/tools/simulator-preload.cjs +0 -16
  79. package/types/animation.d.ts +0 -116
  80. package/types/automation.d.ts +0 -231
  81. package/types/brick-base.d.ts +0 -80
  82. package/types/bricks/Camera.d.ts +0 -246
  83. package/types/bricks/Chart.d.ts +0 -372
  84. package/types/bricks/GenerativeMedia.d.ts +0 -290
  85. package/types/bricks/Icon.d.ts +0 -98
  86. package/types/bricks/Image.d.ts +0 -126
  87. package/types/bricks/Items.d.ts +0 -480
  88. package/types/bricks/Lottie.d.ts +0 -168
  89. package/types/bricks/Maps.d.ts +0 -262
  90. package/types/bricks/QrCode.d.ts +0 -117
  91. package/types/bricks/Rect.d.ts +0 -150
  92. package/types/bricks/RichText.d.ts +0 -131
  93. package/types/bricks/Rive.d.ts +0 -220
  94. package/types/bricks/Scene3D.d.ts +0 -676
  95. package/types/bricks/Sketch.d.ts +0 -256
  96. package/types/bricks/Slideshow.d.ts +0 -201
  97. package/types/bricks/Svg.d.ts +0 -99
  98. package/types/bricks/Text.d.ts +0 -148
  99. package/types/bricks/TextInput.d.ts +0 -242
  100. package/types/bricks/Video.d.ts +0 -242
  101. package/types/bricks/VideoStreaming.d.ts +0 -112
  102. package/types/bricks/WebRtcStream.d.ts +0 -65
  103. package/types/bricks/WebView.d.ts +0 -168
  104. package/types/bricks/index.d.ts +0 -23
  105. package/types/canvas.d.ts +0 -82
  106. package/types/common.d.ts +0 -141
  107. package/types/data-calc-command/base.d.ts +0 -57
  108. package/types/data-calc-command/collection.d.ts +0 -418
  109. package/types/data-calc-command/color.d.ts +0 -432
  110. package/types/data-calc-command/constant.d.ts +0 -50
  111. package/types/data-calc-command/datetime.d.ts +0 -147
  112. package/types/data-calc-command/file.d.ts +0 -129
  113. package/types/data-calc-command/index.d.ts +0 -13
  114. package/types/data-calc-command/iteratee.d.ts +0 -23
  115. package/types/data-calc-command/logictype.d.ts +0 -190
  116. package/types/data-calc-command/math.d.ts +0 -275
  117. package/types/data-calc-command/object.d.ts +0 -119
  118. package/types/data-calc-command/sandbox.d.ts +0 -66
  119. package/types/data-calc-command/string.d.ts +0 -407
  120. package/types/data-calc-script.d.ts +0 -21
  121. package/types/data-calc.d.ts +0 -12
  122. package/types/data.d.ts +0 -97
  123. package/types/generators/AlarmClock.d.ts +0 -110
  124. package/types/generators/Assistant.d.ts +0 -640
  125. package/types/generators/BleCentral.d.ts +0 -247
  126. package/types/generators/BlePeripheral.d.ts +0 -208
  127. package/types/generators/CanvasMap.d.ts +0 -74
  128. package/types/generators/CastlesPay.d.ts +0 -87
  129. package/types/generators/DataBank.d.ts +0 -160
  130. package/types/generators/File.d.ts +0 -432
  131. package/types/generators/GraphQl.d.ts +0 -132
  132. package/types/generators/Http.d.ts +0 -222
  133. package/types/generators/HttpServer.d.ts +0 -230
  134. package/types/generators/Information.d.ts +0 -103
  135. package/types/generators/Intent.d.ts +0 -168
  136. package/types/generators/Iterator.d.ts +0 -108
  137. package/types/generators/Keyboard.d.ts +0 -105
  138. package/types/generators/LlmAnthropicCompat.d.ts +0 -212
  139. package/types/generators/LlmAppleBuiltin.d.ts +0 -159
  140. package/types/generators/LlmGgml.d.ts +0 -903
  141. package/types/generators/LlmMediaTekNeuroPilot.d.ts +0 -235
  142. package/types/generators/LlmMlx.d.ts +0 -228
  143. package/types/generators/LlmOnnx.d.ts +0 -213
  144. package/types/generators/LlmOpenAiCompat.d.ts +0 -312
  145. package/types/generators/LlmQualcommAiEngine.d.ts +0 -247
  146. package/types/generators/Mcp.d.ts +0 -637
  147. package/types/generators/McpServer.d.ts +0 -289
  148. package/types/generators/MediaFlow.d.ts +0 -170
  149. package/types/generators/MqttBroker.d.ts +0 -141
  150. package/types/generators/MqttClient.d.ts +0 -141
  151. package/types/generators/Question.d.ts +0 -408
  152. package/types/generators/RealtimeTranscription.d.ts +0 -287
  153. package/types/generators/RerankerGgml.d.ts +0 -195
  154. package/types/generators/SerialPort.d.ts +0 -151
  155. package/types/generators/SoundPlayer.d.ts +0 -94
  156. package/types/generators/SoundRecorder.d.ts +0 -139
  157. package/types/generators/SpeechToTextGgml.d.ts +0 -424
  158. package/types/generators/SpeechToTextOnnx.d.ts +0 -236
  159. package/types/generators/SpeechToTextPlatform.d.ts +0 -85
  160. package/types/generators/SqLite.d.ts +0 -159
  161. package/types/generators/Step.d.ts +0 -107
  162. package/types/generators/SttAppleBuiltin.d.ts +0 -153
  163. package/types/generators/Tcp.d.ts +0 -126
  164. package/types/generators/TcpServer.d.ts +0 -147
  165. package/types/generators/TextToSpeechAppleBuiltin.d.ts +0 -127
  166. package/types/generators/TextToSpeechGgml.d.ts +0 -221
  167. package/types/generators/TextToSpeechOnnx.d.ts +0 -178
  168. package/types/generators/TextToSpeechOpenAiLike.d.ts +0 -121
  169. package/types/generators/ThermalPrinter.d.ts +0 -193
  170. package/types/generators/Tick.d.ts +0 -83
  171. package/types/generators/Udp.d.ts +0 -120
  172. package/types/generators/VadGgml.d.ts +0 -260
  173. package/types/generators/VadOnnx.d.ts +0 -231
  174. package/types/generators/VadTraditional.d.ts +0 -138
  175. package/types/generators/VectorStore.d.ts +0 -257
  176. package/types/generators/Watchdog.d.ts +0 -107
  177. package/types/generators/WebCrawler.d.ts +0 -103
  178. package/types/generators/WebRtc.d.ts +0 -181
  179. package/types/generators/WebSocket.d.ts +0 -148
  180. package/types/generators/index.d.ts +0 -57
  181. package/types/index.d.ts +0 -13
  182. package/types/subspace.d.ts +0 -60
  183. package/types/switch.d.ts +0 -51
  184. package/types/system.d.ts +0 -707
  185. package/utils/__tests__/calc.test.js +0 -25
  186. package/utils/__tests__/id.test.js +0 -154
  187. package/utils/calc.ts +0 -130
  188. package/utils/data.ts +0 -495
  189. package/utils/event-props.ts +0 -912
  190. package/utils/id.ts +0 -133
@@ -1,153 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Speech recognition on iOS 26+ and Desktop (macOS 26+). Not supported on tvOS
4
- *
5
- * ## Features
6
- * - Native Apple speech recognition
7
- * - High accuracy transcription
8
- * - Privacy-focused on-device processing
9
- * - Supports file and data transcription
10
- * - Requires iOS 26+ or Desktop on macOS 26+. Not supported on tvOS
11
- */
12
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
13
- import type { Data, DataLink } from '../data'
14
- import type {
15
- Brick,
16
- Generator,
17
- EventAction,
18
- ActionWithDataParams,
19
- ActionWithParams,
20
- Action,
21
- EventProperty,
22
- } from '../common'
23
- import type { TemplateEventPropsMap } from '../../utils/event-props'
24
-
25
- /* Initialize STT */
26
- export type GeneratorAppleSTTActionInit = Action & {
27
- __actionName: 'GENERATOR_APPLE_STT_INIT'
28
- }
29
-
30
- /* Transcribe audio file. You can provide `File URL` property, if not provided, it will use the default `File URL` */
31
- export type GeneratorAppleSTTActionTranscribeFile = ActionWithParams & {
32
- __actionName: 'GENERATOR_APPLE_STT_TRANSCRIBE_FILE'
33
- params?: Array<
34
- | {
35
- input: 'fileUrl'
36
- value?: string | DataLink | EventProperty
37
- mapping?: string
38
- }
39
- | {
40
- input: 'language'
41
- value?: string | DataLink | EventProperty
42
- mapping?: string
43
- }
44
- | {
45
- input: 'contextualStrings'
46
- value?: Array<any> | DataLink | EventProperty
47
- mapping?: string
48
- }
49
- >
50
- }
51
-
52
- /* Transcribe audio data (base64 encoded audio data or ArrayBuffer) */
53
- export type GeneratorAppleSTTActionTranscribeData = ActionWithParams & {
54
- __actionName: 'GENERATOR_APPLE_STT_TRANSCRIBE_DATA'
55
- params?: Array<
56
- | {
57
- input: 'data'
58
- value?: any | EventProperty
59
- mapping?: string
60
- }
61
- | {
62
- input: 'language'
63
- value?: string | DataLink | EventProperty
64
- mapping?: string
65
- }
66
- | {
67
- input: 'contextualStrings'
68
- value?: Array<any> | DataLink | EventProperty
69
- mapping?: string
70
- }
71
- >
72
- }
73
-
74
- /* Release context */
75
- export type GeneratorAppleSTTActionReleaseContext = Action & {
76
- __actionName: 'GENERATOR_APPLE_STT_RELEASE_CONTEXT'
77
- }
78
-
79
- interface GeneratorAppleSTTDef {
80
- /*
81
- Default property:
82
- {
83
- "init": false,
84
- "language": "en-US",
85
- "contextualStrings": [],
86
- "enablePartialResults": true
87
- }
88
- */
89
- property?: {
90
- /* Initialize the STT engine on generator initialization */
91
- init?: boolean | DataLink
92
- /* Language/locale for recognition (e.g., 'en-US') */
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
101
- /* Enable partial results during transcription */
102
- enablePartialResults?: boolean | DataLink
103
- /* The file URL or path to be transcribed */
104
- fileUrl?: string | DataLink
105
- }
106
- events?: {
107
- /* Error event */
108
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onError']>>
109
- /* Event triggered when got transcribe result */
110
- onTranscribed?: Array<
111
- EventAction<string & keyof TemplateEventPropsMap['AppleStt']['onTranscribed']>
112
- >
113
- }
114
- outlets?: {
115
- /* State outlet (loading, ready, error) */
116
- state?: () => Data<string>
117
- /* Is transcribing */
118
- isTranscribing?: () => Data<boolean>
119
- /* Transcribe result */
120
- transcribeResult?: () => Data<string>
121
- /* Transcribe result details (result, segments, time, startTime, endTime, duration) */
122
- transcribeDetails?: () => Data<{ [key: string]: any }>
123
- }
124
- }
125
-
126
- /* Speech recognition on iOS 26+ and Desktop (macOS 26+). Not supported on tvOS
127
-
128
- ## Features
129
- - Native Apple speech recognition
130
- - High accuracy transcription
131
- - Privacy-focused on-device processing
132
- - Supports file and data transcription
133
- - Requires iOS 26+ or Desktop on macOS 26+. Not supported on tvOS */
134
- export type GeneratorAppleSTT = Generator &
135
- GeneratorAppleSTTDef & {
136
- templateKey: 'GENERATOR_APPLE_STT'
137
- switches?: Array<
138
- SwitchDef &
139
- GeneratorAppleSTTDef & {
140
- conds?: Array<{
141
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
142
- cond:
143
- | SwitchCondInnerStateCurrentCanvas
144
- | SwitchCondData
145
- | {
146
- __typename: 'SwitchCondInnerStateOutlet'
147
- outlet: 'state' | 'isTranscribing' | 'transcribeResult' | 'transcribeDetails'
148
- value: any
149
- }
150
- }>
151
- }
152
- >
153
- }
@@ -1,126 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive support
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Start connect */
19
- export type GeneratorTCPActionConnect = Action & {
20
- __actionName: 'GENERATOR_TCP_CONNECT'
21
- }
22
-
23
- /* Send data */
24
- export type GeneratorTCPActionSend = ActionWithParams & {
25
- __actionName: 'GENERATOR_TCP_SEND'
26
- params?: Array<{
27
- input: 'sendData'
28
- value?: string | DataLink | EventProperty
29
- mapping?: string
30
- }>
31
- }
32
-
33
- /* End connection */
34
- export type GeneratorTCPActionEnd = ActionWithParams & {
35
- __actionName: 'GENERATOR_TCP_END'
36
- params?: Array<{
37
- input: 'endWithData'
38
- value?: string | DataLink | EventProperty
39
- mapping?: string
40
- }>
41
- }
42
-
43
- interface GeneratorTCPDef {
44
- /*
45
- Default property:
46
- {
47
- "init": false,
48
- "dataMode": "raw",
49
- "encoding": "utf8",
50
- "idleTimeout": 0,
51
- "bufferSize": 1024,
52
- "tls": false,
53
- "tlsCheckValidity": false,
54
- "tlsCert": ""
55
- }
56
- */
57
- property?: {
58
- /* Start connect on generator initialized */
59
- init?: boolean | DataLink
60
- /* Connection target host or IP assress */
61
- host?: string | DataLink
62
- /* Connection target port */
63
- port?: number | DataLink
64
- /* Data mode
65
- CRLF: Receive until CRLF
66
- LF: Receive until LF
67
- raw: Raw packet */
68
- dataMode?: 'CRLF' | 'LF' | 'raw' | DataLink
69
- /* Encoding of data */
70
- encoding?: 'base64' | 'utf8' | 'ascii' | DataLink
71
- /* Max connection idle time, 0 is disable */
72
- idleTimeout?: number | DataLink
73
- /* Enable keepalive */
74
- keepAlive?: boolean | DataLink
75
- /* Buffer size limit of receive plaintext line */
76
- bufferSize?: number | DataLink
77
- /* Enable TLS */
78
- tls?: boolean | DataLink
79
- /* Enable TLS certificate verify */
80
- tlsCheckValidity?: boolean | DataLink
81
- /* Trust certificate list (PEM format) */
82
- tlsCert?: string | DataLink
83
- }
84
- events?: {
85
- /* Event of connect successful */
86
- onConnected?: Array<EventAction>
87
- /* Event of receive data */
88
- onData?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onData']>>
89
- /* Event of connection idle timeout */
90
- onTimeout?: Array<EventAction>
91
- /* Event of connection close */
92
- onClose?: Array<EventAction>
93
- /* Event of connection error */
94
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Tcp']['onError']>>
95
- }
96
- outlets?: {
97
- /* Connection status */
98
- status?: () => Data<string>
99
- /* Last received data */
100
- lastData?: () => Data<string>
101
- /* Error message */
102
- errorMessage?: () => Data<string>
103
- }
104
- }
105
-
106
- /* TCP socket client with data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), TLS, and keepalive support */
107
- export type GeneratorTCP = Generator &
108
- GeneratorTCPDef & {
109
- templateKey: 'GENERATOR_TCP'
110
- switches?: Array<
111
- SwitchDef &
112
- GeneratorTCPDef & {
113
- conds?: Array<{
114
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
115
- cond:
116
- | SwitchCondInnerStateCurrentCanvas
117
- | SwitchCondData
118
- | {
119
- __typename: 'SwitchCondInnerStateOutlet'
120
- outlet: 'status' | 'lastData' | 'errorMessage'
121
- value: any
122
- }
123
- }>
124
- }
125
- >
126
- }
@@ -1,147 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS
4
- */
5
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
6
- import type { Data, DataLink } from '../data'
7
- import type {
8
- Brick,
9
- Generator,
10
- EventAction,
11
- ActionWithDataParams,
12
- ActionWithParams,
13
- Action,
14
- EventProperty,
15
- } from '../common'
16
- import type { TemplateEventPropsMap } from '../../utils/event-props'
17
-
18
- /* Start TCP server */
19
- export type GeneratorTCPServerActionStart = Action & {
20
- __actionName: 'GENERATOR_TCP_SERVER_START'
21
- }
22
-
23
- /* Send data to specify connection */
24
- export type GeneratorTCPServerActionSend = ActionWithParams & {
25
- __actionName: 'GENERATOR_TCP_SERVER_SEND'
26
- params?: Array<
27
- | {
28
- input: 'remote'
29
- value?: string | DataLink | EventProperty
30
- mapping?: string
31
- }
32
- | {
33
- input: 'sendData'
34
- value?: string | DataLink | EventProperty
35
- mapping?: string
36
- }
37
- >
38
- }
39
-
40
- /* End specify connection */
41
- export type GeneratorTCPServerActionEnd = ActionWithParams & {
42
- __actionName: 'GENERATOR_TCP_SERVER_END'
43
- params?: Array<
44
- | {
45
- input: 'remote'
46
- value?: string | DataLink | EventProperty
47
- mapping?: string
48
- }
49
- | {
50
- input: 'generatorTcpClientEndWithData'
51
- value?: string | DataLink | EventProperty
52
- mapping?: string
53
- }
54
- >
55
- }
56
-
57
- /* Stop TCP server */
58
- export type GeneratorTCPServerActionStop = Action & {
59
- __actionName: 'GENERATOR_TCP_SERVER_STOP'
60
- }
61
-
62
- interface GeneratorTCPServerDef {
63
- /*
64
- Default property:
65
- {
66
- "init": false,
67
- "dataMode": "raw",
68
- "encoding": "utf8",
69
- "bufferSize": 1024,
70
- "concurrent": 5,
71
- "idleTimeout": 0
72
- }
73
- */
74
- property?: {
75
- /* Start TCP server on generator initialized */
76
- init?: boolean | DataLink
77
- /* Bind port of TCP server */
78
- port?: number | DataLink
79
- /* Data mode
80
- CRLF: Receive until CRLF
81
- LF: Receive until LF
82
- raw: Raw packet */
83
- dataMode?: 'CRLF' | 'LF' | 'raw' | DataLink
84
- /* Encoding of data */
85
- encoding?: 'base64' | 'utf8' | 'ascii' | DataLink
86
- /* Buffer size limit of receive plaintext line */
87
- bufferSize?: number | DataLink
88
- /* Max concurrent connection count */
89
- concurrent?: number | DataLink
90
- /* Max connection idle time, 0 is disable */
91
- idleTimeout?: number | DataLink
92
- /* Enable TLS */
93
- tls?: boolean | DataLink
94
- /* TLS key pair (Base64 encoded no password PKCS #12) */
95
- tlsKeyPair?: string | DataLink
96
- }
97
- events?: {
98
- /* Event of TCP server is ready */
99
- onReady?: Array<EventAction>
100
- /* Event of TCP server accept the connection */
101
- onAcceptConnection?: Array<
102
- EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onAcceptConnection']>
103
- >
104
- /* Event of receive data */
105
- onData?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onData']>>
106
- /* Event of connection idle timeout */
107
- onTimeout?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onTimeout']>>
108
- /* Event of connection close */
109
- onClose?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onClose']>>
110
- /* Event of server or connection error */
111
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['TcpServer']['onError']>>
112
- }
113
- outlets?: {
114
- /* Server is listening */
115
- isListening?: () => Data<boolean>
116
- /* Is server started */
117
- started?: () => Data<boolean>
118
- /* Accepted connections */
119
- connections?: () => Data<Array<string>>
120
- /* Last received data */
121
- lastData?: () => Data<string>
122
- /* Error message */
123
- errorMessage?: () => Data<string>
124
- }
125
- }
126
-
127
- /* TCP server with multi-client support, data modes (CRLF/LF/raw), encodings (base64/utf8/ascii), concurrent connection limit, and TLS */
128
- export type GeneratorTCPServer = Generator &
129
- GeneratorTCPServerDef & {
130
- templateKey: 'GENERATOR_TCP_SERVER'
131
- switches?: Array<
132
- SwitchDef &
133
- GeneratorTCPServerDef & {
134
- conds?: Array<{
135
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
136
- cond:
137
- | SwitchCondInnerStateCurrentCanvas
138
- | SwitchCondData
139
- | {
140
- __typename: 'SwitchCondInnerStateOutlet'
141
- outlet: 'isListening' | 'started' | 'connections' | 'lastData' | 'errorMessage'
142
- value: any
143
- }
144
- }>
145
- }
146
- >
147
- }
@@ -1,127 +0,0 @@
1
- /* Auto generated by build script
2
- *
3
- * Text-to-speech synthesis using Apple's native speech synthesis
4
- *
5
- * ## Features
6
- * - Native Apple speech synthesis
7
- * - Natural sounding voices
8
- * - Privacy-focused on-device processing
9
- * - Multiple voice options
10
- * - Requires iOS 13+ (native speech synthesis)
11
- */
12
- import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
13
- import type { Data, DataLink } from '../data'
14
- import type {
15
- Brick,
16
- Generator,
17
- EventAction,
18
- ActionWithDataParams,
19
- ActionWithParams,
20
- Action,
21
- EventProperty,
22
- } from '../common'
23
- import type { TemplateEventPropsMap } from '../../utils/event-props'
24
-
25
- /* Load the TTS model */
26
- export type GeneratorAppleTTSActionLoadModel = Action & {
27
- __actionName: 'GENERATOR_APPLE_TTS_LOAD_MODEL'
28
- }
29
-
30
- /* Generate audio */
31
- export type GeneratorAppleTTSActionGenerate = ActionWithParams & {
32
- __actionName: 'GENERATOR_APPLE_TTS_GENERATE'
33
- params?: Array<{
34
- input: 'text'
35
- value?: string | DataLink | EventProperty
36
- mapping?: string
37
- }>
38
- }
39
-
40
- /* Clean cache */
41
- export type GeneratorAppleTTSActionCleanCache = Action & {
42
- __actionName: 'GENERATOR_APPLE_TTS_CLEAN_CACHE'
43
- }
44
-
45
- /* Cancel current generation and clear queue */
46
- export type GeneratorAppleTTSActionCancel = Action & {
47
- __actionName: 'GENERATOR_APPLE_TTS_CANCEL'
48
- }
49
-
50
- interface GeneratorAppleTTSDef {
51
- /*
52
- Default property:
53
- {
54
- "language": "en-US",
55
- "outputType": "play",
56
- "cacheGenerated": true,
57
- "autoInferEnable": false,
58
- "softBreakRegex": "^[^\\r\\n\\t\\f\\v]*([\\r\\n]+|[。!?!?.]\\B)",
59
- "hardBreakTime": 500
60
- }
61
- */
62
- property?: {
63
- /* Initialize the TTS context on generator initialization */
64
- init?: boolean | DataLink
65
- /* Voice identifier */
66
- voice?: string | DataLink
67
- /* Language/locale (e.g., 'en-US') */
68
- language?: string | DataLink
69
- /* Output mode */
70
- outputType?: 'play' | 'file' | DataLink
71
- /* Enable cache for generated audio */
72
- cacheGenerated?: boolean | DataLink
73
- /* Text to generate */
74
- prompt?: string | DataLink
75
- /* Auto inference when prompt changes */
76
- autoInferEnable?: boolean | DataLink
77
- /* Segmentation rule for auto inference */
78
- softBreakRegex?: string | DataLink
79
- /* Time to force inference when softBreakRegex is not satisfied */
80
- hardBreakTime?: number | DataLink
81
- }
82
- events?: {
83
- /* Event triggered when state change */
84
- onContextStateChange?: Array<
85
- EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onContextStateChange']>
86
- >
87
- /* Event triggered when error occurs */
88
- onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleTts']['onError']>>
89
- }
90
- outlets?: {
91
- /* Context state */
92
- contextState?: () => Data<string>
93
- /* Generated audio file */
94
- generatedAudio?: () => Data<string>
95
- /* Generated audio file is playing */
96
- generatedAudioPlaying?: () => Data<boolean>
97
- }
98
- }
99
-
100
- /* Text-to-speech synthesis using Apple's native speech synthesis
101
-
102
- ## Features
103
- - Native Apple speech synthesis
104
- - Natural sounding voices
105
- - Privacy-focused on-device processing
106
- - Multiple voice options
107
- - Requires iOS 13+ (native speech synthesis) */
108
- export type GeneratorAppleTTS = Generator &
109
- GeneratorAppleTTSDef & {
110
- templateKey: 'GENERATOR_APPLE_TTS'
111
- switches?: Array<
112
- SwitchDef &
113
- GeneratorAppleTTSDef & {
114
- conds?: Array<{
115
- method: '==' | '!=' | '>' | '<' | '>=' | '<='
116
- cond:
117
- | SwitchCondInnerStateCurrentCanvas
118
- | SwitchCondData
119
- | {
120
- __typename: 'SwitchCondInnerStateOutlet'
121
- outlet: 'contextState' | 'generatedAudio' | 'generatedAudioPlaying'
122
- value: any
123
- }
124
- }>
125
- }
126
- >
127
- }