service:
  name: shenju-enterprise-search-service
  description: '基于绅聚企业资料检索的MCP服务'
  
functions:
  mcp-server:
    handler: index.handler
    runtime: nodejs16
    description: '绅聚企业资料检索MCP服务函数'
    timeout: 60
    memorySize: 512
    instanceConcurrency: 20
    environmentVariables:
      API_KEY: ${API_KEY}
      APP_ID: ${APP_ID}
      SEARCH_API_BASE_URL: https://api.enterprise-search.example.com/v1
      # 添加调试标志
      DEBUG: 'true'
    
triggers:
  http:
    authType: anonymous
    methods:
      - GET
      - POST
      - PUT
      - DELETE
      - HEAD
      - OPTIONS
    # 确保处理所有路径
    path: /*
    # 启用CORS配置
    config:
      cors:
        allowOrigin: '*'
        allowMethods: 'GET,POST,PUT,DELETE,HEAD,OPTIONS'
        allowHeaders: 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With'
        exposeHeaders: 'Content-Length,Content-Type'
        maxAge: '600'

custom:
  customDomain:
    domainName: auto 