@fugood/bricks-project 2.23.6 → 2.23.8
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/compile/action-name-map.ts +6 -0
- package/compile/index.ts +64 -43
- package/compile/util.ts +2 -0
- package/package.json +2 -2
- package/skills/bricks-design/LICENSE.txt +180 -0
- package/skills/bricks-design/SKILL.md +66 -0
- package/tools/deploy.ts +2 -2
- package/tools/preview.ts +1 -1
- package/types/automation.ts +1 -1
- package/types/bricks/Camera.ts +15 -7
- package/types/bricks/Chart.ts +9 -3
- package/types/bricks/GenerativeMedia.ts +24 -8
- package/types/bricks/Icon.ts +6 -2
- package/types/bricks/Image.ts +7 -3
- package/types/bricks/Items.ts +22 -8
- package/types/bricks/Lottie.ts +12 -4
- package/types/bricks/Maps.ts +13 -5
- package/types/bricks/QrCode.ts +6 -2
- package/types/bricks/Rect.ts +6 -2
- package/types/bricks/RichText.ts +6 -2
- package/types/bricks/Rive.ts +20 -10
- package/types/bricks/Slideshow.ts +17 -7
- package/types/bricks/Svg.ts +5 -1
- package/types/bricks/Text.ts +6 -2
- package/types/bricks/TextInput.ts +13 -7
- package/types/bricks/Video.ts +8 -4
- package/types/bricks/VideoStreaming.ts +5 -1
- package/types/bricks/WebRtcStream.ts +6 -2
- package/types/bricks/WebView.ts +9 -5
- package/types/common.ts +10 -8
- package/types/generators/AlarmClock.ts +12 -6
- package/types/generators/Assistant.ts +12 -6
- package/types/generators/BleCentral.ts +19 -7
- package/types/generators/BlePeripheral.ts +6 -2
- package/types/generators/CanvasMap.ts +6 -2
- package/types/generators/CastlesPay.ts +12 -4
- package/types/generators/DataBank.ts +13 -5
- package/types/generators/File.ts +46 -16
- package/types/generators/GraphQl.ts +9 -3
- package/types/generators/Http.ts +6 -2
- package/types/generators/HttpServer.ts +14 -6
- package/types/generators/Information.ts +7 -3
- package/types/generators/Intent.ts +7 -3
- package/types/generators/Iterator.ts +9 -5
- package/types/generators/Keyboard.ts +9 -5
- package/types/generators/LlmAnthropicCompat.ts +21 -5
- package/types/generators/LlmAppleBuiltin.ts +19 -4
- package/types/generators/LlmGgml.ts +65 -6
- package/types/generators/LlmMediaTekNeuroPilot.ts +16 -5
- package/types/generators/LlmMlx.ts +22 -5
- package/types/generators/LlmOnnx.ts +16 -5
- package/types/generators/LlmOpenAiCompat.ts +25 -5
- package/types/generators/LlmQualcommAiEngine.ts +13 -5
- package/types/generators/Mcp.ts +43 -17
- package/types/generators/McpServer.ts +20 -8
- package/types/generators/MediaFlow.ts +12 -4
- package/types/generators/MqttBroker.ts +19 -7
- package/types/generators/MqttClient.ts +8 -4
- package/types/generators/Question.ts +7 -3
- package/types/generators/RealtimeTranscription.ts +26 -8
- package/types/generators/RerankerGgml.ts +20 -3
- package/types/generators/SerialPort.ts +12 -4
- package/types/generators/SoundPlayer.ts +8 -2
- package/types/generators/SoundRecorder.ts +7 -3
- package/types/generators/SpeechToTextGgml.ts +18 -4
- package/types/generators/SpeechToTextOnnx.ts +10 -3
- package/types/generators/SpeechToTextPlatform.ts +11 -3
- package/types/generators/SqLite.ts +10 -4
- package/types/generators/Step.ts +6 -2
- package/types/generators/SttAppleBuiltin.ts +16 -3
- package/types/generators/Tcp.ts +8 -4
- package/types/generators/TcpServer.ts +13 -7
- package/types/generators/TextToSpeechAppleBuiltin.ts +16 -3
- package/types/generators/TextToSpeechGgml.ts +21 -3
- package/types/generators/TextToSpeechOnnx.ts +10 -3
- package/types/generators/TextToSpeechOpenAiLike.ts +9 -3
- package/types/generators/ThermalPrinter.ts +7 -3
- package/types/generators/Tick.ts +8 -4
- package/types/generators/Udp.ts +8 -4
- package/types/generators/VadGgml.ts +12 -4
- package/types/generators/VadOnnx.ts +11 -4
- package/types/generators/VadTraditional.ts +13 -4
- package/types/generators/VectorStore.ts +7 -3
- package/types/generators/Watchdog.ts +8 -4
- package/types/generators/WebCrawler.ts +6 -2
- package/types/generators/WebRtc.ts +13 -5
- package/types/generators/WebSocket.ts +6 -2
- package/types/subspace.ts +2 -0
- package/utils/event-props.ts +833 -1059
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Iterate through values (Array, Object, Number, String)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Proceed to next iteration */
|
|
15
19
|
export type GeneratorIteratorActionNext = Action & {
|
|
@@ -59,13 +63,13 @@ Default property:
|
|
|
59
63
|
}
|
|
60
64
|
events?: {
|
|
61
65
|
/* Event triggered on each iteration */
|
|
62
|
-
iterate?: Array<EventAction
|
|
66
|
+
iterate?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['iterate']>>
|
|
63
67
|
/* Event triggered on the first iteration of a round */
|
|
64
|
-
first?: Array<EventAction
|
|
68
|
+
first?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['first']>>
|
|
65
69
|
/* Event triggered on the last iteration of a round */
|
|
66
|
-
end?: Array<EventAction
|
|
70
|
+
end?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['end']>>
|
|
67
71
|
/* Event triggered when data type is invalid or unexpected */
|
|
68
|
-
error?: Array<EventAction
|
|
72
|
+
error?: Array<EventAction<string & keyof TemplateEventPropsMap['Iterator']['error']>>
|
|
69
73
|
}
|
|
70
74
|
outlets?: {
|
|
71
75
|
/* Elements that have been iterated (including current one) */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Listen to keyboard and remote control key events (keyDown, keyUp)
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
interface GeneratorKeyboardDef {
|
|
15
19
|
/*
|
|
@@ -43,11 +47,11 @@ Default property:
|
|
|
43
47
|
}
|
|
44
48
|
events?: {
|
|
45
49
|
/* Event on key press */
|
|
46
|
-
onDown?: Array<EventAction
|
|
50
|
+
onDown?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onDown']>>
|
|
47
51
|
/* Event on key up */
|
|
48
|
-
onUp?: Array<EventAction
|
|
52
|
+
onUp?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onUp']>>
|
|
49
53
|
/* Event on batch input complete */
|
|
50
|
-
onBatch?: Array<EventAction
|
|
54
|
+
onBatch?: Array<EventAction<string & keyof TemplateEventPropsMap['Keyboard']['onBatch']>>
|
|
51
55
|
}
|
|
52
56
|
outlets?: {
|
|
53
57
|
/* Last key code pressed */
|
|
@@ -73,7 +77,7 @@ Default property:
|
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
/*
|
|
80
|
+
/* Listen to keyboard and remote control key events (keyDown, keyUp) */
|
|
77
81
|
export type GeneratorKeyboard = Generator &
|
|
78
82
|
GeneratorKeyboardDef & {
|
|
79
83
|
templateKey: 'GENERATOR_KEYBOARD'
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* LLM inference using Anthropic-compatible API endpoints
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - Compatible with Anthropic API format
|
|
7
|
+
* - Supports function calling (tools)
|
|
8
|
+
* - Streaming responses
|
|
9
|
+
* - Custom API endpoints (Default to https://api.anthropic.com/v1/messages)
|
|
10
|
+
*/
|
|
2
11
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
12
|
import type { Data, DataLink } from '../data'
|
|
4
13
|
import type {
|
|
@@ -10,6 +19,7 @@ import type {
|
|
|
10
19
|
Action,
|
|
11
20
|
EventProperty,
|
|
12
21
|
} from '../common'
|
|
22
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
23
|
|
|
14
24
|
/* Run text completion */
|
|
15
25
|
export type GeneratorAnthropicLLMActionCompletion = ActionWithParams & {
|
|
@@ -143,13 +153,19 @@ Default property:
|
|
|
143
153
|
}
|
|
144
154
|
events?: {
|
|
145
155
|
/* Error event */
|
|
146
|
-
onError?: Array<EventAction
|
|
156
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onError']>>
|
|
147
157
|
/* Completion event */
|
|
148
|
-
onCompletion?: Array<
|
|
158
|
+
onCompletion?: Array<
|
|
159
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onCompletion']>
|
|
160
|
+
>
|
|
149
161
|
/* Completion finished event */
|
|
150
|
-
onCompletionFinished?: Array<
|
|
162
|
+
onCompletionFinished?: Array<
|
|
163
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onCompletionFinished']>
|
|
164
|
+
>
|
|
151
165
|
/* Tool use event */
|
|
152
|
-
onToolUse?: Array<
|
|
166
|
+
onToolUse?: Array<
|
|
167
|
+
EventAction<string & keyof TemplateEventPropsMap['AnthropicLlm']['onToolUse']>
|
|
168
|
+
>
|
|
153
169
|
}
|
|
154
170
|
outlets?: {
|
|
155
171
|
/* Evaluating outlet */
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* LLM inference using Apple Intelligence on iOS/tvOS 26+
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - Native Apple Intelligence integration
|
|
7
|
+
* - No model download required
|
|
8
|
+
* - Privacy-focused on-device processing
|
|
9
|
+
* - Optimized for Apple Silicon
|
|
10
|
+
* - Requires iOS 26+ or tvOS 26+
|
|
11
|
+
*/
|
|
2
12
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
13
|
import type { Data, DataLink } from '../data'
|
|
4
14
|
import type {
|
|
@@ -10,6 +20,7 @@ import type {
|
|
|
10
20
|
Action,
|
|
11
21
|
EventProperty,
|
|
12
22
|
} from '../common'
|
|
23
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
24
|
|
|
14
25
|
/* Load model */
|
|
15
26
|
export type GeneratorAppleLLMActionLoadModel = Action & {
|
|
@@ -90,13 +101,17 @@ Default property:
|
|
|
90
101
|
}
|
|
91
102
|
events?: {
|
|
92
103
|
/* Error event */
|
|
93
|
-
onError?: Array<EventAction
|
|
104
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onError']>>
|
|
94
105
|
/* Model loaded event */
|
|
95
106
|
onModelLoaded?: Array<EventAction>
|
|
96
107
|
/* Completion event */
|
|
97
|
-
onCompletion?: Array<
|
|
108
|
+
onCompletion?: Array<
|
|
109
|
+
EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletion']>
|
|
110
|
+
>
|
|
98
111
|
/* Completion finished event */
|
|
99
|
-
onCompletionFinished?: Array<
|
|
112
|
+
onCompletionFinished?: Array<
|
|
113
|
+
EventAction<string & keyof TemplateEventPropsMap['AppleLlm']['onCompletionFinished']>
|
|
114
|
+
>
|
|
100
115
|
}
|
|
101
116
|
outlets?: {
|
|
102
117
|
/* Context state outlet */
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local Large Language Model (LLM) inference based on GGML and [llama.cpp](https://github.com/ggerganov/llama.cpp)
|
|
4
|
+
*
|
|
5
|
+
* ## Notice
|
|
6
|
+
* - The device RAM must be larger than 8GB
|
|
7
|
+
* - iOS: Recommended use M1+ / A17+ chip device. Supported GPU acceleration by Metal.
|
|
8
|
+
* - macOS: Recommended use M1+ chip device. Supported GPU acceleration by Metal.
|
|
9
|
+
* - Android: Recommended use Android 13+ system.
|
|
10
|
+
* - Supported GPU acceleration by OpenCL, currently only for Qualcomm Adreno 700+ GPUs, other GPUs are not supported.
|
|
11
|
+
* - Supported Hexagon NPU for Qualcomm Snapdragon 8 Gen 1+ GPUs.
|
|
12
|
+
* - Linux / Windows [@nextline - Supported GPU acceleration, you can choose `vulkan` or `cuda` backend in Accel Variant property
|
|
13
|
+
* - Supported Hexagon NPU for Qualcomm Dragonwing IQ9 series+ (Linux)
|
|
14
|
+
*/
|
|
2
15
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
16
|
import type { Data, DataLink } from '../data'
|
|
4
17
|
import type {
|
|
@@ -10,6 +23,7 @@ import type {
|
|
|
10
23
|
Action,
|
|
11
24
|
EventProperty,
|
|
12
25
|
} from '../common'
|
|
26
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
27
|
|
|
14
28
|
/* Load the model */
|
|
15
29
|
export type GeneratorLLMActionLoadModel = Action & {
|
|
@@ -97,6 +111,16 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
|
|
|
97
111
|
value?: boolean | DataLink | EventProperty
|
|
98
112
|
mapping?: string
|
|
99
113
|
}
|
|
114
|
+
| {
|
|
115
|
+
input: 'thinkingBudgetTokens'
|
|
116
|
+
value?: number | DataLink | EventProperty
|
|
117
|
+
mapping?: string
|
|
118
|
+
}
|
|
119
|
+
| {
|
|
120
|
+
input: 'thinkingBudgetMessage'
|
|
121
|
+
value?: string | DataLink | EventProperty
|
|
122
|
+
mapping?: string
|
|
123
|
+
}
|
|
100
124
|
| {
|
|
101
125
|
input: 'prompt'
|
|
102
126
|
value?: string | DataLink | EventProperty
|
|
@@ -137,6 +161,11 @@ export type GeneratorLLMActionProcessPrompt = ActionWithParams & {
|
|
|
137
161
|
value?: string | DataLink | EventProperty
|
|
138
162
|
mapping?: string
|
|
139
163
|
}
|
|
164
|
+
| {
|
|
165
|
+
input: 'forcePureContent'
|
|
166
|
+
value?: boolean | DataLink | EventProperty
|
|
167
|
+
mapping?: string
|
|
168
|
+
}
|
|
140
169
|
>
|
|
141
170
|
}
|
|
142
171
|
|
|
@@ -179,6 +208,16 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
|
179
208
|
value?: boolean | DataLink | EventProperty
|
|
180
209
|
mapping?: string
|
|
181
210
|
}
|
|
211
|
+
| {
|
|
212
|
+
input: 'thinkingBudgetTokens'
|
|
213
|
+
value?: number | DataLink | EventProperty
|
|
214
|
+
mapping?: string
|
|
215
|
+
}
|
|
216
|
+
| {
|
|
217
|
+
input: 'thinkingBudgetMessage'
|
|
218
|
+
value?: string | DataLink | EventProperty
|
|
219
|
+
mapping?: string
|
|
220
|
+
}
|
|
182
221
|
| {
|
|
183
222
|
input: 'useReasoningFormat'
|
|
184
223
|
value?: string | DataLink | EventProperty
|
|
@@ -224,6 +263,11 @@ export type GeneratorLLMActionCompletion = ActionWithParams & {
|
|
|
224
263
|
value?: string | DataLink | EventProperty
|
|
225
264
|
mapping?: string
|
|
226
265
|
}
|
|
266
|
+
| {
|
|
267
|
+
input: 'forcePureContent'
|
|
268
|
+
value?: boolean | DataLink | EventProperty
|
|
269
|
+
mapping?: string
|
|
270
|
+
}
|
|
227
271
|
| {
|
|
228
272
|
input: 'grammar'
|
|
229
273
|
value?: string | DataLink | EventProperty
|
|
@@ -432,6 +476,7 @@ Default property:
|
|
|
432
476
|
"completionEnableThinking": true,
|
|
433
477
|
"completionAddGenerationPrompt": true,
|
|
434
478
|
"completionChatTemplateKwargs": {},
|
|
479
|
+
"completionForcePureContent": false,
|
|
435
480
|
"completionUseReasoningFormat": "auto",
|
|
436
481
|
"completionStopWords": [],
|
|
437
482
|
"completionPredict": 400,
|
|
@@ -514,6 +559,8 @@ Default property:
|
|
|
514
559
|
useMlock?: boolean | DataLink
|
|
515
560
|
/* Use mmap */
|
|
516
561
|
useMmap?: boolean | DataLink
|
|
562
|
+
/* Disable extra buffer types for weight repacking. Reduces memory usage at the cost of slower prompt processing. */
|
|
563
|
+
noExtraBuffs?: boolean | DataLink
|
|
517
564
|
/* Use Flash Attention for inference (Recommended with GPU enabled) */
|
|
518
565
|
useFlashAttn?: 'auto' | 'on' | 'off' | DataLink
|
|
519
566
|
/* KV cache data type for the K (Default: f16) */
|
|
@@ -588,12 +635,18 @@ Default property:
|
|
|
588
635
|
}
|
|
589
636
|
/* Enable thinking */
|
|
590
637
|
completionEnableThinking?: boolean | DataLink
|
|
638
|
+
/* Maximum tokens allowed inside the model's thinking block before forcing it closed. Only applies when chat formatting exposes thinking tags. */
|
|
639
|
+
completionThinkingBudgetTokens?: number | DataLink
|
|
640
|
+
/* Message injected before the thinking end tag when the thinking budget is exhausted. */
|
|
641
|
+
completionThinkingBudgetMessage?: string | DataLink
|
|
591
642
|
/* Add generation prompt */
|
|
592
643
|
completionAddGenerationPrompt?: boolean | DataLink
|
|
593
644
|
/* Now (for fill current date in chat template if supported) */
|
|
594
645
|
completionNow?: string | DataLink
|
|
595
646
|
/* Additional keyword arguments for chat template (object) */
|
|
596
647
|
completionChatTemplateKwargs?: {} | DataLink
|
|
648
|
+
/* Force pure content (accept any model that has a chat_template without requiring template validation) */
|
|
649
|
+
completionForcePureContent?: boolean | DataLink
|
|
597
650
|
/* Use reasoning format for enhanced response structure
|
|
598
651
|
`auto` - Auto-determine the reasoning format of the model
|
|
599
652
|
`none` - Disable reasoning format */
|
|
@@ -666,15 +719,21 @@ Default property:
|
|
|
666
719
|
}
|
|
667
720
|
events?: {
|
|
668
721
|
/* Event triggered when context state changes */
|
|
669
|
-
onContextStateChange?: Array<
|
|
722
|
+
onContextStateChange?: Array<
|
|
723
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onContextStateChange']>
|
|
724
|
+
>
|
|
670
725
|
/* Event triggered when error occurs */
|
|
671
|
-
onError?: Array<EventAction
|
|
726
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['Llm']['onError']>>
|
|
672
727
|
/* Event triggered when completion */
|
|
673
|
-
onCompletion?: Array<EventAction
|
|
728
|
+
onCompletion?: Array<EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletion']>>
|
|
674
729
|
/* Event triggered when completion finished */
|
|
675
|
-
onCompletionFinished?: Array<
|
|
730
|
+
onCompletionFinished?: Array<
|
|
731
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletionFinished']>
|
|
732
|
+
>
|
|
676
733
|
/* Event triggered on get function call request */
|
|
677
|
-
onCompletionFunctionCall?: Array<
|
|
734
|
+
onCompletionFunctionCall?: Array<
|
|
735
|
+
EventAction<string & keyof TemplateEventPropsMap['Llm']['onCompletionFunctionCall']>
|
|
736
|
+
>
|
|
678
737
|
}
|
|
679
738
|
outlets?: {
|
|
680
739
|
/* Context state */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* On-device LLM inference using MediaTek NeuroPilot native SDK integration on Android
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Load or validate the NeuroPilot model context */
|
|
15
19
|
export type GeneratorNeuropilotLlmActionLoadModel = ActionWithParams & {
|
|
@@ -120,6 +124,7 @@ Default property:
|
|
|
120
124
|
| 'Gemma 2 2B Instruct (Tailpatched)'
|
|
121
125
|
| 'Gemma 2 2B Instruct (Tailpatched MDLA53)'
|
|
122
126
|
| 'Qwen 2.5 0.5B Instruct'
|
|
127
|
+
| 'Qwen 2.5 1.5B Instruct'
|
|
123
128
|
| 'Llama 3 8B Instruct'
|
|
124
129
|
| DataLink
|
|
125
130
|
/* Override base URL for NeuroPilot model bundle downloads */
|
|
@@ -168,13 +173,19 @@ Default property:
|
|
|
168
173
|
}
|
|
169
174
|
events?: {
|
|
170
175
|
/* Event triggered when the NeuroPilot context state changes */
|
|
171
|
-
onContextStateChange?: Array<
|
|
176
|
+
onContextStateChange?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onContextStateChange']>
|
|
178
|
+
>
|
|
172
179
|
/* Event triggered when a completion token or partial result is emitted */
|
|
173
|
-
onCompletion?: Array<
|
|
180
|
+
onCompletion?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletion']>
|
|
182
|
+
>
|
|
174
183
|
/* Event triggered when generation finishes */
|
|
175
|
-
onCompletionFinished?: Array<
|
|
184
|
+
onCompletionFinished?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onCompletionFinished']>
|
|
186
|
+
>
|
|
176
187
|
/* Event triggered when a NeuroPilot error occurs */
|
|
177
|
-
onError?: Array<EventAction
|
|
188
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['NeuropilotLlm']['onError']>>
|
|
178
189
|
}
|
|
179
190
|
outlets?: {
|
|
180
191
|
/* Current NeuroPilot context state */
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* On-device LLM inference using Apple MLX framework on iOS/tvOS
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - Powered by MLX (Apple's ML framework optimized for Apple Silicon)
|
|
7
|
+
* - Download models directly from HuggingFace Hub
|
|
8
|
+
* - Streaming token generation
|
|
9
|
+
* - Supports LLM and VLM (Vision Language Models)
|
|
10
|
+
* - Requires iOS 17+ or tvOS 17+
|
|
11
|
+
*/
|
|
2
12
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
13
|
import type { Data, DataLink } from '../data'
|
|
4
14
|
import type {
|
|
@@ -10,6 +20,7 @@ import type {
|
|
|
10
20
|
Action,
|
|
11
21
|
EventProperty,
|
|
12
22
|
} from '../common'
|
|
23
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
24
|
|
|
14
25
|
/* Load model */
|
|
15
26
|
export type GeneratorMlxLLMActionLoadModel = ActionWithParams & {
|
|
@@ -153,13 +164,19 @@ Default property:
|
|
|
153
164
|
}
|
|
154
165
|
events?: {
|
|
155
166
|
/* Event triggered when context state changes */
|
|
156
|
-
onContextStateChange?: Array<
|
|
167
|
+
onContextStateChange?: Array<
|
|
168
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onContextStateChange']>
|
|
169
|
+
>
|
|
157
170
|
/* Error event */
|
|
158
|
-
onError?: Array<EventAction
|
|
171
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onError']>>
|
|
159
172
|
/* Completion streaming event (emitted for each token) */
|
|
160
|
-
onCompletion?: Array<
|
|
173
|
+
onCompletion?: Array<
|
|
174
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletion']>
|
|
175
|
+
>
|
|
161
176
|
/* Completion finished event */
|
|
162
|
-
onCompletionFinished?: Array<
|
|
177
|
+
onCompletionFinished?: Array<
|
|
178
|
+
EventAction<string & keyof TemplateEventPropsMap['MlxLlm']['onCompletionFinished']>
|
|
179
|
+
>
|
|
163
180
|
}
|
|
164
181
|
outlets?: {
|
|
165
182
|
/* Context state */
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local LLM inference based on [transformers.js](https://huggingface.co/docs/transformers.js)
|
|
4
|
+
* You can use any converted model on HuggingFace.
|
|
5
|
+
*/
|
|
2
6
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
7
|
import type { Data, DataLink } from '../data'
|
|
4
8
|
import type {
|
|
@@ -10,6 +14,7 @@ import type {
|
|
|
10
14
|
Action,
|
|
11
15
|
EventProperty,
|
|
12
16
|
} from '../common'
|
|
17
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
18
|
|
|
14
19
|
/* Load the model */
|
|
15
20
|
export type GeneratorOnnxLLMActionLoadModel = Action & {
|
|
@@ -149,13 +154,19 @@ Default property:
|
|
|
149
154
|
}
|
|
150
155
|
events?: {
|
|
151
156
|
/* Event triggered when state change */
|
|
152
|
-
onContextStateChange?: Array<
|
|
157
|
+
onContextStateChange?: Array<
|
|
158
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onContextStateChange']>
|
|
159
|
+
>
|
|
153
160
|
/* Event triggered on get function call request */
|
|
154
|
-
onFunctionCall?: Array<
|
|
161
|
+
onFunctionCall?: Array<
|
|
162
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onFunctionCall']>
|
|
163
|
+
>
|
|
155
164
|
/* Event triggered on completion finished */
|
|
156
|
-
onCompletionFinished?: Array<
|
|
165
|
+
onCompletionFinished?: Array<
|
|
166
|
+
EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onCompletionFinished']>
|
|
167
|
+
>
|
|
157
168
|
/* Event triggered when error occurs */
|
|
158
|
-
onError?: Array<EventAction
|
|
169
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OnnxLlm']['onError']>>
|
|
159
170
|
}
|
|
160
171
|
outlets?: {
|
|
161
172
|
/* Context state */
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* LLM inference using OpenAI-compatible API endpoints
|
|
4
|
+
*
|
|
5
|
+
* ## Features
|
|
6
|
+
* - Compatible with OpenAI API format
|
|
7
|
+
* - Supports function calling
|
|
8
|
+
* - Streaming responses
|
|
9
|
+
* - Custom API endpoints, like
|
|
10
|
+
* - OpenAI API: https://platform.openai.com/docs/guides/text?api-mode=chat
|
|
11
|
+
* - Anthropic API: https://docs.anthropic.com/en/api/openai-sdk
|
|
12
|
+
* - Gemini API: https://ai.google.dev/gemini-api/docs/openai
|
|
13
|
+
* - llama.cpp server: https://github.com/ggml-org/llama.cpp/tree/master/tools/server
|
|
14
|
+
*/
|
|
2
15
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
16
|
import type { Data, DataLink } from '../data'
|
|
4
17
|
import type {
|
|
@@ -10,6 +23,7 @@ import type {
|
|
|
10
23
|
Action,
|
|
11
24
|
EventProperty,
|
|
12
25
|
} from '../common'
|
|
26
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
27
|
|
|
14
28
|
/* Run text completion */
|
|
15
29
|
export type GeneratorOpenAILLMActionCompletion = ActionWithParams & {
|
|
@@ -157,13 +171,19 @@ Default property:
|
|
|
157
171
|
}
|
|
158
172
|
events?: {
|
|
159
173
|
/* Error event */
|
|
160
|
-
onError?: Array<EventAction
|
|
174
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onError']>>
|
|
161
175
|
/* Completion event */
|
|
162
|
-
onCompletion?: Array<
|
|
176
|
+
onCompletion?: Array<
|
|
177
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletion']>
|
|
178
|
+
>
|
|
163
179
|
/* Completion finished event */
|
|
164
|
-
onCompletionFinished?: Array<
|
|
180
|
+
onCompletionFinished?: Array<
|
|
181
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFinished']>
|
|
182
|
+
>
|
|
165
183
|
/* Completion function call event */
|
|
166
|
-
onCompletionFunctionCall?: Array<
|
|
184
|
+
onCompletionFunctionCall?: Array<
|
|
185
|
+
EventAction<string & keyof TemplateEventPropsMap['OpenaiLlm']['onCompletionFunctionCall']>
|
|
186
|
+
>
|
|
167
187
|
}
|
|
168
188
|
outlets?: {
|
|
169
189
|
/* Evaluating outlet */
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* Local LLM inference using Qualcomm AI Engine
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Load the model */
|
|
15
19
|
export type GeneratorQnnLlmActionLoadModel = Action & {
|
|
@@ -165,13 +169,17 @@ Default property:
|
|
|
165
169
|
}
|
|
166
170
|
events?: {
|
|
167
171
|
/* Event triggered when context state changes */
|
|
168
|
-
onContextStateChange?: Array<
|
|
172
|
+
onContextStateChange?: Array<
|
|
173
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onContextStateChange']>
|
|
174
|
+
>
|
|
169
175
|
/* Event triggered when generate is done */
|
|
170
|
-
onGenerate?: Array<EventAction
|
|
176
|
+
onGenerate?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onGenerate']>>
|
|
171
177
|
/* Event triggered on get function call request */
|
|
172
|
-
onFunctionCall?: Array<
|
|
178
|
+
onFunctionCall?: Array<
|
|
179
|
+
EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onFunctionCall']>
|
|
180
|
+
>
|
|
173
181
|
/* Event triggered when error occurs */
|
|
174
|
-
onError?: Array<EventAction
|
|
182
|
+
onError?: Array<EventAction<string & keyof TemplateEventPropsMap['QnnLlm']['onError']>>
|
|
175
183
|
}
|
|
176
184
|
outlets?: {
|
|
177
185
|
/* Context state */
|
package/types/generators/Mcp.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
/* Auto generated by build script
|
|
1
|
+
/* Auto generated by build script
|
|
2
|
+
*
|
|
3
|
+
* MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant
|
|
4
|
+
*/
|
|
2
5
|
import type { SwitchCondInnerStateCurrentCanvas, SwitchCondData, SwitchDef } from '../switch'
|
|
3
6
|
import type { Data, DataLink } from '../data'
|
|
4
7
|
import type {
|
|
@@ -10,6 +13,7 @@ import type {
|
|
|
10
13
|
Action,
|
|
11
14
|
EventProperty,
|
|
12
15
|
} from '../common'
|
|
16
|
+
import type { TemplateEventPropsMap } from '../../utils/event-props'
|
|
13
17
|
|
|
14
18
|
/* Connect to MCP server */
|
|
15
19
|
export type GeneratorMCPActionConnect = Action & {
|
|
@@ -189,37 +193,59 @@ Default property:
|
|
|
189
193
|
/* On connected */
|
|
190
194
|
onConnected?: Array<EventAction>
|
|
191
195
|
/* On connection error */
|
|
192
|
-
onConnectionError?: Array<
|
|
196
|
+
onConnectionError?: Array<
|
|
197
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onConnectionError']>
|
|
198
|
+
>
|
|
193
199
|
/* On disconnected */
|
|
194
200
|
onDisconnected?: Array<EventAction>
|
|
195
201
|
/* On list resources */
|
|
196
|
-
onListResources?: Array<
|
|
202
|
+
onListResources?: Array<
|
|
203
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResources']>
|
|
204
|
+
>
|
|
197
205
|
/* On list resources error */
|
|
198
|
-
onListResourcesError?: Array<
|
|
206
|
+
onListResourcesError?: Array<
|
|
207
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourcesError']>
|
|
208
|
+
>
|
|
199
209
|
/* On list resource templates */
|
|
200
|
-
onListResourceTemplates?: Array<
|
|
210
|
+
onListResourceTemplates?: Array<
|
|
211
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplates']>
|
|
212
|
+
>
|
|
201
213
|
/* On list resource templates error */
|
|
202
|
-
onListResourceTemplatesError?: Array<
|
|
214
|
+
onListResourceTemplatesError?: Array<
|
|
215
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListResourceTemplatesError']>
|
|
216
|
+
>
|
|
203
217
|
/* On read resource */
|
|
204
|
-
onReadResource?: Array<
|
|
218
|
+
onReadResource?: Array<
|
|
219
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResource']>
|
|
220
|
+
>
|
|
205
221
|
/* On read resource error */
|
|
206
|
-
onReadResourceError?: Array<
|
|
222
|
+
onReadResourceError?: Array<
|
|
223
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onReadResourceError']>
|
|
224
|
+
>
|
|
207
225
|
/* On list tools */
|
|
208
|
-
onListTools?: Array<EventAction
|
|
226
|
+
onListTools?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListTools']>>
|
|
209
227
|
/* On list tools error */
|
|
210
|
-
onListToolsError?: Array<
|
|
228
|
+
onListToolsError?: Array<
|
|
229
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListToolsError']>
|
|
230
|
+
>
|
|
211
231
|
/* On call tool */
|
|
212
|
-
onCallTool?: Array<EventAction
|
|
232
|
+
onCallTool?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallTool']>>
|
|
213
233
|
/* On call tool error */
|
|
214
|
-
onCallToolError?: Array<
|
|
234
|
+
onCallToolError?: Array<
|
|
235
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onCallToolError']>
|
|
236
|
+
>
|
|
215
237
|
/* On list prompts */
|
|
216
|
-
onListPrompts?: Array<EventAction
|
|
238
|
+
onListPrompts?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPrompts']>>
|
|
217
239
|
/* On list prompts error */
|
|
218
|
-
onListPromptsError?: Array<
|
|
240
|
+
onListPromptsError?: Array<
|
|
241
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onListPromptsError']>
|
|
242
|
+
>
|
|
219
243
|
/* On get prompt */
|
|
220
|
-
onGetPrompt?: Array<EventAction
|
|
244
|
+
onGetPrompt?: Array<EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPrompt']>>
|
|
221
245
|
/* On get prompt error */
|
|
222
|
-
onGetPromptError?: Array<
|
|
246
|
+
onGetPromptError?: Array<
|
|
247
|
+
EventAction<string & keyof TemplateEventPropsMap['Mcp']['onGetPromptError']>
|
|
248
|
+
>
|
|
223
249
|
}
|
|
224
250
|
outlets?: {
|
|
225
251
|
/* Connection state */
|
|
@@ -572,7 +598,7 @@ Default property:
|
|
|
572
598
|
}
|
|
573
599
|
}
|
|
574
600
|
|
|
575
|
-
/*
|
|
601
|
+
/* MCP client connecting to tool servers via Streamable HTTP, SSE, or direct-link to in-app MCP Server generator. Provides tools, resources, and prompts for Assistant */
|
|
576
602
|
export type GeneratorMCP = Generator &
|
|
577
603
|
GeneratorMCPDef & {
|
|
578
604
|
templateKey: 'GENERATOR_MCP'
|