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

Method reviewOwnerID

internal/agent/hitl_api.go:270–277  ·  view source on GitHub ↗

reviewOwnerID returns the agent's owner user id — the webhook routing key for an inbound review event. It equals the reviewer today (the endpoint is account-scoped + ownership-checked), so on any lookup failure we fall back to the reviewer id rather than fail the already-committed release.

(ctx context.Context, agentID, fallbackUserID string)

Source from the content-addressed store, hash-verified

268// account-scoped + ownership-checked), so on any lookup failure we fall back to
269// the reviewer id rather than fail the already-committed release.
270func (a *API) reviewOwnerID(ctx context.Context, agentID, fallbackUserID string) string {
271 ag, err := a.store.GetAgentByID(ctx, agentID)
272 if err != nil || ag == nil {
273 log.Printf("[api] review owner lookup for agent %s: %v (routing on reviewer)", agentID, err)
274 return fallbackUserID
275 }
276 return ag.UserID
277}
278
279// RejectInboundReviewCore drops a held INBOUND message (status pending_review →
280// review_rejected; it stays hidden from the agent, raw payload retained for

Callers 2

Calls 1

GetAgentByIDMethod · 0.80

Tested by

no test coverage detected