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

Function extractEmailFromWSPath

tests/contract/contract_test.go:600–609  ·  view source on GitHub ↗

extractEmailFromWSPath extracts the agent email from a WS path like v1/agents/bot@ws.test.dev/ws

(path string)

Source from the content-addressed store, hash-verified

598// extractEmailFromWSPath extracts the agent email from a WS path like
599// /v1/agents/bot@ws.test.dev/ws
600func extractEmailFromWSPath(path string) string {
601 // Path format: /v1/agents/{email}/ws (the legacy /api/v1 surface is gone).
602 parts := strings.Split(strings.Trim(path, "/"), "/")
603 for i, p := range parts {
604 if p == "agents" && i+1 < len(parts) {
605 return parts[i+1]
606 }
607 }
608 return ""
609}
610
611// ── Entry point ────────────────────────────────────────────────────
612

Callers 1

execWSConnectMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected