@fugood/bricks-project 2.21.6 → 2.21.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -552,6 +552,8 @@ export const templateActionNameMap = {
552
552
  prompt: 'GENERATOR_ONNX_LLM_PROMPT',
553
553
  chat: 'GENERATOR_ONNX_LLM_CHAT',
554
554
  images: 'GENERATOR_ONNX_LLM_IMAGES',
555
+ tools: 'GENERATOR_ONNX_LLM_TOOLS',
556
+ toolChoice: 'GENERATOR_ONNX_LLM_TOOL_CHOICE',
555
557
  },
556
558
  },
557
559
  GENERATOR_ONNX_STT: {
@@ -650,6 +652,7 @@ export const templateActionNameMap = {
650
652
  GENERATOR_QNN_LLM_GENERATE: {
651
653
  prompt: 'GENERATOR_QNN_LLM_PROMPT',
652
654
  messages: 'GENERATOR_QNN_LLM_MESSAGES',
655
+ tools: 'GENERATOR_QNN_LLM_TOOLS',
653
656
  },
654
657
  },
655
658
  GENERATOR_OPENAI_LLM: {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@fugood/bricks-project",
3
- "version": "2.21.6",
3
+ "version": "2.21.7",
4
4
  "main": "index.ts",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.js"
7
7
  },
8
8
  "dependencies": {
9
- "@modelcontextprotocol/sdk": "^1.7.0",
9
+ "@modelcontextprotocol/sdk": "^1.11.1",
10
10
  "@types/escodegen": "^0.0.10",
11
11
  "@types/lodash": "^4.17.12",
12
12
  "acorn": "^8.13.0",
@@ -4365,7 +4365,7 @@ Default property:
4365
4365
  | {
4366
4366
  target?: string | DataLink
4367
4367
  timeout?: number | DataLink
4368
- payload?: any
4368
+ additionalParams?: any
4369
4369
  }
4370
4370
  scriptConfig?:
4371
4371
  | DataLink
@@ -4381,7 +4381,7 @@ Default property:
4381
4381
  }
4382
4382
  >
4383
4383
  | DataLink
4384
- payload?: any
4384
+ additionalParams?: any
4385
4385
  }
4386
4386
  }
4387
4387
  >
@@ -4406,7 +4406,7 @@ Default property:
4406
4406
  | {
4407
4407
  target?: string | DataLink
4408
4408
  timeout?: number | DataLink
4409
- payload?: any
4409
+ additionalParams?: any
4410
4410
  }
4411
4411
  scriptConfig?:
4412
4412
  | DataLink
@@ -4422,7 +4422,7 @@ Default property:
4422
4422
  }
4423
4423
  >
4424
4424
  | DataLink
4425
- payload?: any
4425
+ additionalParams?: any
4426
4426
  }
4427
4427
  }
4428
4428
  >
@@ -4449,7 +4449,7 @@ Default property:
4449
4449
  | {
4450
4450
  target?: string | DataLink
4451
4451
  timeout?: number | DataLink
4452
- payload?: any
4452
+ additionalParams?: any
4453
4453
  }
4454
4454
  scriptConfig?:
4455
4455
  | DataLink
@@ -4465,7 +4465,7 @@ Default property:
4465
4465
  }
4466
4466
  >
4467
4467
  | DataLink
4468
- payload?: any
4468
+ additionalParams?: any
4469
4469
  }
4470
4470
  }
4471
4471
  >
@@ -4655,12 +4655,13 @@ interface GeneratorMCPDef {
4655
4655
  Default property:
4656
4656
  {
4657
4657
  "init": false,
4658
- "type": "sse",
4658
+ "type": "streamable-http",
4659
4659
  "url": "",
4660
4660
  "autoReconnect": true,
4661
4661
  "maxReconnectAttempts": 10,
4662
4662
  "reconnectInterval": 1000,
4663
4663
  "generatorId": "",
4664
+ "generatorKey": "",
4664
4665
  "name": "bricks-foundation-mcp-client-default",
4665
4666
  "version": "1.0.0",
4666
4667
  "ignoreResourceInList": [],
@@ -4673,7 +4674,7 @@ Default property:
4673
4674
  /* Initialize the MCP client on start */
4674
4675
  init?: boolean | DataLink
4675
4676
  /* Type of the MCP connection, e.g. sse or direct-link (generator) */
4676
- type?: 'sse' | 'direct-link' | DataLink
4677
+ type?: 'streamable-http' | 'sse' | 'direct-link' | DataLink
4677
4678
  /* URL of the MCP server, e.g. http://localhost:19853/sse */
4678
4679
  url?: string | DataLink
4679
4680
  /* Whether to automatically reconnect to the MCP server */
@@ -4997,6 +4998,16 @@ export type GeneratorOnnxLLMActionInfer = ActionWithParams & {
4997
4998
  value?: Array<any> | DataLink | EventProperty
4998
4999
  mapping?: string
4999
5000
  }
5001
+ | {
5002
+ input: 'tools'
5003
+ value?: Array<any> | DataLink | EventProperty
5004
+ mapping?: string
5005
+ }
5006
+ | {
5007
+ input: 'toolChoice'
5008
+ value?: string | DataLink | EventProperty
5009
+ mapping?: string
5010
+ }
5000
5011
  >
5001
5012
  }
5002
5013
 
@@ -5016,6 +5027,8 @@ Default property:
5016
5027
  {
5017
5028
  "model": "BricksDisplay/phi-1_5-q4",
5018
5029
  "modelType": "auto",
5030
+ "toolCallParser": "llama3_json",
5031
+ "toolChoice": "auto",
5019
5032
  "maxNewTokens": 256,
5020
5033
  "temperature": 0.7,
5021
5034
  "topK": 50,
@@ -5122,6 +5135,14 @@ Default property:
5122
5135
  messages?: Array<DataLink | {}> | DataLink
5123
5136
  /* Images with message to inference */
5124
5137
  images?: Array<string | DataLink> | DataLink
5138
+ /* Tool call parser */
5139
+ toolCallParser?: 'llama3_json' | 'mistral' | 'hermes' | 'internlm' | 'phi4' | DataLink
5140
+ /* Tools for chat mode using OpenAI-compatible function calling format
5141
+ Format: Array of objects with {type, function: {name, description, parameters}} structure
5142
+ See: https://platform.openai.com/docs/guides/function-calling */
5143
+ tools?: Array<{} | DataLink> | DataLink
5144
+ /* Tool choice for chat mode */
5145
+ toolChoice?: 'none' | 'auto' | DataLink
5125
5146
  /* Max new tokens to generate */
5126
5147
  maxNewTokens?: number | DataLink
5127
5148
  /* Temperature */
@@ -5156,6 +5177,10 @@ Default property:
5156
5177
  events?: {
5157
5178
  /* Event triggered when state change */
5158
5179
  onContextStateChange?: Array<EventAction>
5180
+ /* Event triggered on get function call request */
5181
+ onFunctionCall?: Array<EventAction>
5182
+ /* Event triggered on completion finished */
5183
+ onCompletionFinished?: Array<EventAction>
5159
5184
  /* Event triggered when error occurs */
5160
5185
  onError?: Array<EventAction>
5161
5186
  }
@@ -5166,6 +5191,8 @@ Default property:
5166
5191
  generated?: () => Data
5167
5192
  /* Full result of generation */
5168
5193
  fullResult?: () => Data
5194
+ /* Last function call */
5195
+ lastFunctionCall?: () => Data
5169
5196
  }
5170
5197
  }
5171
5198
 
@@ -5184,7 +5211,7 @@ export type GeneratorOnnxLLM = Generator &
5184
5211
  | SwitchCondData
5185
5212
  | {
5186
5213
  __typename: 'SwitchCondInnerStateOutlet'
5187
- outlet: 'contextState' | 'generated' | 'fullResult'
5214
+ outlet: 'contextState' | 'generated' | 'fullResult' | 'lastFunctionCall'
5188
5215
  value: any
5189
5216
  }
5190
5217
  }>
@@ -6173,7 +6200,7 @@ Default property:
6173
6200
  "cacheVType": "f16",
6174
6201
  "ctxShift": true,
6175
6202
  "transformScriptEnabled": false,
6176
- "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables } \*\/\nreturn inputs.prompt",
6203
+ "transformScriptCode": "\/\* Global variable: inputs = { prompt, messages, variables }, members = { llmUtils } \*\/\nreturn inputs.prompt",
6177
6204
  "transformScriptVariables": {},
6178
6205
  "sessionMinSaveSize": 50,
6179
6206
  "sessionRemain": 10,
@@ -6470,6 +6497,11 @@ export type GeneratorQnnLlmActionGenerate = ActionWithParams & {
6470
6497
  value?: Array<any> | DataLink | EventProperty
6471
6498
  mapping?: string
6472
6499
  }
6500
+ | {
6501
+ input: 'tools'
6502
+ value?: Array<any> | DataLink | EventProperty
6503
+ mapping?: string
6504
+ }
6473
6505
  >
6474
6506
  }
6475
6507
 
@@ -6535,7 +6567,7 @@ Default property:
6535
6567
  /* Stop words */
6536
6568
  stopWords?: Array<string | DataLink> | DataLink
6537
6569
  /* Tool call parser */
6538
- toolCallParser?: 'llama3_json' | 'mistral' | DataLink
6570
+ toolCallParser?: 'llama3_json' | 'mistral' | 'hermes' | 'internlm' | 'phi4' | DataLink
6539
6571
  /* Tools for chat mode using OpenAI-compatible function calling format
6540
6572
  Format: Array of objects with {type, function: {name, description, parameters}} structure
6541
6573
  See: https://platform.openai.com/docs/guides/function-calling */
@@ -7302,7 +7334,9 @@ Default property:
7302
7334
  cacheMessages?: boolean | DataLink
7303
7335
  /* LLM Generator (Supports `LLM (GGML)` and `OpenAI LLM` generators) */
7304
7336
  llmGeneratorId?: string | DataLink
7305
- /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use. */
7337
+ /* LLM Live Policy. If the policy is `only-in-use`, the LLM context will be released when the assistant is not in use.
7338
+
7339
+ Note: LLM (Qualcomm AI Engine) recommend use `manual` and loaded constantly. */
7306
7340
  llmLivePolicy?: 'only-in-use' | 'manual' | DataLink
7307
7341
  /* LLM main session key */
7308
7342
  llmSessionKey?: string | DataLink
@@ -739,6 +739,16 @@ export const templateEventPropsMap = {
739
739
  onContextStateChange: [
740
740
  'GENERATOR_ONNX_LLM_CONTEXT_STATE', // type: string
741
741
  ],
742
+ onFunctionCall: [
743
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_NAME', // type: string
744
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_ARGUMENTS', // type: object
745
+ 'GENERATOR_ONNX_LLM_FUNCTION_CALL_DETAILS', // type: object
746
+ ],
747
+ onCompletionFinished: [
748
+ 'GENERATOR_ONNX_LLM_COMPLETION_RESULT', // type: string
749
+ 'GENERATOR_ONNX_LLM_COMPLETION_TOOL_CALLS', // type: array
750
+ 'GENERATOR_ONNX_LLM_COMPLETION_FULL_CONTEXT', // type: string
751
+ ],
742
752
  onError: [
743
753
  'GENERATOR_ONNX_LLM_ERROR', // type: string
744
754
  ],
@@ -803,6 +813,7 @@ export const templateEventPropsMap = {
803
813
  onGenerate: [
804
814
  'GENERATOR_QNN_LLM_RESULT', // type: string
805
815
  'GENERATOR_QNN_LLM_FULL_CONTEXT', // type: string
816
+ 'GENERATOR_QNN_LLM_TOOL_CALLS', // type: array
806
817
  ],
807
818
  onFunctionCall: [
808
819
  'GENERATOR_QNN_LLM_FUNCTION_CALL_NAME', // type: string