-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
codespace-assistant: configurable file system paths, improved tools s…
…upport, more output from testing on workspaces-app project (#310)
- Loading branch information
Showing
13 changed files
with
210 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 44 additions & 41 deletions
85
assistants/codespace-assistant/assistant/extensions/tools/__mcp_server_configs.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,57 @@ | ||
from textwrap import dedent | ||
from typing import List | ||
|
||
from .__model import MCPServerConfig | ||
from .__model import MCPServerConfig, ToolsConfigModel | ||
|
||
# List of MCP server configurations | ||
# Each configuration includes the server name, command, arguments, and environment variables. | ||
# Tested with 'npx' commands and _should_ work with 'uvx' as well. | ||
# Can also use 'node' (and probably 'python'), but requires the full path to the lib/script called. | ||
|
||
mcp_server_configs: List[MCPServerConfig] = [ | ||
MCPServerConfig( | ||
name="Filesystem MCP Server", | ||
command="npx", | ||
args=["-y", "@modelcontextprotocol/server-filesystem", "/workspaces/semanticworkbench"], | ||
), | ||
MCPServerConfig( | ||
name="Memory MCP Server", | ||
command="npx", | ||
args=["-y", "@modelcontextprotocol/server-memory"], | ||
prompt=dedent(""" | ||
Follow these steps for each interaction: | ||
|
||
1. Memory Retrieval: | ||
- Always begin your chat by saying only "Remembering..." and retrieve all relevant information | ||
from your knowledge graph | ||
- Always refer to your knowledge graph as your "memory" | ||
def get_mcp_server_configs(tools_config: ToolsConfigModel) -> List[MCPServerConfig]: | ||
file_system_paths = [f"/workspaces/{file_system_path}" for file_system_path in tools_config.file_system_paths] | ||
return [ | ||
MCPServerConfig( | ||
name="Filesystem MCP Server", | ||
command="npx", | ||
args=["-y", "@modelcontextprotocol/server-filesystem", *file_system_paths], | ||
), | ||
MCPServerConfig( | ||
name="Memory MCP Server", | ||
command="npx", | ||
args=["-y", "@modelcontextprotocol/server-memory"], | ||
prompt=dedent(""" | ||
Follow these steps for each interaction: | ||
2. Memory | ||
- While conversing with the user, be attentive to any new information that falls into these categories: | ||
a) Basic Identity (age, gender, location, job title, education level, etc.) | ||
b) Behaviors (interests, habits, etc.) | ||
c) Preferences (communication style, preferred language, etc.) | ||
d) Goals (goals, targets, aspirations, etc.) | ||
e) Relationships (personal and professional relationships up to 3 degrees of separation) | ||
1. Memory Retrieval: | ||
- Always begin your chat by saying only "Remembering..." and retrieve all relevant information | ||
from your knowledge graph | ||
- Always refer to your knowledge graph as your "memory" | ||
3. Memory Update: | ||
- If any new information was gathered during the interaction, update your memory as follows: | ||
a) Create entities for recurring organizations, people, and significant events | ||
b) Connect them to the current entities using relations | ||
b) Store facts about them as observations | ||
2. Memory | ||
- While conversing with the user, be attentive to any new information that falls into these categories: | ||
a) Basic Identity (age, gender, location, job title, education level, etc.) | ||
b) Behaviors (interests, habits, etc.) | ||
c) Preferences (communication style, preferred language, etc.) | ||
d) Goals (goals, targets, aspirations, etc.) | ||
e) Relationships (personal and professional relationships up to 3 degrees of separation) | ||
3. Memory Update: | ||
- If any new information was gathered during the interaction, update your memory as follows: | ||
a) Create entities for recurring organizations, people, and significant events | ||
b) Connect them to the current entities using relations | ||
b) Store facts about them as observations | ||
"""), | ||
), | ||
# MCPServerConfig( | ||
# name="Sequential Thinking MCP Server", | ||
# command="npx", | ||
# args=["-y", "@modelcontextprotocol/server-sequential-thinking"], | ||
# ), | ||
# MCPServerConfig( | ||
# name="Web Research MCP Server", | ||
# command="npx", | ||
# args=["-y", "@mzxrai/mcp-webresearch@latest"], | ||
# ), | ||
] | ||
), | ||
# MCPServerConfig( | ||
# name="Sequential Thinking MCP Server", | ||
# command="npx", | ||
# args=["-y", "@modelcontextprotocol/server-sequential-thinking"], | ||
# ), | ||
# MCPServerConfig( | ||
# name="Web Research MCP Server", | ||
# command="npx", | ||
# args=["-y", "@mzxrai/mcp-webresearch@latest"], | ||
# ), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,6 +201,7 @@ | |
"reduxjs", | ||
"rehype", | ||
"retriable", | ||
"reverseproxy", | ||
"rjsf", | ||
"rootpath", | ||
"selectin", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "app: workspaces-app", | ||
"cwd": "${workspaceFolder}", | ||
"skipFiles": ["<node_internals>/**"], | ||
"console": "integratedTerminal", | ||
"runtimeExecutable": "pnpm", | ||
"runtimeArgs": ["run", "dev"] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "app: workspaces-app (no strict mode)", | ||
"env": { | ||
"VITE_DISABLE_STRICT_MODE": "true" | ||
}, | ||
"cwd": "${workspaceFolder}", | ||
"skipFiles": ["<node_internals>/**"], | ||
"console": "integratedTerminal", | ||
"runtimeExecutable": "pnpm", | ||
"runtimeArgs": ["run", "dev"] | ||
} | ||
] | ||
} |
Oops, something went wrong.