An Action Language for Multi-Agent Domains: Foundations