{
  "id": "msteams",
  "channels": [
    "msteams"
  ],
  "channelEnvVars": {
    "msteams": [
      "MSTEAMS_APP_ID",
      "MSTEAMS_APP_PASSWORD",
      "MSTEAMS_TENANT_ID"
    ]
  },
  "configSchema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {}
  },
  "channelConfigs": {
    "msteams": {
      "schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dangerouslyAllowNameMatching": {
            "type": "boolean"
          },
          "markdown": {
            "type": "object",
            "properties": {
              "tables": {
                "type": "string",
                "enum": [
                  "off",
                  "bullets",
                  "code",
                  "block"
                ]
              }
            },
            "additionalProperties": false
          },
          "configWrites": {
            "type": "boolean"
          },
          "appId": {
            "type": "string"
          },
          "appPassword": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "env"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Z][A-Z0-9_]{0,127}$"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "file"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "source": {
                        "type": "string",
                        "const": "exec"
                      },
                      "provider": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_-]{0,63}$"
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "source",
                      "provider",
                      "id"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            ]
          },
          "tenantId": {
            "type": "string"
          },
          "authType": {
            "type": "string",
            "enum": [
              "secret",
              "federated"
            ]
          },
          "certificatePath": {
            "type": "string"
          },
          "certificateThumbprint": {
            "type": "string"
          },
          "useManagedIdentity": {
            "type": "boolean"
          },
          "managedIdentityClientId": {
            "type": "string"
          },
          "webhook": {
            "type": "object",
            "properties": {
              "port": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "path": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "dmPolicy": {
            "default": "pairing",
            "type": "string",
            "enum": [
              "pairing",
              "allowlist",
              "open",
              "disabled"
            ]
          },
          "allowFrom": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "defaultTo": {
            "type": "string"
          },
          "groupAllowFrom": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupPolicy": {
            "default": "allowlist",
            "type": "string",
            "enum": [
              "open",
              "disabled",
              "allowlist"
            ]
          },
          "contextVisibility": {
            "type": "string",
            "enum": [
              "all",
              "allowlist",
              "allowlist_quote"
            ]
          },
          "textChunkLimit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "chunkMode": {
            "type": "string",
            "enum": [
              "length",
              "newline"
            ]
          },
          "typingIndicator": {
            "type": "boolean"
          },
          "blockStreaming": {
            "type": "boolean"
          },
          "blockStreamingCoalesce": {
            "type": "object",
            "properties": {
              "minChars": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "maxChars": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "idleMs": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "additionalProperties": false
          },
          "mediaAllowHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "mediaAuthAllowHosts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "requireMention": {
            "type": "boolean"
          },
          "historyLimit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "dmHistoryLimit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "dms": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "historyLimit": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "additionalProperties": false
            }
          },
          "replyStyle": {
            "type": "string",
            "enum": [
              "thread",
              "top-level"
            ]
          },
          "teams": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "requireMention": {
                  "type": "boolean"
                },
                "tools": {
                  "type": "object",
                  "properties": {
                    "allow": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "alsoAllow": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "deny": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "toolsBySender": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "allow": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "alsoAllow": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "deny": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "replyStyle": {
                  "type": "string",
                  "enum": [
                    "thread",
                    "top-level"
                  ]
                },
                "channels": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "requireMention": {
                        "type": "boolean"
                      },
                      "tools": {
                        "type": "object",
                        "properties": {
                          "allow": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "alsoAllow": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "deny": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      },
                      "toolsBySender": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "allow": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "alsoAllow": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            },
                            "deny": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "additionalProperties": false
                        }
                      },
                      "replyStyle": {
                        "type": "string",
                        "enum": [
                          "thread",
                          "top-level"
                        ]
                      }
                    },
                    "additionalProperties": false
                  }
                }
              },
              "additionalProperties": false
            }
          },
          "mediaMaxMb": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "sharePointSiteId": {
            "type": "string"
          },
          "heartbeat": {
            "type": "object",
            "properties": {
              "showOk": {
                "type": "boolean"
              },
              "showAlerts": {
                "type": "boolean"
              },
              "useIndicator": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "healthMonitor": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "responsePrefix": {
            "type": "string"
          },
          "welcomeCard": {
            "type": "boolean"
          },
          "promptStarters": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groupWelcomeCard": {
            "type": "boolean"
          },
          "feedbackEnabled": {
            "type": "boolean"
          },
          "feedbackReflection": {
            "type": "boolean"
          },
          "feedbackReflectionCooldownMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "delegatedAuth": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "sso": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "connectionName": {
                "type": "string"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "dmPolicy",
          "groupPolicy"
        ],
        "additionalProperties": false
      },
      "label": "Microsoft Teams",
      "description": "Teams SDK; enterprise support.",
      "uiHints": {
        "": {
          "label": "MS Teams",
          "help": "Microsoft Teams channel provider configuration and provider-specific policy toggles. Use this section to isolate Teams behavior from other enterprise chat providers."
        },
        "configWrites": {
          "label": "MS Teams Config Writes",
          "help": "Allow Microsoft Teams to write config in response to channel events/commands (default: true)."
        }
      }
    }
  }
}
