@@ -41,16 +41,17 @@ export interface ToolDenied {
4141export type ChatHistoryEntry = Message | ToolUse | ToolDenied
4242
4343type McpServerConfigWithPrompt = McpServerConfig & {
44+ /** A detailed description of the MCP server that the inference agent evaluates */
4445 description : string
45- prompt ?: ( ) => Promise < string >
4646 disallowedTools ?: string [ ]
4747 enabled ?: boolean
48+ prompt ?: ( ) => Promise < string >
4849}
4950
5051export interface AgentChatConfig {
5152 agents ?: Record < string , AgentConfig >
52- disallowedTools ?: string [ ]
5353 connectionTimeout ?: number
54+ disallowedTools ?: string [ ]
5455 maxRetries ?: number
5556 mcpServers : Record < string , McpServerConfigWithPrompt >
5657 model ?: "sonnet" | "haiku"
@@ -61,8 +62,8 @@ export interface AgentChatConfig {
6162}
6263
6364export interface PendingToolPermission {
64- toolName : string
6565 input : any
66+ toolName : string
6667}
6768
6869export interface StoreModel {
@@ -80,9 +81,9 @@ export interface StoreModel {
8081 stats ?: string | null
8182
8283 // Computed
83- isBooted : Computed < StoreModel , boolean >
84- availableMcpServers : Computed < StoreModel , string [ ] >
8584 availableAgents : Computed < StoreModel , string [ ] >
85+ availableMcpServers : Computed < StoreModel , string [ ] >
86+ isBooted : Computed < StoreModel , boolean >
8687
8788 // Actions
8889 abortRequest : Action < StoreModel >
@@ -91,6 +92,7 @@ export interface StoreModel {
9192 appendCurrentAssistantMessage : Action < StoreModel , string >
9293 clearCurrentAssistantMessage : Action < StoreModel >
9394 clearToolUses : Action < StoreModel >
95+ handleMcpServerStatus : Thunk < StoreModel , McpServerStatus [ ] >
9496 reset : Action < StoreModel >
9597 sendMessage : Action < StoreModel , string >
9698 setPendingToolPermission : Action <
@@ -106,22 +108,21 @@ export interface StoreModel {
106108 setMcpServers : Action < StoreModel , McpServerStatus [ ] >
107109 setSessionId : Action < StoreModel , string >
108110 setStats : Action < StoreModel , string | null >
109- handleMcpServerStatus : Thunk < StoreModel , McpServerStatus [ ] >
110111}
111112
112113export const AgentStore = createContextStore < StoreModel > ( {
113114 abortController : new AbortController ( ) ,
114115 chatHistory : [ ] ,
115- messageQueue : new MessageQueue ( ) ,
116- sessionId : undefined ,
117- mcpServers : [ ] ,
118- input : "" ,
119- isProcessing : false ,
116+ config : null as unknown as AgentChatConfig ,
120117 currentAssistantMessage : "" ,
121118 currentToolUses : [ ] ,
119+ input : "" ,
120+ isProcessing : false ,
121+ mcpServers : [ ] ,
122+ messageQueue : new MessageQueue ( ) ,
122123 pendingToolPermission : undefined ,
124+ sessionId : undefined ,
123125 stats : undefined ,
124- config : null as unknown as AgentChatConfig ,
125126
126127 // Computed
127128 isBooted : computed ( ( state ) => {
0 commit comments