Skip to content

Commit b0e916a

Browse files
committed
Shell with Docker Tools as default
1 parent cde9e30 commit b0e916a

File tree

4 files changed

+29
-19
lines changed

4 files changed

+29
-19
lines changed

examples-java/src/main/java/com/embabel/example/JavaAgentShellApplication.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@
4242
}
4343
)
4444
@EnableAgents(
45-
loggingTheme = LoggingThemes.SEVERANCE,
46-
mcpServers = {McpServers.DOCKER_DESKTOP}
45+
loggingTheme = LoggingThemes.SEVERANCE
4746
)
4847
public class JavaAgentShellApplication {
4948

examples-kotlin/src/main/kotlin/com/embabel/example/KotlinAgentShellApplication.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package com.embabel.example
1717

1818
import com.embabel.agent.config.annotation.EnableAgents
1919
import com.embabel.agent.config.annotation.LoggingThemes
20-
import com.embabel.agent.config.annotation.McpServers
2120
import org.springframework.boot.autoconfigure.SpringBootApplication
2221
import org.springframework.boot.context.properties.ConfigurationPropertiesScan
2322
import org.springframework.boot.runApplication
@@ -44,7 +43,6 @@ import org.springframework.boot.runApplication
4443
)
4544
@EnableAgents(
4645
loggingTheme = LoggingThemes.STAR_WARS,
47-
mcpServers = [McpServers.DOCKER, McpServers.DOCKER_DESKTOP],
4846
)
4947
class KotlinAgentShellApplication
5048

scripts/support/shell_template.bat

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
@echo off
22
setlocal
3-
43
REM This script requires AGENT_APPLICATION to be set by the calling script
54
if not defined AGENT_APPLICATION (
65
echo ERROR: AGENT_APPLICATION must be set by calling script
76
exit /b 1
87
)
98

10-
set MAVEN_PROFILE=enable-shell
9+
REM Default: Docker tools enabled (reversed from original logic)
10+
set MAVEN_PROFILE=enable-shell-mcp-client
1111

12-
REM Check for --docker-tools parameter
12+
REM Check for --no-docker-tools parameter to disable tools
1313
:parse_args
1414
if "%~1"=="" goto end_parse
15-
if "%~1"=="--docker-tools" (
16-
set MAVEN_PROFILE=enable-shell-mcp-client
15+
if "%~1"=="--no-docker-tools" (
16+
set MAVEN_PROFILE=enable-shell
1717
shift
1818
goto parse_args
1919
)
@@ -23,13 +23,19 @@ goto parse_args
2323

2424
:end_parse
2525

26-
REM Display feature availability warning
26+
REM Display startup message about Docker tools status
27+
if "%MAVEN_PROFILE%"=="enable-shell-mcp-client" (
28+
powershell -Command "Write-Host 'INFO: Docker tools are enabled (default behavior)' -ForegroundColor Green"
29+
powershell -Command "Write-Host 'Use --no-docker-tools to disable Docker integration if needed' -ForegroundColor Cyan"
30+
echo.
31+
)
32+
33+
REM Display feature availability warning when tools are disabled
2734
if "%MAVEN_PROFILE%"=="enable-shell" (
2835
powershell -Command "Write-Host 'WARNING: Only Basic Agent features will be available' -ForegroundColor Red"
29-
powershell -Command "Write-Host 'Use --docker-tools parameter to enable advanced Docker integration features' -ForegroundColor Yellow"
36+
powershell -Command "Write-Host 'Docker tools have been disabled. Remove --no-docker-tools to enable advanced features' -ForegroundColor Yellow"
3037
echo.
3138
)
3239

3340
call %~dp0..\support\agent.bat
34-
3541
endlocal

scripts/support/shell_template.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
#!/usr/bin/env bash
2-
32
# This script requires AGENT_APPLICATION to be set by the calling script
43
if [ -z "$AGENT_APPLICATION" ]; then
54
echo "ERROR: AGENT_APPLICATION must be set by calling script"
65
exit 1
76
fi
87

9-
export MAVEN_PROFILE=enable-shell
8+
# Default: Docker tools enabled (reversed from original logic)
9+
export MAVEN_PROFILE=enable-shell-mcp-client
1010

11-
# Check for --docker-tools parameter
11+
# Check for --no-docker-tools parameter to disable tools
1212
while [[ $# -gt 0 ]]; do
1313
case $1 in
14-
--docker-tools)
15-
export MAVEN_PROFILE=enable-shell-mcp-client
14+
--no-docker-tools)
15+
export MAVEN_PROFILE=enable-shell
1616
shift
1717
;;
1818
*)
@@ -22,10 +22,17 @@ while [[ $# -gt 0 ]]; do
2222
esac
2323
done
2424

25-
# Display feature availability warning
25+
# Display startup message about Docker tools status
26+
if [ "$MAVEN_PROFILE" = "enable-shell-mcp-client" ]; then
27+
echo -e "\033[32mINFO: Docker tools are enabled (default behavior)\033[0m"
28+
echo -e "\033[36mUse --no-docker-tools to disable Docker integration if needed\033[0m"
29+
echo
30+
fi
31+
32+
# Display feature availability warning when tools are disabled
2633
if [ "$MAVEN_PROFILE" = "enable-shell" ]; then
2734
echo -e "\033[31mWARNING: Only Basic Agent features will be available\033[0m"
28-
echo -e "\033[33mUse --docker-tools parameter to enable advanced Docker integration features\033[0m"
35+
echo -e "\033[33mDocker tools have been disabled. Remove --no-docker-tools to enable advanced features\033[0m"
2936
echo
3037
fi
3138

0 commit comments

Comments
 (0)