{
  "bsp": {
    "version": "0.6.5",
    "authentication": {
      "type": "apiKey",
      "scheme": "X-Api-Key",
      "in": "header",
      "docs": "https://docs.example.com/authentication"
    },
    "services": {
      "io.bsp.agents": {
        "version": "0.6.5",
        "description": "Agent management, event delivery, command observation",
        "spec": "https://behavioralstate.io/specs/agents",
        "http": {
          "endpoint": "https://your.compliant.BSP.endpoint/"
        },
        "mcp": {
          "transport": "http",
          "server": "https://mcp.example.com/mcp",
          "authentication": {
            "type": "apiKey",
            "headers": [
              { "name": "X-Api-Key",   "description": "Your API key" },
              { "name": "X-Tenant-Id", "description": "Your tenant identifier", "example": "acme" }
            ],
            "docs": "https://docs.example.com/authentication"
          }
        }
      }
    },
    "capabilities": [
      {
        "name": "io.bsp.agents.registry",
        "version": "0.6.5",
        "service": "io.bsp.agents",
        "description": "Register, remove, list agents",
        "spec": "https://behavioralstate.io/specs/agents/registry",
        "schema": "https://behavioralstate.io/v1/schemas/agents/registry.json",
        "endpoints": [
          { "method": "GET",    "path": "/services",     "description": "List all registered services" },
          { "method": "POST",   "path": "/services",     "description": "Register a new service" },
          { "method": "GET",    "path": "/services/{id}", "description": "Get service detail" },
          { "method": "DELETE", "path": "/services/{id}", "description": "Remove a service" }
        ]
      },
      {
        "name": "io.bsp.agents.lifecycle",
        "version": "0.6.5",
        "service": "io.bsp.agents",
        "description": "Pause, resume agents",
        "spec": "https://behavioralstate.io/specs/agents/lifecycle",
        "schema": "https://behavioralstate.io/v1/schemas/agents/lifecycle.json",
        "extends": "io.bsp.agents.registry",
        "endpoints": [
          { "method": "POST", "path": "/services/{id}/pause",  "description": "Pause a service" },
          { "method": "POST", "path": "/services/{id}/resume", "description": "Resume a service" }
        ]
      },
      {
        "name": "io.bsp.agents.events",
        "version": "0.6.5",
        "service": "io.bsp.agents",
        "description": "Send events to agents, list recent events",
        "spec": "https://behavioralstate.io/specs/agents/events",
        "schema": "https://behavioralstate.io/v1/schemas/agents/events.json",
        "endpoints": [
          { "method": "GET",  "path": "/events",        "description": "List domain events published by this service" },
          { "method": "GET",  "path": "/events/stream", "description": "Server-Sent Events stream of domain events" }
        ],
        "push": {
          "sse": true,
          "mcp": true,
          "webhook": true
        }
      },
      {
        "name": "io.bsp.agents.commands",
        "version": "0.6.5",
        "service": "io.bsp.agents",
        "description": "Discover command types this service accepts and send commands",
        "spec": "https://behavioralstate.io/specs/agents/commands",
        "schema": "https://behavioralstate.io/v1/schemas/agents/commands.json",
        "endpoints": [
          { "method": "GET",  "path": "/commands",                          "description": "Command catalogue — list accepted command types with schema URIs" },
          { "method": "POST", "path": "/commands",                          "description": "Command ingestion — send a CloudEvent command" },
          { "method": "GET",  "path": "/commands/{schema}/{version}",  "description": "Get a versioned command schema document" }
        ]
      }
    ],
    "agents": [
      {
        "id": "negotiation",
        "name": "Contract Negotiation",
        "description": "Ingests negotiation commands and publishes negotiation events",
        "type": "negotiation-service",
        "accepts": ["ProposeCounter", "AcceptContract", "RejectContract"],
        "produces": ["CounterProposed", "ContractAccepted", "ContractRejected"],
        "status": "running"
      },
      {
        "id": "pricing",
        "name": "Dynamic Pricing",
        "description": "Ingests pricing commands and publishes pricing events",
        "type": "pricing-engine",
        "accepts": ["AdjustPrice", "FlagAnomaly"],
        "produces": ["PriceAdjusted", "AnomalyFlagged"],
        "status": "paused"
      }
    ]
  }
}

