This document highlights the changes introduced in tinystruct version 1.7.40, focusing on AI coding-agent integration, automatic Git-backed application versioning, API modernization, and exception-handling reliability.
For earlier changes, see What's New in 1.7.39 and What's New in 1.7.38.
- Automatic Project Setup: When
bin/dispatcherruns inside a project root containing a build file (pom.xml,build.gradle,build.gradle.kts,settings.gradle, orsettings.gradle.kts), it automatically generates missing AI coding-agent files without overwriting existing ones:AGENTS.md— cross-tool project instructions for Codex, Cursor, Copilot, Gemini CLI, Kiro, and other agentsCLAUDE.md— imports@AGENTS.mdfor Claude Code.agents/skills/tinystruct-patterns/and.claude/skills/tinystruct-patterns/— the bundledtinystruct-patternsskill and itsreferences/documentation
- Explicit
agentsCommand: Addedbin/dispatcher agents [--force]to generate or overwrite (--force) the agent instruction files and skill folders on demand. - Opt-Out Switches: Disable automatic generation with
default.generate.agent_files=falseinapplication.propertiesor-Dtinystruct.agent.files=false.
AbstractApplication.version()Default Implementation: Applications extendingAbstractApplicationno longer need to manually overrideversion().- Build-Time Version Generation:
ApplicationVersionGeneratorruns during the Mavenprocess-classesphase to generateMETA-INF/tinystruct-versions.propertiesfrom Git history, providing automatic version resolution at runtime.
- JJWT 0.13.0 Codec Split: Replaced
JWTCodecwithJWTSerializer(extendingio.jsonwebtoken.io.AbstractSerializer) andJWTDeserializer(extendingio.jsonwebtoken.io.AbstractDeserializer), registered viaMETA-INF/services/io.jsonwebtoken.io.SerializerandMETA-INF/services/io.jsonwebtoken.io.Deserializer. - Lettuce 7.9.0 Authentication: Updated
DistributedRedisLockto useRedisURI.Builder.withAuthentication(...)instead of the deprecatedRedisCredentialsProviderandRedisURI.setCredentialsProvider(...).
- Overload Binding vs. Invocation: Split
MCPTool.ToolMethodintobind()andinvoke()inMCPServerso runtime failures are reported directly instead of retrying other overloads. - Name-Based Argument Binding: Enabled
-parametersin Maven compiler configuration so MCP tool arguments bind by@Argumentkey name regardless of declaration order. - Hardened Schema Validation & Access Checks: Added
SchemaGenerator.stringList()sorequiredandenumconstraints are enforced for both in-memoryString[]and JSON-parsedBuildersschemas, restrictedSchemaGenerator.generateSchema(Class)to public@Actionmethods while preserving Java access checks, and addedMCPClientfallback inMCPTool.executeLocally().
- Exception Cause Preservation: Fixed
SQLiteGeneratorandWatcherwheree.getCause()was passed instead ofewhen wrapping exceptions inApplicationException, preserving the original root cause and stack trace.
Update your pom.xml dependency version:
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct</artifactId>
<version>1.7.40</version>
</dependency>