@fugood/bricks-project 2.22.6 → 2.22.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.
- package/api/instance.ts +37 -5
- package/compile/action-name-map.ts +29 -0
- package/compile/index.ts +2 -0
- package/package.json +1 -1
- package/tools/deploy.ts +33 -2
- package/tools/postinstall.ts +0 -6
- package/tools/pull.ts +1 -1
- package/types/brick-base.ts +1 -0
- package/types/bricks/Camera.ts +1 -0
- package/types/bricks/Chart.ts +1 -0
- package/types/bricks/GenerativeMedia.ts +17 -1
- package/types/bricks/Icon.ts +1 -0
- package/types/bricks/Image.ts +1 -0
- package/types/bricks/Items.ts +1 -0
- package/types/bricks/Lottie.ts +1 -0
- package/types/bricks/QrCode.ts +1 -0
- package/types/bricks/Rect.ts +1 -0
- package/types/bricks/RichText.ts +1 -0
- package/types/bricks/Rive.ts +1 -0
- package/types/bricks/Slideshow.ts +1 -0
- package/types/bricks/Svg.ts +1 -0
- package/types/bricks/Text.ts +1 -0
- package/types/bricks/TextInput.ts +1 -0
- package/types/bricks/Video.ts +1 -0
- package/types/bricks/VideoStreaming.ts +1 -0
- package/types/bricks/WebRtcStream.ts +1 -0
- package/types/bricks/WebView.ts +8 -1
- package/types/bricks/index.ts +1 -0
- package/types/canvas.ts +1 -0
- package/types/data-calc.ts +43 -0
- package/types/data.ts +3 -0
- package/types/generators/AlarmClock.ts +2 -0
- package/types/generators/Assistant.ts +30 -6
- package/types/generators/BleCentral.ts +2 -0
- package/types/generators/BlePeripheral.ts +2 -0
- package/types/generators/CanvasMap.ts +2 -0
- package/types/generators/CastlesPay.ts +2 -0
- package/types/generators/DataBank.ts +2 -0
- package/types/generators/File.ts +2 -0
- package/types/generators/GraphQl.ts +2 -0
- package/types/generators/Http.ts +84 -2
- package/types/generators/HttpServer.ts +5 -1
- package/types/generators/Information.ts +2 -0
- package/types/generators/Intent.ts +51 -0
- package/types/generators/Iterator.ts +2 -0
- package/types/generators/Keyboard.ts +2 -0
- package/types/generators/LlmAnthropicCompat.ts +2 -0
- package/types/generators/LlmGgml.ts +7 -0
- package/types/generators/LlmOnnx.ts +2 -0
- package/types/generators/LlmOpenAiCompat.ts +2 -0
- package/types/generators/LlmQualcommAiEngine.ts +2 -0
- package/types/generators/Mcp.ts +3 -1
- package/types/generators/McpServer.ts +8 -6
- package/types/generators/MediaFlow.ts +2 -0
- package/types/generators/MqttBroker.ts +2 -0
- package/types/generators/MqttClient.ts +2 -0
- package/types/generators/Question.ts +2 -0
- package/types/generators/RealtimeTranscription.ts +4 -2
- package/types/generators/RerankerGgml.ts +2 -0
- package/types/generators/SerialPort.ts +2 -0
- package/types/generators/SoundPlayer.ts +2 -0
- package/types/generators/SoundRecorder.ts +2 -0
- package/types/generators/SpeechToTextGgml.ts +5 -4
- package/types/generators/SpeechToTextOnnx.ts +2 -0
- package/types/generators/SpeechToTextPlatform.ts +2 -0
- package/types/generators/SqLite.ts +2 -0
- package/types/generators/Step.ts +2 -0
- package/types/generators/Tcp.ts +2 -0
- package/types/generators/TcpServer.ts +5 -1
- package/types/generators/TextToSpeechGgml.ts +2 -0
- package/types/generators/TextToSpeechOnnx.ts +2 -0
- package/types/generators/TextToSpeechOpenAiLike.ts +2 -0
- package/types/generators/ThermalPrinter.ts +2 -0
- package/types/generators/Tick.ts +2 -0
- package/types/generators/Udp.ts +2 -0
- package/types/generators/VadGgml.ts +4 -2
- package/types/generators/VectorStore.ts +2 -0
- package/types/generators/Watchdog.ts +2 -0
- package/types/generators/WebCrawler.ts +2 -0
- package/types/generators/WebRtc.ts +4 -2
- package/types/generators/WebSocket.ts +2 -0
- package/types/system.ts +1 -0
- package/utils/data.ts +1 -0
- package/utils/event-props.ts +9 -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
|
|
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:
|
|
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
|
|
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:
|
|
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)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
2
|
+
|
|
1
3
|
// NOTE: The action parameter name convertion is not 1:1 mapping case conversion, so we need to define the mapping here
|
|
2
4
|
// This may be improved in the future
|
|
3
5
|
export const templateActionNameMap = {
|
|
@@ -370,6 +372,23 @@ export const templateActionNameMap = {
|
|
|
370
372
|
variables: 'GENERATOR_GRAPHQL_VARIABLES',
|
|
371
373
|
},
|
|
372
374
|
},
|
|
375
|
+
GENERATOR_HTTP: {
|
|
376
|
+
GENERATOR_HTTP_RUN_REQUEST: {
|
|
377
|
+
url: 'GENERATOR_HTTP_URL',
|
|
378
|
+
method: 'GENERATOR_HTTP_METHOD',
|
|
379
|
+
headers: 'GENERATOR_HTTP_HEADERS',
|
|
380
|
+
body: 'GENERATOR_HTTP_BODY',
|
|
381
|
+
timeout: 'GENERATOR_HTTP_TIMEOUT',
|
|
382
|
+
mode: 'GENERATOR_HTTP_MODE',
|
|
383
|
+
credentials: 'GENERATOR_HTTP_CREDENTIALS',
|
|
384
|
+
redirect: 'GENERATOR_HTTP_REDIRECT',
|
|
385
|
+
referrer: 'GENERATOR_HTTP_REFERRER',
|
|
386
|
+
resType: 'GENERATOR_HTTP_RES_TYPE',
|
|
387
|
+
resSelector: 'GENERATOR_HTTP_RES_SELECTOR',
|
|
388
|
+
eventStream: 'GENERATOR_HTTP_EVENT_STREAM',
|
|
389
|
+
eventName: 'GENERATOR_HTTP_EVENT_NAME',
|
|
390
|
+
},
|
|
391
|
+
},
|
|
373
392
|
|
|
374
393
|
GENERATOR_WEB_SOCKET: {
|
|
375
394
|
GENERATOR_WEB_SOCKET_EMIT: {
|
|
@@ -497,6 +516,16 @@ export const templateActionNameMap = {
|
|
|
497
516
|
packageName: 'GENERATOR_INTENT_PACKAGE_NAME',
|
|
498
517
|
category: 'GENERATOR_INTENT_CATEGORY',
|
|
499
518
|
},
|
|
519
|
+
GENERATOR_INTENT_START_SERVICE: {
|
|
520
|
+
action: 'GENERATOR_INTENT_ACTION',
|
|
521
|
+
data: 'GENERATOR_INTENT_DATA',
|
|
522
|
+
type: 'GENERATOR_INTENT_TYPE',
|
|
523
|
+
extra: 'GENERATOR_INTENT_EXTRA',
|
|
524
|
+
className: 'GENERATOR_INTENT_CLASS_NAME',
|
|
525
|
+
packageName: 'GENERATOR_INTENT_PACKAGE_NAME',
|
|
526
|
+
category: 'GENERATOR_INTENT_CATEGORY',
|
|
527
|
+
foreground: 'GENERATOR_INTENT_FOREGROUND',
|
|
528
|
+
},
|
|
500
529
|
},
|
|
501
530
|
GENERATOR_CASTLES_PAY: {
|
|
502
531
|
GENERATOR_CASTLES_PAY_SALE: {
|
package/compile/index.ts
CHANGED
package/package.json
CHANGED
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
|
}
|
package/tools/postinstall.ts
CHANGED
|
@@ -58,13 +58,7 @@ const handleMcpConfigOverride = async (mcpConfigPath: string) => {
|
|
|
58
58
|
console.log(`Updated ${mcpConfigPath}`)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
if (await exists(`${cwd}/.cursor/rules/instructions.mdc`)) {
|
|
62
|
-
const cursorMcpConfigPath = `${cwd}/.cursor/mcp.json`
|
|
63
|
-
await handleMcpConfigOverride(cursorMcpConfigPath)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
61
|
if (await exists(`${cwd}/CLAUDE.md`)) {
|
|
67
|
-
await $`mkdir -p ${cwd}/.cursor`
|
|
68
62
|
const claudeCodeMcpConfigPath = `${cwd}/.mcp.json`
|
|
69
63
|
await handleMcpConfigOverride(claudeCodeMcpConfigPath)
|
|
70
64
|
}
|
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 '
|
|
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/brick-base.ts
CHANGED
package/types/bricks/Camera.ts
CHANGED
package/types/bricks/Chart.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
3
|
import type { Data, DataLink } from '../data'
|
|
3
4
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -20,7 +21,10 @@ Default property:
|
|
|
20
21
|
"type": "image",
|
|
21
22
|
"resizeMode": "cover",
|
|
22
23
|
"provider": "openai",
|
|
23
|
-
"freepikClassicImageSize": "square_1_1"
|
|
24
|
+
"freepikClassicImageSize": "square_1_1",
|
|
25
|
+
"geminiVeoModel": "veo-3.1-generate-preview",
|
|
26
|
+
"geminiVeoResolution": "720p",
|
|
27
|
+
"geminiVeoDuration": 8
|
|
24
28
|
}
|
|
25
29
|
*/
|
|
26
30
|
property?: BrickBasicProperty & {
|
|
@@ -160,6 +164,18 @@ Default property:
|
|
|
160
164
|
deepaiHeight?: number | DataLink
|
|
161
165
|
/* Gemini aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3) */
|
|
162
166
|
geminiAspectRatio?: '1:1' | '16:9' | '9:16' | '3:2' | '2:3' | DataLink
|
|
167
|
+
/* Gemini model to use for image generation */
|
|
168
|
+
geminiModel?: 'gemini-2.5-flash-image' | 'gemini-3-pro-image-preview' | DataLink
|
|
169
|
+
/* Gemini Veo model to use for video generation */
|
|
170
|
+
geminiVeoModel?: 'veo-3.1-generate-preview' | 'veo-3.1-fast-generate-preview' | DataLink
|
|
171
|
+
/* Gemini Veo video resolution (720p or 1080p) */
|
|
172
|
+
geminiVeoResolution?: '720p' | '1080p' | DataLink
|
|
173
|
+
/* Gemini Veo video duration in seconds (4, 6, 8) */
|
|
174
|
+
geminiVeoDuration?: 4 | 6 | 8 | DataLink
|
|
175
|
+
/* Gemini Veo negative prompt (attributes to avoid) */
|
|
176
|
+
geminiVeoNegativePrompt?: string | DataLink
|
|
177
|
+
/* Gemini Veo person generation control */
|
|
178
|
+
geminiVeoPersonGeneration?: 'allow_all' | 'allow_adult' | DataLink
|
|
163
179
|
}
|
|
164
180
|
events?: BrickBasicEvents & {
|
|
165
181
|
/* Event of the brick press */
|
package/types/bricks/Icon.ts
CHANGED
package/types/bricks/Image.ts
CHANGED
package/types/bricks/Items.ts
CHANGED
package/types/bricks/Lottie.ts
CHANGED
package/types/bricks/QrCode.ts
CHANGED
package/types/bricks/Rect.ts
CHANGED
package/types/bricks/RichText.ts
CHANGED
package/types/bricks/Rive.ts
CHANGED
package/types/bricks/Svg.ts
CHANGED
package/types/bricks/Text.ts
CHANGED
package/types/bricks/Video.ts
CHANGED
package/types/bricks/WebView.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
3
|
import type { Data, DataLink } from '../data'
|
|
3
4
|
import type { Animation, AnimationBasicEvents } from '../animation'
|
|
@@ -68,7 +69,9 @@ Default property:
|
|
|
68
69
|
"cacheEnabled": true,
|
|
69
70
|
"geolocationEnabled": true,
|
|
70
71
|
"thirdPartyCookiesEnabled": true,
|
|
71
|
-
"javaScriptEnabled": true
|
|
72
|
+
"javaScriptEnabled": true,
|
|
73
|
+
"scrollEnabled": true,
|
|
74
|
+
"nestedScrollEnabled": true
|
|
72
75
|
}
|
|
73
76
|
*/
|
|
74
77
|
property?: BrickBasicProperty & {
|
|
@@ -112,6 +115,10 @@ Default property:
|
|
|
112
115
|
forMainFrameOnly?: boolean | DataLink
|
|
113
116
|
/* Inject JavaScript code before content loaded for main frame only (only `YES` supported for Android) */
|
|
114
117
|
beforeContentLoadedForMainFrameOnly?: boolean | DataLink
|
|
118
|
+
/* Enable scroll in WebView */
|
|
119
|
+
scrollEnabled?: boolean | DataLink
|
|
120
|
+
/* Enable nested scroll in WebView (Android only) */
|
|
121
|
+
nestedScrollEnabled?: boolean | DataLink
|
|
115
122
|
}
|
|
116
123
|
events?: BrickBasicEvents & {
|
|
117
124
|
/* Event of the WebView on load */
|
package/types/bricks/index.ts
CHANGED
package/types/canvas.ts
CHANGED
package/types/data-calc.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { Data } from './data'
|
|
2
3
|
|
|
3
4
|
/* DataCalculation has two types: DataCalculationScript and DataCalculationMap */
|
|
@@ -3849,6 +3850,48 @@ export type DataCommandStringTitleCase = DataCommand & {
|
|
|
3849
3850
|
}>
|
|
3850
3851
|
}
|
|
3851
3852
|
|
|
3853
|
+
/*
|
|
3854
|
+
TOON Decode
|
|
3855
|
+
Decode TOON string. Return undefined if decode failed.
|
|
3856
|
+
*/
|
|
3857
|
+
export type DataCommandStringToolDecode = DataCommand & {
|
|
3858
|
+
__commandName: 'STRING_TOOL_DECODE'
|
|
3859
|
+
inputs?: Array<{
|
|
3860
|
+
// Default value: "{}"
|
|
3861
|
+
key: 'subject'
|
|
3862
|
+
source: (() => DataCalculationData | DataCommand) | string
|
|
3863
|
+
sourceKey: string
|
|
3864
|
+
trigger?: boolean
|
|
3865
|
+
}>
|
|
3866
|
+
outputs?: Array<{
|
|
3867
|
+
key: 'result'
|
|
3868
|
+
// target type: any
|
|
3869
|
+
target: () => DataCalculationData | DataCommand
|
|
3870
|
+
targetKey: string
|
|
3871
|
+
}>
|
|
3872
|
+
}
|
|
3873
|
+
|
|
3874
|
+
/*
|
|
3875
|
+
TOON Encode
|
|
3876
|
+
Encode TOON string. Return undefined if encode failed.
|
|
3877
|
+
*/
|
|
3878
|
+
export type DataCommandStringToolEncode = DataCommand & {
|
|
3879
|
+
__commandName: 'STRING_TOOL_ENCODE'
|
|
3880
|
+
inputs?: Array<{
|
|
3881
|
+
// Default value: {}
|
|
3882
|
+
key: 'subject'
|
|
3883
|
+
source: (() => DataCalculationData | DataCommand) | any
|
|
3884
|
+
sourceKey: string
|
|
3885
|
+
trigger?: boolean
|
|
3886
|
+
}>
|
|
3887
|
+
outputs?: Array<{
|
|
3888
|
+
key: 'result'
|
|
3889
|
+
// target type: string
|
|
3890
|
+
target: () => DataCalculationData | DataCommand
|
|
3891
|
+
targetKey: string
|
|
3892
|
+
}>
|
|
3893
|
+
}
|
|
3894
|
+
|
|
3852
3895
|
/*
|
|
3853
3896
|
Trim
|
|
3854
3897
|
Removes whitespaces from left and right sides of the subject.
|
package/types/data.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { SubspaceID, EventAction, LocalSyncStrategy } from './common'
|
|
2
3
|
|
|
3
4
|
interface DataDef {
|
|
@@ -31,6 +32,8 @@ export type Data<T = any> = DataDef & {
|
|
|
31
32
|
localSyncUpdateMode?: LocalSyncStrategy
|
|
32
33
|
type: 'string' | 'number' | 'bool' | 'array' | 'object' | 'any'
|
|
33
34
|
schema?: object
|
|
35
|
+
hit_equal?: any
|
|
36
|
+
hit_regex?: string
|
|
34
37
|
kind?:
|
|
35
38
|
| {
|
|
36
39
|
type: 'id'
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
/* Auto generated by build script */
|
|
1
2
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
2
3
|
import type { Data, DataLink } from '../data'
|
|
3
4
|
import type {
|
|
5
|
+
Brick,
|
|
4
6
|
Generator,
|
|
5
7
|
EventAction,
|
|
6
8
|
ActionWithDataParams,
|
|
@@ -411,7 +413,10 @@ Default property:
|
|
|
411
413
|
"sttEnabled": true,
|
|
412
414
|
"sttLivePolicy": "only-in-use",
|
|
413
415
|
"ttsEnabled": false,
|
|
414
|
-
"ttsLivePolicy": "only-in-use"
|
|
416
|
+
"ttsLivePolicy": "only-in-use",
|
|
417
|
+
"mcpResourceAnnotationEnabled": false,
|
|
418
|
+
"mcpResourceAnnotationKeyword": "@resource:",
|
|
419
|
+
"mcpResourceAnnotationFallback": ""
|
|
415
420
|
}
|
|
416
421
|
*/
|
|
417
422
|
property?: {
|
|
@@ -430,7 +435,7 @@ Default property:
|
|
|
430
435
|
/* Whether to cache messages */
|
|
431
436
|
cacheMessages?: boolean | DataLink
|
|
432
437
|
/* LLM Generator (Supports `LLM (GGML)` and `OpenAI LLM` generators) */
|
|
433
|
-
llmGeneratorId?: string | DataLink
|
|
438
|
+
llmGeneratorId?: string | DataLink | (() => Generator)
|
|
434
439
|
/* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
|
|
435
440
|
|
|
436
441
|
Note: LLM (Qualcomm AI Engine) recommend use `manual` and loaded constantly. */
|
|
@@ -453,10 +458,13 @@ Default property:
|
|
|
453
458
|
| DataLink
|
|
454
459
|
/* Summary Session Key (Custom session key for summarization) */
|
|
455
460
|
llmSummarySessionKey?: string | DataLink
|
|
461
|
+
/* Generate fallback content for tool calls when LLM returns tool calls without text content. When enabled, creates a message like "Call:
|
|
462
|
+
functionName(args)" to keep the conversation readable. */
|
|
463
|
+
llmToolCallFallbackContent?: boolean | DataLink
|
|
456
464
|
/* File Search (Vector Store) Enabled */
|
|
457
465
|
fileSearchEnabled?: boolean | DataLink
|
|
458
466
|
/* File Search (Vector Store) Generator */
|
|
459
|
-
fileSearchGeneratorId?: string | DataLink
|
|
467
|
+
fileSearchGeneratorId?: string | DataLink | (() => Generator)
|
|
460
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. */
|
|
461
469
|
fileSearchLivePolicy?: 'only-in-use' | 'manual' | DataLink
|
|
462
470
|
/* File Search Citation Count. (Default: 3) */
|
|
@@ -466,13 +474,13 @@ Default property:
|
|
|
466
474
|
/* File Search Ignore Threshold. (Default: false) */
|
|
467
475
|
fileSearchIgnoreThreshold?: boolean | DataLink
|
|
468
476
|
/* STT Generator use for transcribing audio message (Supports `STT (GGML)` generators) */
|
|
469
|
-
sttGeneratorId?: string | DataLink
|
|
477
|
+
sttGeneratorId?: string | DataLink | (() => Generator)
|
|
470
478
|
/* STT Enabled */
|
|
471
479
|
sttEnabled?: boolean | DataLink
|
|
472
480
|
/* STT Live Policy. If the policy is `only-in-use`, the STT context will be released when the assistant is not in use. */
|
|
473
481
|
sttLivePolicy?: 'only-in-use' | 'manual' | DataLink
|
|
474
482
|
/* TTS Generator use for generating LLM response audio message (Supports `TTS (ONNX)` and `OpenAI TTS` generators) */
|
|
475
|
-
ttsGeneratorId?: string | DataLink
|
|
483
|
+
ttsGeneratorId?: string | DataLink | (() => Generator)
|
|
476
484
|
/* TTS Enabled */
|
|
477
485
|
ttsEnabled?: boolean | DataLink
|
|
478
486
|
/* TTS Live Policy. If the policy is `only-in-use`, the TTS context will be released when the assistant is not in use. */
|
|
@@ -482,13 +490,23 @@ Default property:
|
|
|
482
490
|
| Array<
|
|
483
491
|
| DataLink
|
|
484
492
|
| {
|
|
485
|
-
generatorId?: string | DataLink
|
|
493
|
+
generatorId?: string | DataLink | (() => Generator)
|
|
486
494
|
generatorKey?: string | DataLink
|
|
487
495
|
name?: string | DataLink
|
|
488
496
|
enabled?: boolean | DataLink
|
|
497
|
+
includeTools?: Array<string | DataLink> | DataLink
|
|
498
|
+
excludeTools?: Array<string | DataLink> | DataLink
|
|
499
|
+
blockTools?: Array<string | DataLink> | DataLink
|
|
500
|
+
blockToolMessage?: string | DataLink
|
|
489
501
|
}
|
|
490
502
|
>
|
|
491
503
|
| DataLink
|
|
504
|
+
/* Enable MCP resource annotation in messages. When enabled, users can use keyboard shortcuts to include MCP resources using the format: @resource:<server-name>:<resource-uri> */
|
|
505
|
+
mcpResourceAnnotationEnabled?: boolean | DataLink
|
|
506
|
+
/* MCP resource annotation keyword (Default: @resource:) */
|
|
507
|
+
mcpResourceAnnotationKeyword?: string | DataLink
|
|
508
|
+
/* Fallback text when MCP server or resource is not found. If empty, an error will be thrown. */
|
|
509
|
+
mcpResourceAnnotationFallback?: string | DataLink
|
|
492
510
|
}
|
|
493
511
|
events?: {
|
|
494
512
|
/* Error event */
|
|
@@ -497,6 +515,12 @@ Default property:
|
|
|
497
515
|
onLogs?: Array<EventAction>
|
|
498
516
|
/* Messages update event */
|
|
499
517
|
onMessagesUpdate?: Array<EventAction>
|
|
518
|
+
/* Heatup finished event */
|
|
519
|
+
onHeatupFinished?: Array<EventAction>
|
|
520
|
+
/* Generating event (triggered when assistant starts generating response) */
|
|
521
|
+
onGenerating?: Array<EventAction>
|
|
522
|
+
/* Finished event (triggered when assistant finishes generating response) */
|
|
523
|
+
onFinished?: Array<EventAction>
|
|
500
524
|
}
|
|
501
525
|
outlets?: {
|
|
502
526
|
/* Whether the assistant is heating up */
|