@fugood/bricks-project 2.23.0-beta.42 → 2.23.0-beta.43

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 (60) hide show
  1. package/api/instance.ts +37 -5
  2. package/compile/index.ts +2 -0
  3. package/package.json +2 -2
  4. package/tools/deploy.ts +33 -2
  5. package/tools/postinstall.ts +0 -6
  6. package/tools/pull.ts +1 -1
  7. package/types/data.ts +2 -0
  8. package/types/generators/AlarmClock.ts +1 -0
  9. package/types/generators/Assistant.ts +6 -5
  10. package/types/generators/BleCentral.ts +1 -0
  11. package/types/generators/BlePeripheral.ts +1 -0
  12. package/types/generators/CanvasMap.ts +1 -0
  13. package/types/generators/CastlesPay.ts +1 -0
  14. package/types/generators/DataBank.ts +1 -0
  15. package/types/generators/File.ts +1 -0
  16. package/types/generators/GraphQl.ts +1 -0
  17. package/types/generators/Http.ts +1 -0
  18. package/types/generators/HttpServer.ts +1 -0
  19. package/types/generators/Information.ts +1 -0
  20. package/types/generators/Intent.ts +1 -0
  21. package/types/generators/Iterator.ts +1 -0
  22. package/types/generators/Keyboard.ts +1 -0
  23. package/types/generators/LlmAnthropicCompat.ts +1 -0
  24. package/types/generators/LlmAppleBuiltin.ts +1 -0
  25. package/types/generators/LlmGgml.ts +1 -0
  26. package/types/generators/LlmOnnx.ts +1 -0
  27. package/types/generators/LlmOpenAiCompat.ts +1 -0
  28. package/types/generators/LlmQualcommAiEngine.ts +1 -0
  29. package/types/generators/Mcp.ts +2 -1
  30. package/types/generators/McpServer.ts +7 -6
  31. package/types/generators/MediaFlow.ts +1 -0
  32. package/types/generators/MqttBroker.ts +1 -0
  33. package/types/generators/MqttClient.ts +1 -0
  34. package/types/generators/Question.ts +1 -0
  35. package/types/generators/RealtimeTranscription.ts +3 -2
  36. package/types/generators/RerankerGgml.ts +1 -0
  37. package/types/generators/SerialPort.ts +1 -0
  38. package/types/generators/SoundPlayer.ts +1 -0
  39. package/types/generators/SoundRecorder.ts +1 -0
  40. package/types/generators/SpeechToTextGgml.ts +1 -0
  41. package/types/generators/SpeechToTextOnnx.ts +1 -0
  42. package/types/generators/SpeechToTextPlatform.ts +1 -0
  43. package/types/generators/SqLite.ts +1 -0
  44. package/types/generators/Step.ts +1 -0
  45. package/types/generators/SttAppleBuiltin.ts +1 -0
  46. package/types/generators/Tcp.ts +1 -0
  47. package/types/generators/TcpServer.ts +1 -0
  48. package/types/generators/TextToSpeechAppleBuiltin.ts +1 -0
  49. package/types/generators/TextToSpeechGgml.ts +1 -0
  50. package/types/generators/TextToSpeechOnnx.ts +1 -0
  51. package/types/generators/TextToSpeechOpenAiLike.ts +1 -0
  52. package/types/generators/ThermalPrinter.ts +1 -0
  53. package/types/generators/Tick.ts +1 -0
  54. package/types/generators/Udp.ts +1 -0
  55. package/types/generators/VadGgml.ts +1 -0
  56. package/types/generators/VectorStore.ts +1 -0
  57. package/types/generators/Watchdog.ts +1 -0
  58. package/types/generators/WebCrawler.ts +1 -0
  59. package/types/generators/WebRtc.ts +3 -2
  60. package/types/generators/WebSocket.ts +1 -0
package/api/instance.ts CHANGED
@@ -66,17 +66,31 @@ export const deployApp = async (
66
66
  appId: string,
67
67
  config: Config,
68
68
  lastCommitId?: string,
69
+ changelogs?: string,
70
+ version?: string,
69
71
  ) => {
70
72
  const app = await pullApp(stage, appId)
71
73
  if (app.config?.bricks_project_last_commit_id === lastCommitId)
72
74
  throw new Error('No changes to deploy')
73
75
 
76
+ const versionName = version || app.name || 'Untitled'
77
+ const releaseNote = changelogs
78
+ ? `${changelogs}\n\nRelease by BRICKS Project`
79
+ : 'Release by BRICKS Project'
80
+
74
81
  const { errors } = await doGQL(
75
82
  stage,
76
- `mutation BRICKS_PROJECT_updateApplication($id: ID!, $config: String) {
83
+ `mutation BRICKS_PROJECT_releaseApplication(
84
+ $id: ID!,
85
+ $config: String,
86
+ $releaseCurrentVersion: String,
87
+ $releaseCurrentVersionNote: String
88
+ ) {
77
89
  updateApplication(
78
90
  id: $id,
79
- config: $config
91
+ config: $config,
92
+ releaseCurrentVersion: $releaseCurrentVersion,
93
+ releaseCurrentVersionNote: $releaseCurrentVersionNote
80
94
  ) {
81
95
  _id
82
96
  name
@@ -86,9 +100,11 @@ export const deployApp = async (
86
100
  id: appId,
87
101
  config: JSON.stringify({
88
102
  ...config,
89
- title: `${config.title || app.name || 'Untitled'} (${Date.now()})`,
103
+ title: versionName,
90
104
  bricks_project_last_commit_id: lastCommitId,
91
105
  }),
106
+ releaseCurrentVersion: versionName,
107
+ releaseCurrentVersionNote: releaseNote,
92
108
  },
93
109
  )
94
110
  if (errors) throw new Error(errors[0].message)
@@ -137,18 +153,32 @@ export const deployModule = async (
137
153
  modId: string,
138
154
  config: Config,
139
155
  lastCommitId?: string,
156
+ changelogs?: string,
157
+ version?: string,
140
158
  ) => {
141
159
  const mod = await pullModule(stage, modId)
142
160
  if (mod.config?.bricks_project_last_commit_id === lastCommitId)
143
161
  throw new Error('No changes to deploy')
144
162
 
163
+ const versionName = version || mod.name || 'Untitled'
164
+ const releaseNote = changelogs
165
+ ? `${changelogs}\n\nRelease by BRICKS Project`
166
+ : 'Release by BRICKS Project'
167
+
145
168
  const { errors } = await doGQL(
146
169
  stage,
147
- `mutation BRICKS_PROJECT_updateModule($id: ID!, $config: String) {
170
+ `mutation BRICKS_PROJECT_releaseModule(
171
+ $id: ID!,
172
+ $config: String,
173
+ $releaseCurrentVersion: String,
174
+ $releaseCurrentVersionNote: String
175
+ ) {
148
176
  updateModule(
149
177
  id: $id
150
178
  config: $config
151
179
  validateConfig: true
180
+ releaseCurrentVersion: $releaseCurrentVersion
181
+ releaseCurrentVersionNote: $releaseCurrentVersionNote
152
182
  ) {
153
183
  _id
154
184
  name
@@ -158,9 +188,11 @@ export const deployModule = async (
158
188
  id: modId,
159
189
  config: JSON.stringify({
160
190
  ...config,
161
- title: `${config.title || mod.name || 'Untitled'} (${Date.now()})`,
191
+ title: versionName,
162
192
  bricks_project_last_commit_id: lastCommitId,
163
193
  }),
194
+ releaseCurrentVersion: versionName,
195
+ releaseCurrentVersionNote: releaseNote,
164
196
  },
165
197
  )
166
198
  if (errors) throw new Error(errors[0].message)
package/compile/index.ts CHANGED
@@ -669,6 +669,8 @@ export const compile = async (app: Application) => {
669
669
  camelCase: false,
670
670
  errorReference: `(data: ${data.id}, subspace ${subspace.id})`,
671
671
  }),
672
+ hit_equal: data.hit_equal,
673
+ hit_regex: data.hit_regex,
672
674
  }
673
675
  return map
674
676
  }, {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.23.0-beta.42",
3
+ "version": "2.23.0-beta.43",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "bun scripts/build.js"
@@ -14,5 +14,5 @@
14
14
  "lodash": "^4.17.4",
15
15
  "uuid": "^8.3.1"
16
16
  },
17
- "gitHead": "f5b6cdd736782df9ff1389eac650f738496f309f"
17
+ "gitHead": "fcb007df8da241bb118f4ee086f65331a237a3c0"
18
18
  }
package/tools/deploy.ts CHANGED
@@ -1,8 +1,21 @@
1
1
  import { $ } from 'bun'
2
+ import { parseArgs } from 'util'
2
3
  import { deployApp, deployModule } from '../api'
3
4
 
4
5
  const cwd = process.cwd()
5
6
 
7
+ // Parse command-line arguments
8
+ const {
9
+ values: { changelogs: changelogsArg, 'changelogs-file': changelogsFile },
10
+ } = parseArgs({
11
+ args: Bun.argv.slice(2),
12
+ options: {
13
+ changelogs: { type: 'string' },
14
+ 'changelogs-file': { type: 'string' },
15
+ },
16
+ allowPositionals: true,
17
+ })
18
+
6
19
  const { exitCode } = await $`cd ${cwd} && git status`.nothrow()
7
20
  const isGitRepo = exitCode === 0
8
21
 
@@ -22,14 +35,32 @@ const app = await Bun.file(`${cwd}/application.json`).json()
22
35
  const stage = app.stage || 'production'
23
36
  const config = await Bun.file(`${cwd}/.bricks/build/application-config.json`).json()
24
37
 
38
+ // Get version from project's package.json
39
+ const pkgFile = Bun.file(`${cwd}/package.json`)
40
+ const version = (await pkgFile.exists()) ? (await pkgFile.json()).version : undefined
41
+
42
+ // Get changelog from flag, file, or prompt
43
+ let changelogs = ''
44
+ if (changelogsArg) {
45
+ changelogs = changelogsArg
46
+ } else if (changelogsFile) {
47
+ const file = Bun.file(changelogsFile)
48
+ if (!(await file.exists())) {
49
+ throw new Error(`Changelogs file not found: ${changelogsFile}`)
50
+ }
51
+ changelogs = await file.text()
52
+ } else {
53
+ changelogs = prompt('Enter changelogs (optional, press Enter to skip):') || ''
54
+ }
55
+
25
56
  // ask for confirmation
26
57
  const confirm = prompt('Are you sure you want to deploy? (y/n)')
27
58
  if (confirm !== 'y') throw new Error('Deployment cancelled')
28
59
 
29
60
  if (!app.type || app.type === 'application') {
30
- await deployApp(stage, app.id, config, commitId)
61
+ await deployApp(stage, app.id, config, commitId, changelogs, version)
31
62
  console.log('App deployed')
32
63
  } else if (app.type === 'module') {
33
- await deployModule(stage, app.id, config, commitId)
64
+ await deployModule(stage, app.id, config, commitId, changelogs, version)
34
65
  console.log('Module deployed')
35
66
  }
@@ -55,13 +55,7 @@ const handleMcpConfigOverride = async (mcpConfigPath: string) => {
55
55
  console.log(`Updated ${mcpConfigPath}`)
56
56
  }
57
57
 
58
- if (await exists(`${cwd}/.cursor/rules/instructions.mdc`)) {
59
- const cursorMcpConfigPath = `${cwd}/.cursor/mcp.json`
60
- await handleMcpConfigOverride(cursorMcpConfigPath)
61
- }
62
-
63
58
  if (await exists(`${cwd}/CLAUDE.md`)) {
64
- await $`mkdir -p ${cwd}/.cursor`
65
59
  const claudeCodeMcpConfigPath = `${cwd}/.mcp.json`
66
60
  await handleMcpConfigOverride(claudeCodeMcpConfigPath)
67
61
  }
package/tools/pull.ts CHANGED
@@ -70,7 +70,7 @@ await Promise.all(
70
70
 
71
71
  if (isGitRepo) {
72
72
  await $`cd ${cwd} && git add .`
73
- await $`cd ${cwd} && git commit -m 'Apply ${app.name} file changes'`
73
+ await $`cd ${cwd} && git commit -m 'chore(project): apply file changes from BRICKS application'`
74
74
  if (!useMain) {
75
75
  await $`cd ${cwd} && git merge main`
76
76
  }
package/types/data.ts CHANGED
@@ -32,6 +32,8 @@ export type Data<T = any> = DataDef & {
32
32
  localSyncUpdateMode?: LocalSyncStrategy
33
33
  type: 'string' | 'number' | 'bool' | 'array' | 'object' | 'any'
34
34
  schema?: object
35
+ hit_equal?: any
36
+ hit_regex?: string
35
37
  kind?:
36
38
  | {
37
39
  type: 'id'
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -434,7 +435,7 @@ Default property:
434
435
  /* Whether to cache messages */
435
436
  cacheMessages?: boolean | DataLink
436
437
  /* LLM Generator (Supports `LLM (GGML)` and `OpenAI LLM` generators) */
437
- llmGeneratorId?: string | DataLink
438
+ llmGeneratorId?: string | DataLink | (() => Generator)
438
439
  /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
439
440
 
440
441
  Note: LLM (Qualcomm AI Engine) recommend use `manual` and loaded constantly. */
@@ -463,7 +464,7 @@ Default property:
463
464
  /* File Search (Vector Store) Enabled */
464
465
  fileSearchEnabled?: boolean | DataLink
465
466
  /* File Search (Vector Store) Generator */
466
- fileSearchGeneratorId?: string | DataLink
467
+ fileSearchGeneratorId?: string | DataLink | (() => Generator)
467
468
  /* File Search (Vector Store) Live Policy. If the policy is `only-in-use`, the File Search (Vector Store) context will be released when the assistant is not in use. */
468
469
  fileSearchLivePolicy?: 'only-in-use' | 'manual' | DataLink
469
470
  /* File Search Citation Count. (Default: 3) */
@@ -473,13 +474,13 @@ Default property:
473
474
  /* File Search Ignore Threshold. (Default: false) */
474
475
  fileSearchIgnoreThreshold?: boolean | DataLink
475
476
  /* STT Generator use for transcribing audio message (Supports `STT (GGML)` generators) */
476
- sttGeneratorId?: string | DataLink
477
+ sttGeneratorId?: string | DataLink | (() => Generator)
477
478
  /* STT Enabled */
478
479
  sttEnabled?: boolean | DataLink
479
480
  /* STT Live Policy. If the policy is `only-in-use`, the STT context will be released when the assistant is not in use. */
480
481
  sttLivePolicy?: 'only-in-use' | 'manual' | DataLink
481
482
  /* TTS Generator use for generating LLM response audio message (Supports `TTS (ONNX)` and `OpenAI TTS` generators) */
482
- ttsGeneratorId?: string | DataLink
483
+ ttsGeneratorId?: string | DataLink | (() => Generator)
483
484
  /* TTS Enabled */
484
485
  ttsEnabled?: boolean | DataLink
485
486
  /* TTS Live Policy. If the policy is `only-in-use`, the TTS context will be released when the assistant is not in use. */
@@ -489,7 +490,7 @@ Default property:
489
490
  | Array<
490
491
  | DataLink
491
492
  | {
492
- generatorId?: string | DataLink
493
+ generatorId?: string | DataLink | (() => Generator)
493
494
  generatorKey?: string | DataLink
494
495
  name?: string | DataLink
495
496
  enabled?: boolean | DataLink
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -168,7 +169,7 @@ Default property:
168
169
  /* Bearer token for authentication */
169
170
  bearerToken?: string | DataLink
170
171
  /* Generator MCP Server ID for direct link */
171
- generatorId?: string | DataLink
172
+ generatorId?: string | DataLink | (() => Generator)
172
173
  /* Application-scoped key of Generator MCP Server for direct link (If ID is not provided) */
173
174
  generatorKey?: string | DataLink
174
175
  /* Name of the MCP client */
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -68,7 +69,7 @@ Default property:
68
69
  dataChangeConfig?:
69
70
  | DataLink
70
71
  | {
71
- target?: string | DataLink
72
+ target?: string | DataLink | (() => Data)
72
73
  timeout?: number | DataLink
73
74
  additionalParams?: {} | DataLink
74
75
  }
@@ -81,7 +82,7 @@ Default property:
81
82
  | Array<
82
83
  | DataLink
83
84
  | {
84
- handler?: string | DataLink
85
+ handler?: string | DataLink | (() => Generator)
85
86
  varName?: string | DataLink
86
87
  }
87
88
  >
@@ -114,7 +115,7 @@ Default property:
114
115
  dataChangeConfig?:
115
116
  | DataLink
116
117
  | {
117
- target?: string | DataLink
118
+ target?: string | DataLink | (() => Data)
118
119
  timeout?: number | DataLink
119
120
  additionalParams?: {} | DataLink
120
121
  }
@@ -127,7 +128,7 @@ Default property:
127
128
  | Array<
128
129
  | DataLink
129
130
  | {
130
- handler?: string | DataLink
131
+ handler?: string | DataLink | (() => Generator)
131
132
  varName?: string | DataLink
132
133
  }
133
134
  >
@@ -160,7 +161,7 @@ Default property:
160
161
  dataChangeConfig?:
161
162
  | DataLink
162
163
  | {
163
- target?: string | DataLink
164
+ target?: string | DataLink | (() => Data)
164
165
  timeout?: number | DataLink
165
166
  additionalParams?: {} | DataLink
166
167
  }
@@ -173,7 +174,7 @@ Default property:
173
174
  | Array<
174
175
  | DataLink
175
176
  | {
176
- handler?: string | DataLink
177
+ handler?: string | DataLink | (() => Generator)
177
178
  varName?: string | DataLink
178
179
  }
179
180
  >
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -57,11 +58,11 @@ Default property:
57
58
  */
58
59
  property?: {
59
60
  /* STT Generator for Whisper context */
60
- sttGeneratorId?: string | DataLink
61
+ sttGeneratorId?: string | DataLink | (() => Generator)
61
62
  /* STT Live Policy. If the policy is `only-in-use`, the STT context will be released when not in use. */
62
63
  sttLivePolicy?: 'only-in-use' | 'manual' | DataLink
63
64
  /* VAD Inference Generator for voice activity detection */
64
- vadInferenceGeneratorId?: string | DataLink
65
+ vadInferenceGeneratorId?: string | DataLink | (() => Generator)
65
66
  /* VAD Inference Live Policy. If the policy is `only-in-use`, the VAD Inference context will be released when not in use. */
66
67
  vadInferenceLivePolicy?: 'only-in-use' | 'manual' | DataLink
67
68
  /* Enable VAD (Voice Activity Detection) */
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,
@@ -59,9 +60,9 @@ Default property:
59
60
  /* Calee ID, to ilter caller signal */
60
61
  calleeId?: string | DataLink
61
62
  /* Target local WebRTC stream preview brick ID */
62
- localVideoTarget?: string | DataLink
63
+ localVideoTarget?: string | DataLink | (() => Brick)
63
64
  /* Target remote WebRTC stream brick ID */
64
- remoteVideoTarget?: string | DataLink
65
+ remoteVideoTarget?: string | DataLink | (() => Brick)
65
66
  /* ICE Server list
66
67
  Default use Google public STUN servers if not setted. */
67
68
  iceServers?:
@@ -2,6 +2,7 @@
2
2
  import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
3
3
  import type { Data, DataLink } from '../data'
4
4
  import type {
5
+ Brick,
5
6
  Generator,
6
7
  EventAction,
7
8
  ActionWithDataParams,