{
  "id": "googlechat",
  "channels": [
    "googlechat"
  ],
  "channelEnvVars": {
    "googlechat": [
      "GOOGLE_CHAT_SERVICE_ACCOUNT",
      "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE"
    ]
  },
  "configSchema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {}
  },
  "channelConfigs": {
    "googlechat": {
      "schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "configWrites": {
            "type": "boolean"
          },
          "allowBots": {
            "type": "boolean"
          },
          "dangerouslyAllowNameMatching": {
            "type": "boolean"
          },
          "requireMention": {
            "type": "boolean"
          },
          "groupPolicy": {
            "default": "allowlist",
            "type": "string",
            "enum": [
              "open",
              "disabled",
              "allowlist"
            ]
          },
          "groupAllowFrom": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          "groups": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "requireMention": {
                  "type": "boolean"
                },
                "users": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "systemPrompt": {
                  "type": "string"
                }
              },
              "additionalProperties": false
            }
          },
          "defaultTo": {
            "type": "string"
          },
          "serviceAccount": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              },
              {
                "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
                  }
                ]
              }
            ]
          },
          "serviceAccountRef": {
            "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
              }
            ]
          },
          "serviceAccountFile": {
            "type": "string"
          },
          "audienceType": {
            "type": "string",
            "enum": [
              "app-url",
              "project-number"
            ]
          },
          "audience": {
            "type": "string"
          },
          "appPrincipal": {
            "type": "string"
          },
          "webhookPath": {
            "type": "string"
          },
          "webhookUrl": {
            "type": "string"
          },
          "botUser": {
            "type": "string"
          },
          "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
            }
          },
          "textChunkLimit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "chunkMode": {
            "type": "string",
            "enum": [
              "length",
              "newline"
            ]
          },
          "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
          },
          "mediaMaxMb": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "replyToMode": {
            "anyOf": [
              {
                "type": "string",
                "const": "off"
              },
              {
                "type": "string",
                "const": "first"
              },
              {
                "type": "string",
                "const": "all"
              },
              {
                "type": "string",
                "const": "batched"
              }
            ]
          },
          "actions": {
            "type": "object",
            "properties": {
              "reactions": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "dm": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "policy": {
                "default": "pairing",
                "type": "string",
                "enum": [
                  "pairing",
                  "allowlist",
                  "open",
                  "disabled"
                ]
              },
              "allowFrom": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ]
                }
              }
            },
            "required": [
              "policy"
            ],
            "additionalProperties": false
          },
          "healthMonitor": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          },
          "typingIndicator": {
            "type": "string",
            "enum": [
              "none",
              "message",
              "reaction"
            ]
          },
          "responsePrefix": {
            "type": "string"
          },
          "accounts": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "enabled": {
                  "type": "boolean"
                },
                "configWrites": {
                  "type": "boolean"
                },
                "allowBots": {
                  "type": "boolean"
                },
                "dangerouslyAllowNameMatching": {
                  "type": "boolean"
                },
                "requireMention": {
                  "type": "boolean"
                },
                "groupPolicy": {
                  "default": "allowlist",
                  "type": "string",
                  "enum": [
                    "open",
                    "disabled",
                    "allowlist"
                  ]
                },
                "groupAllowFrom": {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  }
                },
                "groups": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "requireMention": {
                        "type": "boolean"
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "number"
                            }
                          ]
                        }
                      },
                      "systemPrompt": {
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "defaultTo": {
                  "type": "string"
                },
                "serviceAccount": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    {
                      "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
                        }
                      ]
                    }
                  ]
                },
                "serviceAccountRef": {
                  "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
                    }
                  ]
                },
                "serviceAccountFile": {
                  "type": "string"
                },
                "audienceType": {
                  "type": "string",
                  "enum": [
                    "app-url",
                    "project-number"
                  ]
                },
                "audience": {
                  "type": "string"
                },
                "appPrincipal": {
                  "type": "string"
                },
                "webhookPath": {
                  "type": "string"
                },
                "webhookUrl": {
                  "type": "string"
                },
                "botUser": {
                  "type": "string"
                },
                "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
                  }
                },
                "textChunkLimit": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "chunkMode": {
                  "type": "string",
                  "enum": [
                    "length",
                    "newline"
                  ]
                },
                "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
                },
                "mediaMaxMb": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "replyToMode": {
                  "anyOf": [
                    {
                      "type": "string",
                      "const": "off"
                    },
                    {
                      "type": "string",
                      "const": "first"
                    },
                    {
                      "type": "string",
                      "const": "all"
                    },
                    {
                      "type": "string",
                      "const": "batched"
                    }
                  ]
                },
                "actions": {
                  "type": "object",
                  "properties": {
                    "reactions": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "dm": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "policy": {
                      "default": "pairing",
                      "type": "string",
                      "enum": [
                        "pairing",
                        "allowlist",
                        "open",
                        "disabled"
                      ]
                    },
                    "allowFrom": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "number"
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "policy"
                  ],
                  "additionalProperties": false
                },
                "healthMonitor": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false
                },
                "typingIndicator": {
                  "type": "string",
                  "enum": [
                    "none",
                    "message",
                    "reaction"
                  ]
                },
                "responsePrefix": {
                  "type": "string"
                }
              },
              "required": [
                "groupPolicy"
              ],
              "additionalProperties": false
            }
          },
          "defaultAccount": {
            "type": "string"
          }
        },
        "required": [
          "groupPolicy"
        ],
        "additionalProperties": false
      },
      "label": "Google Chat",
      "description": "Google Workspace Chat app with HTTP webhook."
    }
  }
}
