@fugood/bricks-project 2.22.0-beta.4 → 2.22.0-beta.5
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/package.json +2 -2
- package/types/generators.ts +85 -10
|
@@ -706,6 +706,12 @@ export const templateActionNameMap = {
|
|
|
706
706
|
GENERATOR_ASSISTANT_REMOVE_MESSAGE_AT_INDEX: {
|
|
707
707
|
index: 'GENERATOR_ASSISTANT_INDEX',
|
|
708
708
|
},
|
|
709
|
+
GENERATOR_ASSISTANT_INSERT_MCP_RESOURCE: {
|
|
710
|
+
mcpClientName: 'GENERATOR_ASSISTANT_MCP_CLIENT_NAME',
|
|
711
|
+
mcpResourceUri: 'GENERATOR_ASSISTANT_MCP_RESOURCE_URI',
|
|
712
|
+
mcpVariables: 'GENERATOR_ASSISTANT_MCP_VARIABLES',
|
|
713
|
+
role: 'GENERATOR_ASSISTANT_ROLE',
|
|
714
|
+
},
|
|
709
715
|
},
|
|
710
716
|
GENERATOR_VECTOR_STORE: {
|
|
711
717
|
GENERATOR_VECTOR_STORE_RESET: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.22.0-beta.
|
|
3
|
+
"version": "2.22.0-beta.5",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node scripts/build.js"
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"lodash": "^4.17.4",
|
|
15
15
|
"uuid": "^8.3.1"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "5e7016bedfd5ccc55ae6ea7a54f87e97a593a62b"
|
|
18
18
|
}
|
package/types/generators.ts
CHANGED
|
@@ -4307,7 +4307,7 @@ export type GeneratorSqlite = Generator &
|
|
|
4307
4307
|
>
|
|
4308
4308
|
}
|
|
4309
4309
|
|
|
4310
|
-
/* Refresh tools and resources, used for case if tools or resources are changed */
|
|
4310
|
+
/* Refresh tools and resources, used for case if tools or resources are changed. Note that the current connections will be closed. */
|
|
4311
4311
|
export type GeneratorMCPServerActionRefreshResources = Action & {
|
|
4312
4312
|
__actionName: 'GENERATOR_MCP_SERVER_REFRESH_RESOURCES'
|
|
4313
4313
|
}
|
|
@@ -4345,13 +4345,13 @@ Default property:
|
|
|
4345
4345
|
name?: string | DataLink
|
|
4346
4346
|
/* Version of the MCP server */
|
|
4347
4347
|
version?: string | DataLink
|
|
4348
|
-
/* Resources
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4348
|
+
/* Resources
|
|
4349
|
+
Type:
|
|
4350
|
+
`static`: Return static data
|
|
4351
|
+
`detect-data-change`: Watch data target change to return data,
|
|
4352
|
+
please update data with ({ id: string, content: string | object }),
|
|
4353
|
+
and ensure the id is same with request id
|
|
4354
|
+
`script`: Not implemented yet */
|
|
4355
4355
|
resources?:
|
|
4356
4356
|
| Array<
|
|
4357
4357
|
| DataLink
|
|
@@ -4388,7 +4388,12 @@ Default property:
|
|
|
4388
4388
|
}
|
|
4389
4389
|
>
|
|
4390
4390
|
| DataLink
|
|
4391
|
-
/* Tools
|
|
4391
|
+
/* Tools
|
|
4392
|
+
Type:
|
|
4393
|
+
`detect-data-change`: Watch data target change to return data,
|
|
4394
|
+
please update data with ({ id: string, content: string | object }),
|
|
4395
|
+
and ensure the id is same with request id.
|
|
4396
|
+
`script`: Not implemented yet */
|
|
4392
4397
|
tools?:
|
|
4393
4398
|
| Array<
|
|
4394
4399
|
| DataLink
|
|
@@ -4571,7 +4576,15 @@ Default property:
|
|
|
4571
4576
|
"init": false,
|
|
4572
4577
|
"type": "sse",
|
|
4573
4578
|
"url": "",
|
|
4574
|
-
"
|
|
4579
|
+
"autoReconnect": true,
|
|
4580
|
+
"maxReconnectAttempts": 10,
|
|
4581
|
+
"reconnectInterval": 1000,
|
|
4582
|
+
"generatorId": "",
|
|
4583
|
+
"name": "bricks-foundation-mcp-client-default",
|
|
4584
|
+
"version": "1.0.0",
|
|
4585
|
+
"ignoreResourceInList": [],
|
|
4586
|
+
"ignoreToolInList": [],
|
|
4587
|
+
"requestTimeout": 60000
|
|
4575
4588
|
}
|
|
4576
4589
|
*/
|
|
4577
4590
|
property?: {
|
|
@@ -4581,6 +4594,12 @@ Default property:
|
|
|
4581
4594
|
type?: 'sse' | 'direct-link' | DataLink
|
|
4582
4595
|
/* URL of the MCP server, e.g. http://localhost:19853/sse */
|
|
4583
4596
|
url?: string | DataLink
|
|
4597
|
+
/* Whether to automatically reconnect to the MCP server */
|
|
4598
|
+
autoReconnect?: boolean | DataLink
|
|
4599
|
+
/* Maximum number of reconnection attempts */
|
|
4600
|
+
maxReconnectAttempts?: number | DataLink
|
|
4601
|
+
/* Reconnection interval in milliseconds */
|
|
4602
|
+
reconnectInterval?: number | DataLink
|
|
4584
4603
|
/* SSE connection headers */
|
|
4585
4604
|
sseHeaders?: {} | DataLink
|
|
4586
4605
|
/* Send request headers */
|
|
@@ -4589,6 +4608,16 @@ Default property:
|
|
|
4589
4608
|
bearerToken?: string | DataLink
|
|
4590
4609
|
/* Generator MCPServer ID for direct link */
|
|
4591
4610
|
generatorId?: string | DataLink
|
|
4611
|
+
/* Name of the MCP client */
|
|
4612
|
+
name?: string | DataLink
|
|
4613
|
+
/* Version of the MCP client */
|
|
4614
|
+
version?: string | DataLink
|
|
4615
|
+
/* Ignore resources in list response */
|
|
4616
|
+
ignoreResourceInList?: Array<string | DataLink> | DataLink
|
|
4617
|
+
/* Ignore tools in list response */
|
|
4618
|
+
ignoreToolInList?: Array<string | DataLink> | DataLink
|
|
4619
|
+
/* Request timeout in milliseconds */
|
|
4620
|
+
requestTimeout?: number | DataLink
|
|
4592
4621
|
}
|
|
4593
4622
|
events?: {
|
|
4594
4623
|
/* On connected */
|
|
@@ -6812,6 +6841,38 @@ export type GeneratorAssistantActionCancel = Action & {
|
|
|
6812
6841
|
__actionName: 'GENERATOR_ASSISTANT_CANCEL'
|
|
6813
6842
|
}
|
|
6814
6843
|
|
|
6844
|
+
/* Check the enabled MCP clients connection status and available tools */
|
|
6845
|
+
export type GeneratorAssistantActionCheckMcpServers = Action & {
|
|
6846
|
+
__actionName: 'GENERATOR_ASSISTANT_CHECK_MCP_SERVERS'
|
|
6847
|
+
}
|
|
6848
|
+
|
|
6849
|
+
/* Insert an MCP resource as a new assistant message */
|
|
6850
|
+
export type GeneratorAssistantActionInsertMcpResource = ActionWithParams & {
|
|
6851
|
+
__actionName: 'GENERATOR_ASSISTANT_INSERT_MCP_RESOURCE'
|
|
6852
|
+
params?: Array<
|
|
6853
|
+
| {
|
|
6854
|
+
input: 'mcpClientName'
|
|
6855
|
+
value?: string | DataLink | EventProperty
|
|
6856
|
+
mapping?: string
|
|
6857
|
+
}
|
|
6858
|
+
| {
|
|
6859
|
+
input: 'mcpResourceUri'
|
|
6860
|
+
value?: string | DataLink | EventProperty
|
|
6861
|
+
mapping?: string
|
|
6862
|
+
}
|
|
6863
|
+
| {
|
|
6864
|
+
input: 'mcpVariables'
|
|
6865
|
+
value?: {} | DataLink | EventProperty
|
|
6866
|
+
mapping?: string
|
|
6867
|
+
}
|
|
6868
|
+
| {
|
|
6869
|
+
input: 'role'
|
|
6870
|
+
value?: string | DataLink | EventProperty
|
|
6871
|
+
mapping?: string
|
|
6872
|
+
}
|
|
6873
|
+
>
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6815
6876
|
interface GeneratorAssistantDef {
|
|
6816
6877
|
/*
|
|
6817
6878
|
Default property:
|
|
@@ -6875,6 +6936,17 @@ Default property:
|
|
|
6875
6936
|
ttsEnabled?: boolean | DataLink
|
|
6876
6937
|
/* TTS Live Policy. If the policy is `only-in-use`, the TTS context will be released when the assistant is not in use. */
|
|
6877
6938
|
ttsLivePolicy?: 'only-in-use' | 'manual' | DataLink
|
|
6939
|
+
/* MCP Generators (Add a unique name if generator name property are duplicate) */
|
|
6940
|
+
mcpGenerators?:
|
|
6941
|
+
| Array<
|
|
6942
|
+
| DataLink
|
|
6943
|
+
| {
|
|
6944
|
+
generatorId?: string | DataLink
|
|
6945
|
+
name?: string | DataLink
|
|
6946
|
+
enabled?: boolean | DataLink
|
|
6947
|
+
}
|
|
6948
|
+
>
|
|
6949
|
+
| DataLink
|
|
6878
6950
|
}
|
|
6879
6951
|
events?: {
|
|
6880
6952
|
/* Error event */
|
|
@@ -6897,6 +6969,8 @@ Default property:
|
|
|
6897
6969
|
files?: () => Data
|
|
6898
6970
|
/* Messages of the assistant */
|
|
6899
6971
|
messages?: () => Data
|
|
6972
|
+
/* MCP servers status and available tools */
|
|
6973
|
+
mcpServers?: () => Data
|
|
6900
6974
|
}
|
|
6901
6975
|
}
|
|
6902
6976
|
|
|
@@ -6921,6 +6995,7 @@ export type GeneratorAssistant = Generator &
|
|
|
6921
6995
|
| 'isBusy'
|
|
6922
6996
|
| 'files'
|
|
6923
6997
|
| 'messages'
|
|
6998
|
+
| 'mcpServers'
|
|
6924
6999
|
value: any
|
|
6925
7000
|
}
|
|
6926
7001
|
}>
|