feat: Agent Marketplace Review & Rating System#83
Merged
memplethee-lab merged 1 commit intoJun 24, 2026
Merged
Conversation
- Add AgentReview TypeORM entity with 5-star rating, review text, developer response, spam score, and moderation status columns - Add AgentReviewsService with: - One review per user per agent enforcement - Keyword-based spam detection with automatic FLAGGED status - Review aggregation (averageRating, distribution) for scoring engine - Developer response on reviews - Admin moderation (approve/reject/flag) with notes - Add AgentReviewsController exposing REST endpoints: POST /api/discovery/reviews GET /api/discovery/reviews/agent/:agentId GET /api/discovery/reviews/agent/:agentId/aggregation PATCH /api/discovery/reviews/:id/developer-response PATCH /api/discovery/reviews/:id/moderate (ADMIN) GET /api/discovery/reviews/moderation (ADMIN) - Register AgentReview entity and AgentReviewsModule in AppModule - getUserRatingForScoring() integrates with existing AgentScoring userRating weight (10% of composite score as per issue spec) - 10 unit tests, all passing; build compiles successfully
7 tasks
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
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.
Summary
Implements a full review and rating system for the agent discovery marketplace.
Implementation Details
New files
src/discovery/reviews/entities/agent-review.entity.ts— TypeORM entity with 5-star rating, review text, developer response, spam score, moderation statussrc/discovery/reviews/dto/review.dto.ts— Validated DTOs for create, developer response, moderation, and querysrc/discovery/reviews/agent-reviews.service.ts— Core business logicsrc/discovery/reviews/agent-reviews.controller.ts— REST API endpointssrc/discovery/reviews/agent-reviews.module.ts— NestJS modulesrc/discovery/reviews/agent-reviews.service.spec.ts— 10 unit testsFeatures implemented
hasUsedAgentflag prevents non-users from reviewingFLAGGEDgetUserRatingForScoring()feeding the existingAgentScoringuserRatingfield (10% weight)PATCH /api/discovery/reviews/:id/developer-responseGET /api/discovery/reviews/moderationwith status/agentId filter +PATCH /api/discovery/reviews/:id/moderateagentId+statuscolumns;getApprovedReviews()feeds the discovery APIAPI Endpoints
Validation Results
npm run build— ✅ webpack compiled successfullynpx jest --testPathPattern="agent-reviews"— ✅ 10/10 tests passCloses #74