Add tool-confirmation module: Spring AI 2.1 human-in-the-loop tool calls (requiresConfirmation, ToolCallConfirmationPolicy, ToolCallDecisions pause and resume), a server-side approval store with approver check, replay guard and audit log, and an approver page over SSE and htmx; 17 transcripts. The model is a scripted ChatModel; the htmx page was not opened in a browser. Spring Boot 4.1.3, Spring AI 2.1.0, Java 25.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5x1ufsjyvu9RJFUUb
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Writes output/15-api-surface.txt: the public API of the confirmation classes as the 2.1.0 jars
|
||||
# declare it (javap), and the two configuration properties from the autoconfigure metadata.
|
||||
# Requires the jars in ~/.m2 (run ./scripts/run-all.sh or any build once) and JDK 25 on PATH.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
M="${HOME}/.m2/repository/org/springframework/ai"
|
||||
MODEL="$M/spring-ai-model/2.1.0/spring-ai-model-2.1.0.jar"
|
||||
AUTO="$M/spring-ai-autoconfigure-model-tool/2.1.0/spring-ai-autoconfigure-model-tool-2.1.0.jar"
|
||||
OUT=output/15-api-surface.txt
|
||||
{
|
||||
echo "# Public API of the confirmation classes, from spring-ai-model-2.1.0.jar (javap -public)"
|
||||
echo
|
||||
for c in ToolCallConfirmationPolicy ToolCallConfirmationRequiredException ToolCallDecision ToolCallDecisions; do
|
||||
javap -cp "$MODEL" -public "org.springframework.ai.model.tool.$c" 2>/dev/null | grep -v '^Compiled from'
|
||||
echo
|
||||
done
|
||||
javap -cp "$MODEL" -public org.springframework.ai.tool.metadata.ToolMetadata 2>/dev/null | grep -v '^Compiled from'
|
||||
echo
|
||||
echo "# ToolCallingManager (the overload resumption uses is a default method)"
|
||||
javap -cp "$MODEL" -public org.springframework.ai.model.tool.ToolCallingManager 2>/dev/null | grep -v '^Compiled from'
|
||||
echo
|
||||
echo "# Configuration properties, from spring-ai-autoconfigure-model-tool-2.1.0.jar"
|
||||
unzip -p "$AUTO" META-INF/spring-configuration-metadata.json | python3 -c "
|
||||
import json, sys
|
||||
for p in json.load(sys.stdin)['properties']:
|
||||
if 'confirmation' in p['name']:
|
||||
print(p['name'], '| default:', p.get('defaultValue'))"
|
||||
} > "$OUT"
|
||||
cat "$OUT"
|
||||
Reference in New Issue
Block a user