Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5x1ufsjyvu9RJFUUb
31 lines
1.6 KiB
Bash
Executable File
31 lines
1.6 KiB
Bash
Executable File
#!/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"
|