MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / handleGetReview

Method handleGetReview

internal/httpapi/reviews.go:138–155  ·  view source on GitHub ↗
(ctx context.Context, in *getReviewInput)

Source from the content-addressed store, hash-verified

136}
137
138func (s *Server) handleGetReview(ctx context.Context, in *getReviewInput) (*reviewDetailOutput, error) {
139 p, err := s.requireAccountScope(ctx)
140 if err != nil {
141 return nil, err
142 }
143 msg, err := s.requireOwnedReview(ctx, p.User.ID, in.ID)
144 if err != nil {
145 return nil, err
146 }
147 view := messageViewFromIdentity(msg)
148 // messageViewFromIdentity only exposes review_status for outbound (the
149 // agent /messages contract never surfaced inbound holds). A /reviews item
150 // is always a held message of EITHER direction, and its review lifecycle
151 // lives in m.Status — surface it so clients see pending_review on inbound
152 // holds too.
153 view.HITLStatus = msg.Status
154 return &reviewDetailOutput{Body: view}, nil
155}
156
157func (s *Server) handleApproveReview(ctx context.Context, in *approveReviewInput) (*approveOutput, error) {
158 p, err := s.requireAccountScope(ctx)

Callers

nothing calls this directly

Calls 3

requireAccountScopeMethod · 0.95
requireOwnedReviewMethod · 0.95
messageViewFromIdentityFunction · 0.85

Tested by

no test coverage detected