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

Method handleReject

internal/httpapi/hitl.go:147–163  ·  view source on GitHub ↗
(ctx context.Context, in *rejectInput)

Source from the content-addressed store, hash-verified

145}
146
147func (s *Server) handleReject(ctx context.Context, in *rejectInput) (*rejectOutput, error) {
148 // Account-owner action — see handleApprove. Rejecting (discarding) a held
149 // draft is part of the HITL decision, so it is also account-scope only.
150 p, err := s.requireAccountScope(ctx)
151 if err != nil {
152 return nil, err
153 }
154 ag, err := s.resolveOwnedAgent(ctx, in.Address)
155 if err != nil {
156 return nil, err
157 }
158 view, err := s.rejectHeld(ctx, p.User.ID, in.ID, ag.Email, in.Body.Reason)
159 if err != nil {
160 return nil, err
161 }
162 return &rejectOutput{Body: view}, nil
163}
164
165// rejectHeld is the shared reject dispatch (agent-path + /reviews). Caller MUST
166// have proven account scope + ownership of agentEmail. Inbound holds are dropped

Callers

nothing calls this directly

Calls 3

requireAccountScopeMethod · 0.95
resolveOwnedAgentMethod · 0.95
rejectHeldMethod · 0.95

Tested by

no test coverage detected