diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml
index 79a7b02..86f5acb 100644
--- a/bootstrap/pom.xml
+++ b/bootstrap/pom.xml
@@ -51,7 +51,7 @@
io.github.llmagentbuilder
chat-agent-ui
- 0.3.0
+ 0.3.1
org.slf4j
diff --git a/bootstrap/src/main/kotlin/io/github/llmagentbuilder/bootstrap/AgentMain.kt b/bootstrap/src/main/kotlin/io/github/llmagentbuilder/bootstrap/AgentMain.kt
index eb3249a..8ce9cc7 100644
--- a/bootstrap/src/main/kotlin/io/github/llmagentbuilder/bootstrap/AgentMain.kt
+++ b/bootstrap/src/main/kotlin/io/github/llmagentbuilder/bootstrap/AgentMain.kt
@@ -1,11 +1,13 @@
package io.github.llmagentbuilder.bootstrap
+import io.github.llmagentbuilder.core.VERSION
import org.slf4j.LoggerFactory
import java.nio.file.Path
object AgentMain {
fun start(configFile: String? = null) {
val logger = LoggerFactory.getLogger(javaClass)
+ logger.info("Agent version: {}", VERSION)
if (configFile != null) {
logger.info("Bootstrap agent from config file $configFile")
AgentBootstrap.bootstrap(Path.of(configFile))
diff --git a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/CliApplication.kt b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/CliApplication.kt
index 3520f07..2c5fe6d 100644
--- a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/CliApplication.kt
+++ b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/CliApplication.kt
@@ -2,13 +2,14 @@ package io.github.llmagentbuilder.cli
import io.github.llmagentbuilder.cli.command.BuildCommand
import io.github.llmagentbuilder.cli.command.RunCommand
+import io.github.llmagentbuilder.core.VERSION
import picocli.CommandLine
import kotlin.system.exitProcess
@CommandLine.Command(
name = "llm-agent-builder",
mixinStandardHelpOptions = true,
- version = ["0.3.3"],
+ version = [VERSION],
description = ["Build LLM agents"],
subcommands = [RunCommand::class, BuildCommand::class],
)
diff --git a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/MavenFilesGenerator.kt b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/MavenFilesGenerator.kt
index 260b6e3..f186575 100644
--- a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/MavenFilesGenerator.kt
+++ b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/MavenFilesGenerator.kt
@@ -3,6 +3,7 @@ package io.github.llmagentbuilder.cli
import com.github.jknack.handlebars.Handlebars
import com.github.jknack.handlebars.io.ClassPathTemplateLoader
import io.github.llmagentbuilder.core.AgentConfig
+import io.github.llmagentbuilder.core.VERSION
import org.yaml.snakeyaml.LoaderOptions
import org.yaml.snakeyaml.Yaml
import org.yaml.snakeyaml.constructor.Constructor
@@ -27,7 +28,7 @@ object MavenFilesGenerator {
"springAiVersion" to (config.springAiVersion
?: "1.0.0-SNAPSHOT"),
"llmAgentBuilderVersion" to (config.llmAgentBuilderVersion
- ?: "0.2.0"),
+ ?: VERSION),
"dependencies" to collectDependencies(agentConfig),
)
@@ -67,10 +68,6 @@ object MavenFilesGenerator {
return deps.toList()
}
- fun generateAssemblyDescriptor(): String {
- val template = handlebars.compile("agent-jar-assembly.xml")
- return template.apply(mapOf())
- }
}
fun main(args: Array) {
diff --git a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/BuildCommand.kt b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/BuildCommand.kt
index 47269af..31b3c33 100644
--- a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/BuildCommand.kt
+++ b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/BuildCommand.kt
@@ -54,7 +54,7 @@ class BuildCommand : Callable {
val outputPath = outputDir.resolve("agent.jar")
Files.copy(
projectDir.resolve("target")
- .resolve("agent-jar-with-dependencies.jar"),
+ .resolve("agent.jar"),
outputPath,
StandardCopyOption.REPLACE_EXISTING
)
diff --git a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/CommandHelper.kt b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/CommandHelper.kt
index f092227..93a55fe 100644
--- a/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/CommandHelper.kt
+++ b/cli/src/main/kotlin/io/github/llmagentbuilder/cli/command/CommandHelper.kt
@@ -22,13 +22,6 @@ object CommandHelper {
GenerationConfig(), config
)
writeFile(projectDir, "pom.xml", pom)
- val assemblyDescriptor =
- MavenFilesGenerator.generateAssemblyDescriptor()
- writeFile(
- projectDir.resolve("src").resolve("assembly"),
- "agent-jar.xml",
- assemblyDescriptor
- )
return projectDir
}
diff --git a/cli/src/main/resources/template/agent-jar-assembly.xml.hbs b/cli/src/main/resources/template/agent-jar-assembly.xml.hbs
deleted file mode 100644
index 4d80363..0000000
--- a/cli/src/main/resources/template/agent-jar-assembly.xml.hbs
+++ /dev/null
@@ -1,22 +0,0 @@
-
- jar-with-dependencies
-
- jar
-
- false
-
-
- /
- true
- true
- runtime
-
-
-
-
- metaInf-services
-
-
-
\ No newline at end of file
diff --git a/cli/src/main/resources/template/pom.xml.hbs b/cli/src/main/resources/template/pom.xml.hbs
index 3cfe579..3ef0d9d 100644
--- a/cli/src/main/resources/template/pom.xml.hbs
+++ b/cli/src/main/resources/template/pom.xml.hbs
@@ -72,28 +72,19 @@
+ agent
- maven-assembly-plugin
- 3.7.1
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 3.3.4
- agent
-
- src/assembly/agent-jar.xml
-
-
-
- io.github.llmagentbuilder.bootstrap.AgentMainKt
-
-
-
+ io.github.llmagentbuilder.bootstrap.AgentMainKt
- make-assembly
- package
- single
+ repackage
diff --git a/core/pom.xml b/core/pom.xml
index dea91e0..693497a 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -32,6 +32,37 @@
org.apache.maven.plugins
maven-failsafe-plugin
+
+ org.codehaus.gmaven
+ groovy-maven-plugin
+ 2.1.1
+
+
+ generate-resources
+
+ execute
+
+
+
+
+
+
+
+
+ org.codehaus.groovy
+ groovy-all
+ 2.4.21
+
+
+
diff --git a/core/src/main/kotlin/io/github/llmagentbuilder/core/Version.kt b/core/src/main/kotlin/io/github/llmagentbuilder/core/Version.kt
new file mode 100644
index 0000000..7f91798
--- /dev/null
+++ b/core/src/main/kotlin/io/github/llmagentbuilder/core/Version.kt
@@ -0,0 +1,4 @@
+
+package io.github.llmagentbuilder.core
+
+const val VERSION = "0.3.3"