Skip to content

Commit 7cc6567

Browse files
committed
Bump version: 1.3.10 → 1.3.11
1 parent 08bc738 commit 7cc6567

File tree

7 files changed

+58
-23
lines changed

7 files changed

+58
-23
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.3.10
2+
current_version = 1.3.11
33
commit = True
44
tag = True
55

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ ENV HOST=${HOST} \
5454
RUN apt-get update \
5555
&& apt-get install -y curl nano \
5656
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
57-
&& uv pip install --system --upgrade --verbose --no-cache --break-system-packages --prerelease=allow ansible-tower-mcp[all]>=1.3.10
57+
&& uv pip install --system --upgrade --verbose --no-cache --break-system-packages --prerelease=allow ansible-tower-mcp[all]>=1.3.11
5858

5959
CMD ["ansible-tower-mcp"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
![PyPI - Wheel](https://img.shields.io/pypi/wheel/ansible-tower-mcp)
2323
![PyPI - Implementation](https://img.shields.io/pypi/implementation/ansible-tower-mcp)
2424

25-
*Version: 1.3.10*
25+
*Version: 1.3.11*
2626

2727
## Overview
2828

ansible_tower_mcp/ansible_tower_agent.py

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from pydantic_ai.ui import SSE_CONTENT_TYPE
4040
from pydantic_ai.ui.ag_ui import AGUIAdapter
4141

42-
__version__ = "1.3.10"
42+
__version__ = "1.3.11"
4343

4444
logging.basicConfig(
4545
level=logging.INFO,
@@ -60,7 +60,7 @@
6060
DEFAULT_LLM_API_KEY = os.getenv("LLM_API_KEY", "ollama")
6161
DEFAULT_MCP_URL = os.getenv("MCP_URL", None)
6262
DEFAULT_MCP_CONFIG = os.getenv("MCP_CONFIG", get_mcp_config_path())
63-
DEFAULT_SKILLS_DIRECTORY = os.getenv("SKILLS_DIRECTORY", get_skills_path())
63+
DEFAULT_CUSTOM_SKILLS_DIRECTORY = os.getenv("CUSTOM_SKILLS_DIRECTORY", None)
6464
DEFAULT_ENABLE_WEB_UI = to_boolean(os.getenv("ENABLE_WEB_UI", "False"))
6565
DEFAULT_SSL_VERIFY = to_boolean(os.getenv("SSL_VERIFY", "True"))
6666

@@ -285,7 +285,7 @@ def create_agent(
285285
api_key: Optional[str] = DEFAULT_LLM_API_KEY,
286286
mcp_url: str = DEFAULT_MCP_URL,
287287
mcp_config: str = DEFAULT_MCP_CONFIG,
288-
skills_directory: Optional[str] = DEFAULT_SKILLS_DIRECTORY,
288+
custom_skills_directory: Optional[str] = DEFAULT_CUSTOM_SKILLS_DIRECTORY,
289289
ssl_verify: bool = DEFAULT_SSL_VERIFY,
290290
) -> Agent:
291291
"""
@@ -344,8 +344,7 @@ def create_agent(
344344
agent_toolsets.extend(mcp_toolset)
345345
logger.info(f"Connected to MCP Config JSON: {mcp_toolset}")
346346

347-
if skills_directory and os.path.exists(skills_directory):
348-
agent_toolsets.append(SkillsToolset(directories=[str(skills_directory)]))
347+
# Skills are loaded per-agent based on tags
349348

350349
agent_defs = {
351350
"ad_hoc_commands": (
@@ -395,6 +394,26 @@ def filter_func(ctx, tool_def, t=tag):
395394
else:
396395
pass
397396

397+
# Load specific skills for this tag
398+
skill_dir_name = f"ansible-tower-mcp-{tag.replace('_', '-')}"
399+
400+
# Check custom skills directory
401+
if custom_skills_directory:
402+
skill_dir_path = os.path.join(custom_skills_directory, skill_dir_name)
403+
if os.path.exists(skill_dir_path):
404+
tag_toolsets.append(SkillsToolset(directories=[skill_dir_path]))
405+
logger.info(
406+
f"Loaded specialized skills for {tag} from {skill_dir_path}"
407+
)
408+
409+
# Check default skills directory
410+
default_skill_path = os.path.join(get_skills_path(), skill_dir_name)
411+
if os.path.exists(default_skill_path):
412+
tag_toolsets.append(SkillsToolset(directories=[default_skill_path]))
413+
logger.info(
414+
f"Loaded specialized skills for {tag} from {default_skill_path}"
415+
)
416+
398417
# Collect tool names for logging
399418
all_tool_names = []
400419
for ts in tag_toolsets:
@@ -595,7 +614,7 @@ def create_agent_server(
595614
api_key: Optional[str] = DEFAULT_LLM_API_KEY,
596615
mcp_url: str = DEFAULT_MCP_URL,
597616
mcp_config: str = DEFAULT_MCP_CONFIG,
598-
skills_directory: Optional[str] = DEFAULT_SKILLS_DIRECTORY,
617+
custom_skills_directory: Optional[str] = DEFAULT_CUSTOM_SKILLS_DIRECTORY,
599618
debug: Optional[bool] = DEFAULT_DEBUG,
600619
host: Optional[str] = DEFAULT_HOST,
601620
port: Optional[int] = DEFAULT_PORT,
@@ -617,14 +636,30 @@ def create_agent_server(
617636
api_key=api_key,
618637
mcp_url=mcp_url,
619638
mcp_config=mcp_config,
620-
skills_directory=skills_directory,
639+
custom_skills_directory=custom_skills_directory,
621640
ssl_verify=ssl_verify,
622641
)
623642

624-
if skills_directory and os.path.exists(skills_directory):
625-
skills = load_skills_from_directory(skills_directory)
626-
logger.info(f"Loaded {len(skills)} skills from {skills_directory}")
627-
else:
643+
# Always load default skills
644+
645+
skills = load_skills_from_directory(get_skills_path())
646+
647+
logger.info(f"Loaded {len(skills)} default skills from {get_skills_path()}")
648+
649+
# Load custom skills if provided
650+
651+
if custom_skills_directory and os.path.exists(custom_skills_directory):
652+
653+
custom_skills = load_skills_from_directory(custom_skills_directory)
654+
655+
skills.extend(custom_skills)
656+
657+
logger.info(
658+
f"Loaded {len(custom_skills)} custom skills from {custom_skills_directory}"
659+
)
660+
661+
if not skills:
662+
628663
skills = [
629664
Skill(
630665
id="ansible_tower_agent",
@@ -741,9 +776,9 @@ def agent_server():
741776
"--mcp-config", default=DEFAULT_MCP_CONFIG, help="MCP Server Config"
742777
)
743778
parser.add_argument(
744-
"--skills-directory",
745-
default=DEFAULT_SKILLS_DIRECTORY,
746-
help="Directory containing agent skills",
779+
"--custom-skills-directory",
780+
default=DEFAULT_CUSTOM_SKILLS_DIRECTORY,
781+
help="Directory containing additional custom agent skills",
747782
)
748783
parser.add_argument(
749784
"--web",
@@ -791,7 +826,7 @@ def agent_server():
791826
api_key=args.api_key,
792827
mcp_url=args.mcp_url,
793828
mcp_config=args.mcp_config,
794-
skills_directory=args.skills_directory,
829+
custom_skills_directory=args.custom_skills_directory,
795830
debug=args.debug,
796831
host=args.host,
797832
port=args.port,
@@ -814,12 +849,12 @@ def usage():
814849
"--api-key [ LLM API Key ]\n"
815850
"--mcp-url [ MCP Server URL ]\n"
816851
"--mcp-config [ MCP Server Config ]\n"
817-
"--skills-directory [ Directory containing agent skills ]\n"
852+
"--custom-skills-directory [ Directory containing additional custom agent skills ]\n"
818853
"--web [ Enable Pydantic AI Web UI ]\n"
819854
"\n"
820855
"Examples:\n"
821856
" [Simple] ansible-tower-agent \n"
822-
' [Complex] ansible-tower-agent --host "value" --port "value" --debug "value" --reload --provider "value" --model-id "value" --base-url "value" --api-key "value" --mcp-url "value" --mcp-config "value" --skills-directory "value" --web\n'
857+
' [Complex] ansible-tower-agent --host "value" --port "value" --debug "value" --reload --provider "value" --model-id "value" --base-url "value" --api-key "value" --mcp-url "value" --mcp-config "value" --custom-skills-directory "value" --web\n'
823858
)
824859

825860

ansible_tower_mcp/ansible_tower_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import re
99
import urllib3
1010

11-
__version__ = "1.3.10"
11+
__version__ = "1.3.11"
1212

1313

1414
class Api:

ansible_tower_mcp/ansible_tower_mcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
JWTClaimsLoggingMiddleware,
3535
)
3636

37-
__version__ = "1.3.10"
37+
__version__ = "1.3.11"
3838

3939
logger = get_logger(name="TokenMiddleware")
4040
logger.setLevel(logging.DEBUG)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ansible-tower-mcp"
7-
version = "1.3.10"
7+
version = "1.3.11"
88
description = "Ansible Tower MCP Server for Agentic AI!"
99
readme = "README.md"
1010
authors = [{ name = "Audel Rouhi", email = "knucklessg1@gmail.com" }]

0 commit comments

Comments
 (0)