-
Notifications
You must be signed in to change notification settings - Fork 1
Add comprehensive endpoint scanning and capabilities API system #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copilot
AI
changed the title
[WIP] Add descriptors from all endpoints
Add comprehensive endpoint scanning and capabilities API system
Jul 6, 2025
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
phrocker
added a commit
that referenced
this pull request
Nov 27, 2025
…L integration (#75) * Initial plan * Add trust evaluation backend infrastructure - Created AgentTrustScoreHistory entity for storing trust scores - Created AgentTrustScoreHistoryRepository for data access - Created AgentTrustScoreService for managing trust scores - Created TrustEvaluationService in analytics agent for scheduled evaluations - Created TrustScoreApiController for REST API endpoints - Created TrustScoreViewController for UI rendering - Made TrustScoreCalculator public for analytics module access - All builds and tests passing Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com> * Add trust scores UI pages and navigation - Created trust_scores.html for viewing all agent trust scores - Created agent_trust_score.html for detailed agent trust score history - Added navigation link to sidebar for Trust Scores page - Created unit tests for AgentTrustScoreService - All tests passing, full build successful Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com> * Enhanced behavior evaluation and added comprehensive documentation - Improved AgentContext.evaluateBehavior() with granular scoring based on prior runs and incidents - Added TRUST_EVALUATION.md with complete system documentation - Documented architecture, API endpoints, configuration, and usage examples - Included troubleshooting guide and future enhancement ideas - All builds passing Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com> * Extend trust evaluation to include human users - Modified TrustEvaluationService to evaluate both agents and human users - Added SessionLogRepository to track human user session activity - Created buildHumanUserContext() to evaluate users based on session history - Renamed evaluateAllAgents() to evaluateAllAgentsAndUsers() - Added evaluateEntity() method that handles both USER and NON_PERSON_ENTITY types - Updated UI labels from "Agent Trust Scores" to "Trust Scores - Agents & Users" - Updated documentation to reflect support for human users - Human users are evaluated based on session activity (prior sessions vs prior runs) - All builds and tests passing Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com> * Add database migration for agent_trust_score_history table - Created V34__create_agent_trust_score_history.sql Flyway migration - Defines table schema with all required columns (id, agent_id, trust_score, component scores, etc.) - Creates indexes for optimal query performance on agent_id, timestamp, and evaluation_result - Fixes PostgreSQL error: "relation agent_trust_score_history does not exist" - Migration will run automatically on application startup Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: phrocker <1781585+phrocker@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a unified endpoint discovery system that scans and exposes all REST API endpoints and AI agent Verb methods across the Sentrius platform, enabling dynamic capability discovery for AI agents and Python clients.
Overview
The system provides a centralized way to discover what operations are available across all sub-projects, extracting descriptions, parameters, access limitations, and metadata from both:
@LimitAccessannotations@VerbannotationsKey Components
Data Models (
core/src/main/java/io/sentrius/sso/core/dto/capabilities/)EndpointDescriptor- Unified descriptor for both REST and Verb endpointsParameterDescriptor- Parameter information with types and sourcesAccessLimitations- Extracted@LimitAccessannotation dataEndpoint Scanning Service
EndpointScanningService- Scans classpath for both controller methods and verb methodsREST API (
/api/v1/capabilities/)GET /endpoints- All endpoints with optional filtering by type/auth requirementsGET /rest- REST endpoints onlyGET /verbs- AI agent verb methods onlyGET /refresh- Force cache refresh (requires admin access)VerbRegistry Integration
Enhanced existing
VerbRegistrywith new methods:getVerbDescriptors()- Get endpoint descriptors for all verbsgetAiCallableVerbDescriptors()- Get only AI-callable verb descriptorsExample Usage
For AI Agents
For Python Agents
Response Format
[ { "name": "listusers", "description": "Returns list of users", "type": "REST", "httpMethod": "GET", "path": "/api/v1/users/list", "accessLimitations": { "hasLimitAccess": true, "userAccess": ["CAN_VIEW_USERS"] } }, { "name": "assess_ztat_requests", "description": "Analyzes ztats requests by prompting the LLM", "type": "VERB", "requiresTokenManagement": true, "metadata": { "isAiCallable": true } } ]Features
@LimitAccessrestrictionsTesting
This enables the dynamic population of Verb annotations and makes capabilities available to Python agents as requested in the issue requirements.
Fixes #74.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
repository.jboss.org/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/Sentrius/Sentrius org.codehaus.plexus.classworlds.launcher.Launcher clean compile -DskipTests(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.