Skip to content

Latest commit

 

History

History
52 lines (34 loc) · 3.65 KB

whats-new-1.7.40.md

File metadata and controls

52 lines (34 loc) · 3.65 KB

What's New in tinystruct 1.7.40

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.


Highlights of 1.7.40

1. AI Coding-Agent Instructions & bin/dispatcher agents

  • Automatic Project Setup: When bin/dispatcher runs inside a project root containing a build file (pom.xml, build.gradle, build.gradle.kts, settings.gradle, or settings.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 agents
    • CLAUDE.md — imports @AGENTS.md for Claude Code
    • .agents/skills/tinystruct-patterns/ and .claude/skills/tinystruct-patterns/ — the bundled tinystruct-patterns skill and its references/ documentation
  • Explicit agents Command: Added bin/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=false in application.properties or -Dtinystruct.agent.files=false.

2. Default Auto-Incrementing Application.version() Backed by Git History

  • AbstractApplication.version() Default Implementation: Applications extending AbstractApplication no longer need to manually override version().
  • Build-Time Version Generation: ApplicationVersionGenerator runs during the Maven process-classes phase to generate META-INF/tinystruct-versions.properties from Git history, providing automatic version resolution at runtime.

3. API Modernization & Deprecation Cleanup

  • JJWT 0.13.0 Codec Split: Replaced JWTCodec with JWTSerializer (extending io.jsonwebtoken.io.AbstractSerializer) and JWTDeserializer (extending io.jsonwebtoken.io.AbstractDeserializer), registered via META-INF/services/io.jsonwebtoken.io.Serializer and META-INF/services/io.jsonwebtoken.io.Deserializer.
  • Lettuce 7.9.0 Authentication: Updated DistributedRedisLock to use RedisURI.Builder.withAuthentication(...) instead of the deprecated RedisCredentialsProvider and RedisURI.setCredentialsProvider(...).

4. MCP Execution & Schema Hardening

  • Overload Binding vs. Invocation: Split MCPTool.ToolMethod into bind() and invoke() in MCPServer so runtime failures are reported directly instead of retrying other overloads.
  • Name-Based Argument Binding: Enabled -parameters in Maven compiler configuration so MCP tool arguments bind by @Argument key name regardless of declaration order.
  • Hardened Schema Validation & Access Checks: Added SchemaGenerator.stringList() so required and enum constraints are enforced for both in-memory String[] and JSON-parsed Builders schemas, restricted SchemaGenerator.generateSchema(Class) to public @Action methods while preserving Java access checks, and added MCPClient fallback in MCPTool.executeLocally().

5. Bug Fixes & Stability

  • Exception Cause Preservation: Fixed SQLiteGenerator and Watcher where e.getCause() was passed instead of e when wrapping exceptions in ApplicationException, preserving the original root cause and stack trace.

Updating to 1.7.40

Update your pom.xml dependency version:

<dependency>
    <groupId>org.tinystruct</groupId>
    <artifactId>tinystruct</artifactId>
    <version>1.7.40</version>
</dependency>