// Auto-generated by scripts/generate-bundled-channel-config-metadata.ts. Do not edit directly.

export const GENERATED_BUNDLED_CHANNEL_CONFIG_METADATA = [
  {
    pluginId: "bluebubbles",
    channelId: "bluebubbles",
    label: "BlueBubbles",
    description: "iMessage via the BlueBubbles mac app + REST API.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              default: true,
              type: "boolean",
            },
            edit: {
              default: true,
              type: "boolean",
            },
            unsend: {
              default: true,
              type: "boolean",
            },
            reply: {
              default: true,
              type: "boolean",
            },
            sendWithEffect: {
              default: true,
              type: "boolean",
            },
            renameGroup: {
              default: true,
              type: "boolean",
            },
            setGroupIcon: {
              default: true,
              type: "boolean",
            },
            addParticipant: {
              default: true,
              type: "boolean",
            },
            removeParticipant: {
              default: true,
              type: "boolean",
            },
            leaveGroup: {
              default: true,
              type: "boolean",
            },
            sendAttachment: {
              default: true,
              type: "boolean",
            },
          },
          required: [
            "reactions",
            "edit",
            "unsend",
            "reply",
            "sendWithEffect",
            "renameGroup",
            "setGroupIcon",
            "addParticipant",
            "removeParticipant",
            "leaveGroup",
            "sendAttachment",
          ],
          additionalProperties: false,
        },
        serverUrl: {
          type: "string",
        },
        password: {
          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,
                },
              ],
            },
          ],
        },
        webhookPath: {
          type: "string",
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        enrichGroupParticipantsFromContacts: {
          default: true,
          type: "boolean",
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        dmHistoryLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        textChunkLimit: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        chunkMode: {
          type: "string",
          enum: ["length", "newline"],
        },
        mediaMaxMb: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        mediaLocalRoots: {
          type: "array",
          items: {
            type: "string",
          },
        },
        sendReadReceipts: {
          type: "boolean",
        },
        network: {
          type: "object",
          properties: {
            dangerouslyAllowPrivateNetwork: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        catchup: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            maxAgeMinutes: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            perRunLimit: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            firstRunLookbackMinutes: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            maxFailureRetries: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        blockStreaming: {
          type: "boolean",
        },
        groups: {
          type: "object",
          properties: {},
          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,
              },
            },
            additionalProperties: false,
          },
        },
        accounts: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    default: true,
                    type: "boolean",
                  },
                  edit: {
                    default: true,
                    type: "boolean",
                  },
                  unsend: {
                    default: true,
                    type: "boolean",
                  },
                  reply: {
                    default: true,
                    type: "boolean",
                  },
                  sendWithEffect: {
                    default: true,
                    type: "boolean",
                  },
                  renameGroup: {
                    default: true,
                    type: "boolean",
                  },
                  setGroupIcon: {
                    default: true,
                    type: "boolean",
                  },
                  addParticipant: {
                    default: true,
                    type: "boolean",
                  },
                  removeParticipant: {
                    default: true,
                    type: "boolean",
                  },
                  leaveGroup: {
                    default: true,
                    type: "boolean",
                  },
                  sendAttachment: {
                    default: true,
                    type: "boolean",
                  },
                },
                required: [
                  "reactions",
                  "edit",
                  "unsend",
                  "reply",
                  "sendWithEffect",
                  "renameGroup",
                  "setGroupIcon",
                  "addParticipant",
                  "removeParticipant",
                  "leaveGroup",
                  "sendAttachment",
                ],
                additionalProperties: false,
              },
              serverUrl: {
                type: "string",
              },
              password: {
                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,
                      },
                    ],
                  },
                ],
              },
              webhookPath: {
                type: "string",
              },
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              enrichGroupParticipantsFromContacts: {
                default: true,
                type: "boolean",
              },
              historyLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              dmHistoryLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              textChunkLimit: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              chunkMode: {
                type: "string",
                enum: ["length", "newline"],
              },
              mediaMaxMb: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              mediaLocalRoots: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              sendReadReceipts: {
                type: "boolean",
              },
              network: {
                type: "object",
                properties: {
                  dangerouslyAllowPrivateNetwork: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              catchup: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  maxAgeMinutes: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  perRunLimit: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  firstRunLookbackMinutes: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxFailureRetries: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                },
                additionalProperties: false,
              },
              blockStreaming: {
                type: "boolean",
              },
              groups: {
                type: "object",
                properties: {},
                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,
                    },
                  },
                  additionalProperties: false,
                },
              },
            },
            required: ["enrichGroupParticipantsFromContacts"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["enrichGroupParticipantsFromContacts"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "BlueBubbles",
        help: "BlueBubbles channel provider configuration used for Apple messaging bridge integrations. Keep DM policy aligned with your trusted sender model in shared deployments.",
      },
      dmPolicy: {
        label: "BlueBubbles DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.bluebubbles.allowFrom=["*"].',
      },
    },
  },
  {
    pluginId: "discord",
    channelId: "discord",
    label: "Discord",
    description: "very well supported right now.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        commands: {
          type: "object",
          properties: {
            native: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
            nativeSkills: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
          },
          additionalProperties: false,
        },
        configWrites: {
          type: "boolean",
        },
        token: {
          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,
                },
              ],
            },
          ],
        },
        proxy: {
          type: "string",
        },
        allowBots: {
          anyOf: [
            {
              type: "boolean",
            },
            {
              type: "string",
              const: "mentions",
            },
          ],
        },
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
        },
        streaming: {
          type: "object",
          properties: {
            mode: {
              type: "string",
              enum: ["off", "partial", "block", "progress"],
            },
            chunkMode: {
              type: "string",
              enum: ["length", "newline"],
            },
            preview: {
              type: "object",
              properties: {
                chunk: {
                  type: "object",
                  properties: {
                    minChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    maxChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    breakPreference: {
                      anyOf: [
                        {
                          type: "string",
                          const: "paragraph",
                        },
                        {
                          type: "string",
                          const: "newline",
                        },
                        {
                          type: "string",
                          const: "sentence",
                        },
                      ],
                    },
                  },
                  additionalProperties: false,
                },
              },
              additionalProperties: false,
            },
            block: {
              type: "object",
              properties: {
                enabled: {
                  type: "boolean",
                },
                coalesce: {
                  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,
                },
              },
              additionalProperties: false,
            },
          },
          additionalProperties: false,
        },
        maxLinesPerMessage: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        retry: {
          type: "object",
          properties: {
            attempts: {
              type: "integer",
              minimum: 1,
              maximum: 9007199254740991,
            },
            minDelayMs: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            maxDelayMs: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            jitter: {
              type: "number",
              minimum: 0,
              maximum: 1,
            },
          },
          additionalProperties: false,
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
            stickers: {
              type: "boolean",
            },
            emojiUploads: {
              type: "boolean",
            },
            stickerUploads: {
              type: "boolean",
            },
            polls: {
              type: "boolean",
            },
            permissions: {
              type: "boolean",
            },
            messages: {
              type: "boolean",
            },
            threads: {
              type: "boolean",
            },
            pins: {
              type: "boolean",
            },
            search: {
              type: "boolean",
            },
            memberInfo: {
              type: "boolean",
            },
            roleInfo: {
              type: "boolean",
            },
            roles: {
              type: "boolean",
            },
            channelInfo: {
              type: "boolean",
            },
            voiceStatus: {
              type: "boolean",
            },
            events: {
              type: "boolean",
            },
            moderation: {
              type: "boolean",
            },
            channels: {
              type: "boolean",
            },
            presence: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        replyToMode: {
          anyOf: [
            {
              type: "string",
              const: "off",
            },
            {
              type: "string",
              const: "first",
            },
            {
              type: "string",
              const: "all",
            },
            {
              type: "string",
              const: "batched",
            },
          ],
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            type: "string",
          },
        },
        defaultTo: {
          type: "string",
        },
        dm: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            policy: {
              type: "string",
              enum: ["pairing", "allowlist", "open", "disabled"],
            },
            allowFrom: {
              type: "array",
              items: {
                type: "string",
              },
            },
            groupEnabled: {
              type: "boolean",
            },
            groupChannels: {
              type: "array",
              items: {
                type: "string",
              },
            },
          },
          additionalProperties: false,
        },
        guilds: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              slug: {
                type: "string",
              },
              requireMention: {
                type: "boolean",
              },
              ignoreOtherMentions: {
                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,
                },
              },
              reactionNotifications: {
                type: "string",
                enum: ["off", "own", "all", "allowlist"],
              },
              users: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              roles: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              channels: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    ignoreOtherMentions: {
                      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,
                      },
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    users: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    roles: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    includeThreadStarter: {
                      type: "boolean",
                    },
                    autoThread: {
                      type: "boolean",
                    },
                    autoThreadName: {
                      type: "string",
                      enum: ["message", "generated"],
                    },
                    autoArchiveDuration: {
                      anyOf: [
                        {
                          type: "string",
                          enum: ["60", "1440", "4320", "10080"],
                        },
                        {
                          type: "number",
                          const: 60,
                        },
                        {
                          type: "number",
                          const: 1440,
                        },
                        {
                          type: "number",
                          const: 4320,
                        },
                        {
                          type: "number",
                          const: 10080,
                        },
                      ],
                    },
                  },
                  additionalProperties: false,
                },
              },
            },
            additionalProperties: false,
          },
        },
        heartbeat: {
          type: "object",
          properties: {
            showOk: {
              type: "boolean",
            },
            showAlerts: {
              type: "boolean",
            },
            useIndicator: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        healthMonitor: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        execApprovals: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            approvers: {
              type: "array",
              items: {
                type: "string",
              },
            },
            agentFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            sessionFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            cleanupAfterResolve: {
              type: "boolean",
            },
            target: {
              type: "string",
              enum: ["dm", "channel", "both"],
            },
          },
          additionalProperties: false,
        },
        agentComponents: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        ui: {
          type: "object",
          properties: {
            components: {
              type: "object",
              properties: {
                accentColor: {
                  type: "string",
                  pattern: "^#?[0-9a-fA-F]{6}$",
                },
              },
              additionalProperties: false,
            },
          },
          additionalProperties: false,
        },
        slashCommand: {
          type: "object",
          properties: {
            ephemeral: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        threadBindings: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            idleHours: {
              type: "number",
              minimum: 0,
            },
            maxAgeHours: {
              type: "number",
              minimum: 0,
            },
            spawnSubagentSessions: {
              type: "boolean",
            },
            spawnAcpSessions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        intents: {
          type: "object",
          properties: {
            presence: {
              type: "boolean",
            },
            guildMembers: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        voice: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            autoJoin: {
              type: "array",
              items: {
                type: "object",
                properties: {
                  guildId: {
                    type: "string",
                    minLength: 1,
                  },
                  channelId: {
                    type: "string",
                    minLength: 1,
                  },
                },
                required: ["guildId", "channelId"],
                additionalProperties: false,
              },
            },
            daveEncryption: {
              type: "boolean",
            },
            decryptionFailureTolerance: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            tts: {
              type: "object",
              properties: {
                auto: {
                  type: "string",
                  enum: ["off", "always", "inbound", "tagged"],
                },
                enabled: {
                  type: "boolean",
                },
                mode: {
                  type: "string",
                  enum: ["final", "all"],
                },
                provider: {
                  type: "string",
                  minLength: 1,
                },
                summaryModel: {
                  type: "string",
                },
                modelOverrides: {
                  type: "object",
                  properties: {
                    enabled: {
                      type: "boolean",
                    },
                    allowText: {
                      type: "boolean",
                    },
                    allowProvider: {
                      type: "boolean",
                    },
                    allowVoice: {
                      type: "boolean",
                    },
                    allowModelId: {
                      type: "boolean",
                    },
                    allowVoiceSettings: {
                      type: "boolean",
                    },
                    allowNormalization: {
                      type: "boolean",
                    },
                    allowSeed: {
                      type: "boolean",
                    },
                  },
                  additionalProperties: false,
                },
                providers: {
                  type: "object",
                  propertyNames: {
                    type: "string",
                  },
                  additionalProperties: {
                    type: "object",
                    properties: {
                      apiKey: {
                        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,
                              },
                            ],
                          },
                        ],
                      },
                    },
                    additionalProperties: {
                      anyOf: [
                        {
                          type: "string",
                        },
                        {
                          type: "number",
                        },
                        {
                          type: "boolean",
                        },
                        {
                          type: "null",
                        },
                        {
                          type: "array",
                          items: {},
                        },
                        {
                          type: "object",
                          propertyNames: {
                            type: "string",
                          },
                          additionalProperties: {},
                        },
                      ],
                    },
                  },
                },
                prefsPath: {
                  type: "string",
                },
                maxTextLength: {
                  type: "integer",
                  minimum: 1,
                  maximum: 9007199254740991,
                },
                timeoutMs: {
                  type: "integer",
                  minimum: 1000,
                  maximum: 120000,
                },
              },
              additionalProperties: false,
            },
          },
          additionalProperties: false,
        },
        pluralkit: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            token: {
              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,
                    },
                  ],
                },
              ],
            },
          },
          additionalProperties: false,
        },
        responsePrefix: {
          type: "string",
        },
        ackReaction: {
          type: "string",
        },
        ackReactionScope: {
          type: "string",
          enum: ["group-mentions", "group-all", "direct", "all", "off", "none"],
        },
        activity: {
          type: "string",
        },
        status: {
          type: "string",
          enum: ["online", "dnd", "idle", "invisible"],
        },
        autoPresence: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            intervalMs: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            minUpdateIntervalMs: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            healthyText: {
              type: "string",
            },
            degradedText: {
              type: "string",
            },
            exhaustedText: {
              type: "string",
            },
          },
          additionalProperties: false,
        },
        activityType: {
          anyOf: [
            {
              type: "number",
              const: 0,
            },
            {
              type: "number",
              const: 1,
            },
            {
              type: "number",
              const: 2,
            },
            {
              type: "number",
              const: 3,
            },
            {
              type: "number",
              const: 4,
            },
            {
              type: "number",
              const: 5,
            },
          ],
        },
        activityUrl: {
          type: "string",
          format: "uri",
        },
        inboundWorker: {
          type: "object",
          properties: {
            runTimeoutMs: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        eventQueue: {
          type: "object",
          properties: {
            listenerTimeout: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            maxQueueSize: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            maxConcurrency: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              commands: {
                type: "object",
                properties: {
                  native: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                  nativeSkills: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              configWrites: {
                type: "boolean",
              },
              token: {
                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,
                      },
                    ],
                  },
                ],
              },
              proxy: {
                type: "string",
              },
              allowBots: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "string",
                    const: "mentions",
                  },
                ],
              },
              dangerouslyAllowNameMatching: {
                type: "boolean",
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
              },
              streaming: {
                type: "object",
                properties: {
                  mode: {
                    type: "string",
                    enum: ["off", "partial", "block", "progress"],
                  },
                  chunkMode: {
                    type: "string",
                    enum: ["length", "newline"],
                  },
                  preview: {
                    type: "object",
                    properties: {
                      chunk: {
                        type: "object",
                        properties: {
                          minChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          maxChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          breakPreference: {
                            anyOf: [
                              {
                                type: "string",
                                const: "paragraph",
                              },
                              {
                                type: "string",
                                const: "newline",
                              },
                              {
                                type: "string",
                                const: "sentence",
                              },
                            ],
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                    additionalProperties: false,
                  },
                  block: {
                    type: "object",
                    properties: {
                      enabled: {
                        type: "boolean",
                      },
                      coalesce: {
                        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,
                      },
                    },
                    additionalProperties: false,
                  },
                },
                additionalProperties: false,
              },
              maxLinesPerMessage: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
              retry: {
                type: "object",
                properties: {
                  attempts: {
                    type: "integer",
                    minimum: 1,
                    maximum: 9007199254740991,
                  },
                  minDelayMs: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxDelayMs: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  jitter: {
                    type: "number",
                    minimum: 0,
                    maximum: 1,
                  },
                },
                additionalProperties: false,
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                  stickers: {
                    type: "boolean",
                  },
                  emojiUploads: {
                    type: "boolean",
                  },
                  stickerUploads: {
                    type: "boolean",
                  },
                  polls: {
                    type: "boolean",
                  },
                  permissions: {
                    type: "boolean",
                  },
                  messages: {
                    type: "boolean",
                  },
                  threads: {
                    type: "boolean",
                  },
                  pins: {
                    type: "boolean",
                  },
                  search: {
                    type: "boolean",
                  },
                  memberInfo: {
                    type: "boolean",
                  },
                  roleInfo: {
                    type: "boolean",
                  },
                  roles: {
                    type: "boolean",
                  },
                  channelInfo: {
                    type: "boolean",
                  },
                  voiceStatus: {
                    type: "boolean",
                  },
                  events: {
                    type: "boolean",
                  },
                  moderation: {
                    type: "boolean",
                  },
                  channels: {
                    type: "boolean",
                  },
                  presence: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              replyToMode: {
                anyOf: [
                  {
                    type: "string",
                    const: "off",
                  },
                  {
                    type: "string",
                    const: "first",
                  },
                  {
                    type: "string",
                    const: "all",
                  },
                  {
                    type: "string",
                    const: "batched",
                  },
                ],
              },
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              defaultTo: {
                type: "string",
              },
              dm: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  policy: {
                    type: "string",
                    enum: ["pairing", "allowlist", "open", "disabled"],
                  },
                  allowFrom: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  groupEnabled: {
                    type: "boolean",
                  },
                  groupChannels: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                },
                additionalProperties: false,
              },
              guilds: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    slug: {
                      type: "string",
                    },
                    requireMention: {
                      type: "boolean",
                    },
                    ignoreOtherMentions: {
                      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,
                      },
                    },
                    reactionNotifications: {
                      type: "string",
                      enum: ["off", "own", "all", "allowlist"],
                    },
                    users: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    roles: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    channels: {
                      type: "object",
                      propertyNames: {
                        type: "string",
                      },
                      additionalProperties: {
                        type: "object",
                        properties: {
                          requireMention: {
                            type: "boolean",
                          },
                          ignoreOtherMentions: {
                            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,
                            },
                          },
                          skills: {
                            type: "array",
                            items: {
                              type: "string",
                            },
                          },
                          enabled: {
                            type: "boolean",
                          },
                          users: {
                            type: "array",
                            items: {
                              type: "string",
                            },
                          },
                          roles: {
                            type: "array",
                            items: {
                              type: "string",
                            },
                          },
                          systemPrompt: {
                            type: "string",
                          },
                          includeThreadStarter: {
                            type: "boolean",
                          },
                          autoThread: {
                            type: "boolean",
                          },
                          autoThreadName: {
                            type: "string",
                            enum: ["message", "generated"],
                          },
                          autoArchiveDuration: {
                            anyOf: [
                              {
                                type: "string",
                                enum: ["60", "1440", "4320", "10080"],
                              },
                              {
                                type: "number",
                                const: 60,
                              },
                              {
                                type: "number",
                                const: 1440,
                              },
                              {
                                type: "number",
                                const: 4320,
                              },
                              {
                                type: "number",
                                const: 10080,
                              },
                            ],
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                  },
                  additionalProperties: false,
                },
              },
              heartbeat: {
                type: "object",
                properties: {
                  showOk: {
                    type: "boolean",
                  },
                  showAlerts: {
                    type: "boolean",
                  },
                  useIndicator: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              healthMonitor: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              execApprovals: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  approvers: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  agentFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  sessionFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  cleanupAfterResolve: {
                    type: "boolean",
                  },
                  target: {
                    type: "string",
                    enum: ["dm", "channel", "both"],
                  },
                },
                additionalProperties: false,
              },
              agentComponents: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              ui: {
                type: "object",
                properties: {
                  components: {
                    type: "object",
                    properties: {
                      accentColor: {
                        type: "string",
                        pattern: "^#?[0-9a-fA-F]{6}$",
                      },
                    },
                    additionalProperties: false,
                  },
                },
                additionalProperties: false,
              },
              slashCommand: {
                type: "object",
                properties: {
                  ephemeral: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              threadBindings: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  idleHours: {
                    type: "number",
                    minimum: 0,
                  },
                  maxAgeHours: {
                    type: "number",
                    minimum: 0,
                  },
                  spawnSubagentSessions: {
                    type: "boolean",
                  },
                  spawnAcpSessions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              intents: {
                type: "object",
                properties: {
                  presence: {
                    type: "boolean",
                  },
                  guildMembers: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              voice: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  autoJoin: {
                    type: "array",
                    items: {
                      type: "object",
                      properties: {
                        guildId: {
                          type: "string",
                          minLength: 1,
                        },
                        channelId: {
                          type: "string",
                          minLength: 1,
                        },
                      },
                      required: ["guildId", "channelId"],
                      additionalProperties: false,
                    },
                  },
                  daveEncryption: {
                    type: "boolean",
                  },
                  decryptionFailureTolerance: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  tts: {
                    type: "object",
                    properties: {
                      auto: {
                        type: "string",
                        enum: ["off", "always", "inbound", "tagged"],
                      },
                      enabled: {
                        type: "boolean",
                      },
                      mode: {
                        type: "string",
                        enum: ["final", "all"],
                      },
                      provider: {
                        type: "string",
                        minLength: 1,
                      },
                      summaryModel: {
                        type: "string",
                      },
                      modelOverrides: {
                        type: "object",
                        properties: {
                          enabled: {
                            type: "boolean",
                          },
                          allowText: {
                            type: "boolean",
                          },
                          allowProvider: {
                            type: "boolean",
                          },
                          allowVoice: {
                            type: "boolean",
                          },
                          allowModelId: {
                            type: "boolean",
                          },
                          allowVoiceSettings: {
                            type: "boolean",
                          },
                          allowNormalization: {
                            type: "boolean",
                          },
                          allowSeed: {
                            type: "boolean",
                          },
                        },
                        additionalProperties: false,
                      },
                      providers: {
                        type: "object",
                        propertyNames: {
                          type: "string",
                        },
                        additionalProperties: {
                          type: "object",
                          properties: {
                            apiKey: {
                              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,
                                    },
                                  ],
                                },
                              ],
                            },
                          },
                          additionalProperties: {
                            anyOf: [
                              {
                                type: "string",
                              },
                              {
                                type: "number",
                              },
                              {
                                type: "boolean",
                              },
                              {
                                type: "null",
                              },
                              {
                                type: "array",
                                items: {},
                              },
                              {
                                type: "object",
                                propertyNames: {
                                  type: "string",
                                },
                                additionalProperties: {},
                              },
                            ],
                          },
                        },
                      },
                      prefsPath: {
                        type: "string",
                      },
                      maxTextLength: {
                        type: "integer",
                        minimum: 1,
                        maximum: 9007199254740991,
                      },
                      timeoutMs: {
                        type: "integer",
                        minimum: 1000,
                        maximum: 120000,
                      },
                    },
                    additionalProperties: false,
                  },
                },
                additionalProperties: false,
              },
              pluralkit: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  token: {
                    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,
                          },
                        ],
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              responsePrefix: {
                type: "string",
              },
              ackReaction: {
                type: "string",
              },
              ackReactionScope: {
                type: "string",
                enum: ["group-mentions", "group-all", "direct", "all", "off", "none"],
              },
              activity: {
                type: "string",
              },
              status: {
                type: "string",
                enum: ["online", "dnd", "idle", "invisible"],
              },
              autoPresence: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  intervalMs: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  minUpdateIntervalMs: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  healthyText: {
                    type: "string",
                  },
                  degradedText: {
                    type: "string",
                  },
                  exhaustedText: {
                    type: "string",
                  },
                },
                additionalProperties: false,
              },
              activityType: {
                anyOf: [
                  {
                    type: "number",
                    const: 0,
                  },
                  {
                    type: "number",
                    const: 1,
                  },
                  {
                    type: "number",
                    const: 2,
                  },
                  {
                    type: "number",
                    const: 3,
                  },
                  {
                    type: "number",
                    const: 4,
                  },
                  {
                    type: "number",
                    const: 5,
                  },
                ],
              },
              activityUrl: {
                type: "string",
                format: "uri",
              },
              inboundWorker: {
                type: "object",
                properties: {
                  runTimeoutMs: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                },
                additionalProperties: false,
              },
              eventQueue: {
                type: "object",
                properties: {
                  listenerTimeout: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxQueueSize: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxConcurrency: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                },
                additionalProperties: false,
              },
            },
            required: ["groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "Discord",
        help: "Discord channel provider configuration for bot auth, retry policy, streaming, thread bindings, and optional voice capabilities. Keep privileged intents and advanced features disabled unless needed.",
      },
      dmPolicy: {
        label: "Discord DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.discord.allowFrom=["*"].',
      },
      "dm.policy": {
        label: "Discord DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.discord.allowFrom=["*"] (legacy: channels.discord.dm.allowFrom).',
      },
      configWrites: {
        label: "Discord Config Writes",
        help: "Allow Discord to write config in response to channel events/commands (default: true).",
      },
      proxy: {
        label: "Discord Proxy URL",
        help: "Proxy URL for Discord gateway + API requests (app-id lookup and allowlist resolution). Set per account via channels.discord.accounts.<id>.proxy.",
      },
      "commands.native": {
        label: "Discord Native Commands",
        help: 'Override native commands for Discord (bool or "auto").',
      },
      "commands.nativeSkills": {
        label: "Discord Native Skill Commands",
        help: 'Override native skill commands for Discord (bool or "auto").',
      },
      streaming: {
        label: "Discord Streaming Mode",
        help: 'Unified Discord stream preview mode: "off" | "partial" | "block" | "progress". "progress" maps to "partial" on Discord. Legacy boolean/streamMode keys are auto-mapped.',
      },
      "streaming.mode": {
        label: "Discord Streaming Mode",
        help: 'Canonical Discord preview mode: "off" | "partial" | "block" | "progress". "progress" maps to "partial" on Discord.',
      },
      "streaming.chunkMode": {
        label: "Discord Chunk Mode",
        help: 'Chunking mode for outbound Discord text delivery: "length" (default) or "newline".',
      },
      "streaming.block.enabled": {
        label: "Discord Block Streaming Enabled",
        help: 'Enable chunked block-style Discord preview delivery when channels.discord.streaming.mode="block".',
      },
      "streaming.block.coalesce": {
        label: "Discord Block Streaming Coalesce",
        help: "Merge streamed Discord block replies before final delivery.",
      },
      "streaming.preview.chunk.minChars": {
        label: "Discord Draft Chunk Min Chars",
        help: 'Minimum chars before emitting a Discord stream preview update when channels.discord.streaming.mode="block" (default: 200).',
      },
      "streaming.preview.chunk.maxChars": {
        label: "Discord Draft Chunk Max Chars",
        help: 'Target max size for a Discord stream preview chunk when channels.discord.streaming.mode="block" (default: 800; clamped to channels.discord.textChunkLimit).',
      },
      "streaming.preview.chunk.breakPreference": {
        label: "Discord Draft Chunk Break Preference",
        help: "Preferred breakpoints for Discord draft chunks (paragraph | newline | sentence). Default: paragraph.",
      },
      "retry.attempts": {
        label: "Discord Retry Attempts",
        help: "Max retry attempts for outbound Discord API calls (default: 3).",
      },
      "retry.minDelayMs": {
        label: "Discord Retry Min Delay (ms)",
        help: "Minimum retry delay in ms for Discord outbound calls.",
      },
      "retry.maxDelayMs": {
        label: "Discord Retry Max Delay (ms)",
        help: "Maximum retry delay cap in ms for Discord outbound calls.",
      },
      "retry.jitter": {
        label: "Discord Retry Jitter",
        help: "Jitter factor (0-1) applied to Discord retry delays.",
      },
      maxLinesPerMessage: {
        label: "Discord Max Lines Per Message",
        help: "Soft max line count per Discord message (default: 17).",
      },
      "inboundWorker.runTimeoutMs": {
        label: "Discord Inbound Worker Timeout (ms)",
        help: "Optional queued Discord inbound worker timeout in ms. This is separate from Carbon listener timeouts; defaults to 1800000 and can be disabled with 0. Set per account via channels.discord.accounts.<id>.inboundWorker.runTimeoutMs.",
      },
      "eventQueue.listenerTimeout": {
        label: "Discord EventQueue Listener Timeout (ms)",
        help: "Canonical Discord listener timeout control in ms for gateway normalization/enqueue handlers. Default is 120000 in OpenClaw; set per account via channels.discord.accounts.<id>.eventQueue.listenerTimeout.",
      },
      "eventQueue.maxQueueSize": {
        label: "Discord EventQueue Max Queue Size",
        help: "Optional Discord EventQueue capacity override (max queued events before backpressure). Set per account via channels.discord.accounts.<id>.eventQueue.maxQueueSize.",
      },
      "eventQueue.maxConcurrency": {
        label: "Discord EventQueue Max Concurrency",
        help: "Optional Discord EventQueue concurrency override (max concurrent handler executions). Set per account via channels.discord.accounts.<id>.eventQueue.maxConcurrency.",
      },
      "threadBindings.enabled": {
        label: "Discord Thread Binding Enabled",
        help: "Enable Discord thread binding features (/focus, bound-thread routing/delivery, and thread-bound subagent sessions). Overrides session.threadBindings.enabled when set.",
      },
      "threadBindings.idleHours": {
        label: "Discord Thread Binding Idle Timeout (hours)",
        help: "Inactivity window in hours for Discord thread-bound sessions (/focus and spawned thread sessions). Set 0 to disable idle auto-unfocus (default: 24). Overrides session.threadBindings.idleHours when set.",
      },
      "threadBindings.maxAgeHours": {
        label: "Discord Thread Binding Max Age (hours)",
        help: "Optional hard max age in hours for Discord thread-bound sessions. Set 0 to disable hard cap (default: 0). Overrides session.threadBindings.maxAgeHours when set.",
      },
      "threadBindings.spawnSubagentSessions": {
        label: "Discord Thread-Bound Subagent Spawn",
        help: "Allow subagent spawns with thread=true to auto-create and bind Discord threads (default: false; opt-in). Set true to enable thread-bound subagent spawns for this account/channel.",
      },
      "threadBindings.spawnAcpSessions": {
        label: "Discord Thread-Bound ACP Spawn",
        help: "Allow /acp spawn to auto-create and bind Discord threads for ACP sessions (default: false; opt-in). Set true to enable thread-bound ACP spawns for this account/channel.",
      },
      "ui.components.accentColor": {
        label: "Discord Component Accent Color",
        help: "Accent color for Discord component containers (hex). Set per account via channels.discord.accounts.<id>.ui.components.accentColor.",
      },
      "intents.presence": {
        label: "Discord Presence Intent",
        help: "Enable the Guild Presences privileged intent. Must also be enabled in the Discord Developer Portal. Allows tracking user activities (e.g. Spotify). Default: false.",
      },
      "intents.guildMembers": {
        label: "Discord Guild Members Intent",
        help: "Enable the Guild Members privileged intent. Must also be enabled in the Discord Developer Portal. Default: false.",
      },
      "voice.enabled": {
        label: "Discord Voice Enabled",
        help: "Enable Discord voice channel conversations (default: true). Omit channels.discord.voice to keep voice support disabled for the account.",
      },
      "voice.autoJoin": {
        label: "Discord Voice Auto-Join",
        help: "Voice channels to auto-join on startup (list of guildId/channelId entries).",
      },
      "voice.daveEncryption": {
        label: "Discord Voice DAVE Encryption",
        help: "Toggle DAVE end-to-end encryption for Discord voice joins (default: true in @discordjs/voice; Discord may require this).",
      },
      "voice.decryptionFailureTolerance": {
        label: "Discord Voice Decrypt Failure Tolerance",
        help: "Consecutive decrypt failures before DAVE attempts session recovery (passed to @discordjs/voice; default: 24).",
      },
      "voice.tts": {
        label: "Discord Voice Text-to-Speech",
        help: "Optional TTS overrides for Discord voice playback (merged with messages.tts).",
      },
      "pluralkit.enabled": {
        label: "Discord PluralKit Enabled",
        help: "Resolve PluralKit proxied messages and treat system members as distinct senders.",
      },
      "pluralkit.token": {
        label: "Discord PluralKit Token",
        help: "Optional PluralKit token for resolving private systems or members.",
      },
      activity: {
        label: "Discord Presence Activity",
        help: "Discord presence activity text (defaults to custom status).",
      },
      status: {
        label: "Discord Presence Status",
        help: "Discord presence status (online, dnd, idle, invisible).",
      },
      "autoPresence.enabled": {
        label: "Discord Auto Presence Enabled",
        help: "Enable automatic Discord bot presence updates based on runtime/model availability signals. When enabled: healthy=>online, degraded/unknown=>idle, exhausted/unavailable=>dnd.",
      },
      "autoPresence.intervalMs": {
        label: "Discord Auto Presence Check Interval (ms)",
        help: "How often to evaluate Discord auto-presence state in milliseconds (default: 30000).",
      },
      "autoPresence.minUpdateIntervalMs": {
        label: "Discord Auto Presence Min Update Interval (ms)",
        help: "Minimum time between actual Discord presence update calls in milliseconds (default: 15000). Prevents status spam on noisy state changes.",
      },
      "autoPresence.healthyText": {
        label: "Discord Auto Presence Healthy Text",
        help: "Optional custom status text while runtime is healthy (online). If omitted, falls back to static channels.discord.activity when set.",
      },
      "autoPresence.degradedText": {
        label: "Discord Auto Presence Degraded Text",
        help: "Optional custom status text while runtime/model availability is degraded or unknown (idle).",
      },
      "autoPresence.exhaustedText": {
        label: "Discord Auto Presence Exhausted Text",
        help: "Optional custom status text while runtime detects exhausted/unavailable model quota (dnd). Supports {reason} template placeholder.",
      },
      activityType: {
        label: "Discord Presence Activity Type",
        help: "Discord presence activity type (0=Playing,1=Streaming,2=Listening,3=Watching,4=Custom,5=Competing).",
      },
      activityUrl: {
        label: "Discord Presence Activity URL",
        help: "Discord presence streaming URL (required for activityType=1).",
      },
      allowBots: {
        label: "Discord Allow Bot Messages",
        help: 'Allow bot-authored messages to trigger Discord replies (default: false). Set "mentions" to only accept bot messages that mention the bot.',
      },
      token: {
        label: "Discord Bot Token",
        help: "Discord bot token used for gateway and REST API authentication for this provider account. Keep this secret out of committed config and rotate immediately after any leak.",
        sensitive: true,
      },
    },
    unsupportedSecretRefSurfacePatterns: [
      "channels.discord.accounts.*.threadBindings.webhookToken",
      "channels.discord.threadBindings.webhookToken",
    ],
  },
  {
    pluginId: "feishu",
    channelId: "feishu",
    label: "Feishu",
    description: "飞书/Lark enterprise messaging with doc/wiki/drive tools.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        enabled: {
          type: "boolean",
        },
        defaultAccount: {
          type: "string",
        },
        appId: {
          type: "string",
        },
        appSecret: {
          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,
                },
              ],
            },
          ],
        },
        encryptKey: {
          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,
                },
              ],
            },
          ],
        },
        verificationToken: {
          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,
                },
              ],
            },
          ],
        },
        domain: {
          default: "feishu",
          anyOf: [
            {
              type: "string",
              enum: ["feishu", "lark"],
            },
            {
              type: "string",
              format: "uri",
              pattern: "^https:\\/\\/.*",
            },
          ],
        },
        connectionMode: {
          default: "websocket",
          type: "string",
          enum: ["websocket", "webhook"],
        },
        webhookPath: {
          default: "/feishu/events",
          type: "string",
        },
        webhookHost: {
          type: "string",
        },
        webhookPort: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            mode: {
              type: "string",
              enum: ["native", "escape", "strip"],
            },
            tableMode: {
              type: "string",
              enum: ["native", "ascii", "simple"],
            },
          },
          additionalProperties: false,
        },
        configWrites: {
          type: "boolean",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["open", "pairing", "allowlist"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          anyOf: [
            {
              type: "string",
              enum: ["open", "allowlist", "disabled"],
            },
            {},
          ],
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupSenderAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        requireMention: {
          type: "boolean",
        },
        groups: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              requireMention: {
                type: "boolean",
              },
              tools: {
                type: "object",
                properties: {
                  allow: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  deny: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                },
                additionalProperties: false,
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              systemPrompt: {
                type: "string",
              },
              groupSessionScope: {
                type: "string",
                enum: ["group", "group_sender", "group_topic", "group_topic_sender"],
              },
              topicSessionMode: {
                type: "string",
                enum: ["disabled", "enabled"],
              },
              replyInThread: {
                type: "string",
                enum: ["disabled", "enabled"],
              },
            },
            additionalProperties: false,
          },
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        dmHistoryLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        dms: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        textChunkLimit: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        chunkMode: {
          type: "string",
          enum: ["length", "newline"],
        },
        blockStreamingCoalesce: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            minDelayMs: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
            maxDelayMs: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        httpTimeoutMs: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 300000,
        },
        heartbeat: {
          type: "object",
          properties: {
            visibility: {
              type: "string",
              enum: ["visible", "hidden"],
            },
            intervalMs: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        renderMode: {
          type: "string",
          enum: ["auto", "raw", "card"],
        },
        streaming: {
          type: "boolean",
        },
        tools: {
          type: "object",
          properties: {
            doc: {
              type: "boolean",
            },
            chat: {
              type: "boolean",
            },
            wiki: {
              type: "boolean",
            },
            drive: {
              type: "boolean",
            },
            perm: {
              type: "boolean",
            },
            scopes: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        replyInThread: {
          type: "string",
          enum: ["disabled", "enabled"],
        },
        reactionNotifications: {
          default: "own",
          type: "string",
          enum: ["off", "own", "all"],
        },
        typingIndicator: {
          default: true,
          type: "boolean",
        },
        resolveSenderNames: {
          default: true,
          type: "boolean",
        },
        groupSessionScope: {
          type: "string",
          enum: ["group", "group_sender", "group_topic", "group_topic_sender"],
        },
        topicSessionMode: {
          type: "string",
          enum: ["disabled", "enabled"],
        },
        dynamicAgentCreation: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            workspaceTemplate: {
              type: "string",
            },
            agentDirTemplate: {
              type: "string",
            },
            maxAgents: {
              type: "integer",
              exclusiveMinimum: 0,
              maximum: 9007199254740991,
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              name: {
                type: "string",
              },
              appId: {
                type: "string",
              },
              appSecret: {
                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,
                      },
                    ],
                  },
                ],
              },
              encryptKey: {
                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,
                      },
                    ],
                  },
                ],
              },
              verificationToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              domain: {
                anyOf: [
                  {
                    type: "string",
                    enum: ["feishu", "lark"],
                  },
                  {
                    type: "string",
                    format: "uri",
                    pattern: "^https:\\/\\/.*",
                  },
                ],
              },
              connectionMode: {
                type: "string",
                enum: ["websocket", "webhook"],
              },
              webhookPath: {
                type: "string",
              },
              webhookHost: {
                type: "string",
              },
              webhookPort: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  mode: {
                    type: "string",
                    enum: ["native", "escape", "strip"],
                  },
                  tableMode: {
                    type: "string",
                    enum: ["native", "ascii", "simple"],
                  },
                },
                additionalProperties: false,
              },
              configWrites: {
                type: "boolean",
              },
              dmPolicy: {
                type: "string",
                enum: ["open", "pairing", "allowlist"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                anyOf: [
                  {
                    type: "string",
                    enum: ["open", "allowlist", "disabled"],
                  },
                  {},
                ],
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupSenderAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              requireMention: {
                type: "boolean",
              },
              groups: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    tools: {
                      type: "object",
                      properties: {
                        allow: {
                          type: "array",
                          items: {
                            type: "string",
                          },
                        },
                        deny: {
                          type: "array",
                          items: {
                            type: "string",
                          },
                        },
                      },
                      additionalProperties: false,
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    groupSessionScope: {
                      type: "string",
                      enum: ["group", "group_sender", "group_topic", "group_topic_sender"],
                    },
                    topicSessionMode: {
                      type: "string",
                      enum: ["disabled", "enabled"],
                    },
                    replyInThread: {
                      type: "string",
                      enum: ["disabled", "enabled"],
                    },
                  },
                  additionalProperties: false,
                },
              },
              historyLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              dmHistoryLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              dms: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    enabled: {
                      type: "boolean",
                    },
                    systemPrompt: {
                      type: "string",
                    },
                  },
                  additionalProperties: false,
                },
              },
              textChunkLimit: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              chunkMode: {
                type: "string",
                enum: ["length", "newline"],
              },
              blockStreamingCoalesce: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  minDelayMs: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxDelayMs: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                },
                additionalProperties: false,
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
              httpTimeoutMs: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 300000,
              },
              heartbeat: {
                type: "object",
                properties: {
                  visibility: {
                    type: "string",
                    enum: ["visible", "hidden"],
                  },
                  intervalMs: {
                    type: "integer",
                    exclusiveMinimum: 0,
                    maximum: 9007199254740991,
                  },
                },
                additionalProperties: false,
              },
              renderMode: {
                type: "string",
                enum: ["auto", "raw", "card"],
              },
              streaming: {
                type: "boolean",
              },
              tools: {
                type: "object",
                properties: {
                  doc: {
                    type: "boolean",
                  },
                  chat: {
                    type: "boolean",
                  },
                  wiki: {
                    type: "boolean",
                  },
                  drive: {
                    type: "boolean",
                  },
                  perm: {
                    type: "boolean",
                  },
                  scopes: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              replyInThread: {
                type: "string",
                enum: ["disabled", "enabled"],
              },
              reactionNotifications: {
                type: "string",
                enum: ["off", "own", "all"],
              },
              typingIndicator: {
                type: "boolean",
              },
              resolveSenderNames: {
                type: "boolean",
              },
              groupSessionScope: {
                type: "string",
                enum: ["group", "group_sender", "group_topic", "group_topic_sender"],
              },
              topicSessionMode: {
                type: "string",
                enum: ["disabled", "enabled"],
              },
            },
            additionalProperties: false,
          },
        },
      },
      required: [
        "domain",
        "connectionMode",
        "webhookPath",
        "dmPolicy",
        "groupPolicy",
        "reactionNotifications",
        "typingIndicator",
        "resolveSenderNames",
      ],
      additionalProperties: false,
    },
  },
  {
    pluginId: "googlechat",
    channelId: "googlechat",
    label: "Google Chat",
    description: "Google Workspace Chat app with HTTP webhook.",
    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,
    },
  },
  {
    pluginId: "imessage",
    channelId: "imessage",
    label: "iMessage",
    description: "this is still a work in progress.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        configWrites: {
          type: "boolean",
        },
        cliPath: {
          type: "string",
        },
        dbPath: {
          type: "string",
        },
        remoteHost: {
          type: "string",
        },
        service: {
          anyOf: [
            {
              type: "string",
              const: "imessage",
            },
            {
              type: "string",
              const: "sms",
            },
            {
              type: "string",
              const: "auto",
            },
          ],
        },
        region: {
          type: "string",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        defaultTo: {
          type: "string",
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
          },
        },
        includeAttachments: {
          type: "boolean",
        },
        attachmentRoots: {
          type: "array",
          items: {
            type: "string",
          },
        },
        remoteAttachmentRoots: {
          type: "array",
          items: {
            type: "string",
          },
        },
        mediaMaxMb: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        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,
        },
        groups: {
          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,
                },
              },
            },
            additionalProperties: false,
          },
        },
        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",
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              configWrites: {
                type: "boolean",
              },
              cliPath: {
                type: "string",
              },
              dbPath: {
                type: "string",
              },
              remoteHost: {
                type: "string",
              },
              service: {
                anyOf: [
                  {
                    type: "string",
                    const: "imessage",
                  },
                  {
                    type: "string",
                    const: "sms",
                  },
                  {
                    type: "string",
                    const: "auto",
                  },
                ],
              },
              region: {
                type: "string",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              defaultTo: {
                type: "string",
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
                },
              },
              includeAttachments: {
                type: "boolean",
              },
              attachmentRoots: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              remoteAttachmentRoots: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              mediaMaxMb: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              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,
              },
              groups: {
                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,
                      },
                    },
                  },
                  additionalProperties: false,
                },
              },
              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",
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "iMessage",
        help: "iMessage channel provider configuration for CLI integration and DM access policy handling. Use explicit CLI paths when runtime environments have non-standard binary locations.",
      },
      dmPolicy: {
        label: "iMessage DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.imessage.allowFrom=["*"].',
      },
      configWrites: {
        label: "iMessage Config Writes",
        help: "Allow iMessage to write config in response to channel events/commands (default: true).",
      },
      cliPath: {
        label: "iMessage CLI Path",
        help: "Filesystem path to the iMessage bridge CLI binary used for send/receive operations. Set explicitly when the binary is not on PATH in service runtime environments.",
      },
    },
  },
  {
    pluginId: "irc",
    channelId: "irc",
    label: "IRC",
    description: "classic IRC networks with DM/channel routing and pairing controls.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        host: {
          type: "string",
        },
        port: {
          type: "integer",
          minimum: 1,
          maximum: 65535,
        },
        tls: {
          type: "boolean",
        },
        nick: {
          type: "string",
        },
        username: {
          type: "string",
        },
        realname: {
          type: "string",
        },
        password: {
          type: "string",
        },
        passwordFile: {
          type: "string",
        },
        nickserv: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            service: {
              type: "string",
            },
            password: {
              type: "string",
            },
            passwordFile: {
              type: "string",
            },
            register: {
              type: "boolean",
            },
            registerEmail: {
              type: "string",
            },
          },
          additionalProperties: false,
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        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: {
              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,
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        channels: {
          type: "array",
          items: {
            type: "string",
          },
        },
        mentionPatterns: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        dmHistoryLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
        },
        responsePrefix: {
          type: "string",
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              dangerouslyAllowNameMatching: {
                type: "boolean",
              },
              host: {
                type: "string",
              },
              port: {
                type: "integer",
                minimum: 1,
                maximum: 65535,
              },
              tls: {
                type: "boolean",
              },
              nick: {
                type: "string",
              },
              username: {
                type: "string",
              },
              realname: {
                type: "string",
              },
              password: {
                type: "string",
              },
              passwordFile: {
                type: "string",
              },
              nickserv: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  service: {
                    type: "string",
                  },
                  password: {
                    type: "string",
                  },
                  passwordFile: {
                    type: "string",
                  },
                  register: {
                    type: "boolean",
                  },
                  registerEmail: {
                    type: "string",
                  },
                },
                additionalProperties: false,
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              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: {
                    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,
                      },
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                  },
                  additionalProperties: false,
                },
              },
              channels: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              mentionPatterns: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              historyLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              dmHistoryLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
              },
              responsePrefix: {
                type: "string",
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "IRC",
        help: "IRC channel provider configuration and compatibility settings for classic IRC transport workflows. Use this section when bridging legacy chat infrastructure into OpenClaw.",
      },
      dmPolicy: {
        label: "IRC DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.irc.allowFrom=["*"].',
      },
      "nickserv.enabled": {
        label: "IRC NickServ Enabled",
        help: "Enable NickServ identify/register after connect (defaults to enabled when password is configured).",
      },
      "nickserv.service": {
        label: "IRC NickServ Service",
        help: "NickServ service nick (default: NickServ).",
      },
      "nickserv.password": {
        label: "IRC NickServ Password",
        help: "NickServ password used for IDENTIFY/REGISTER (sensitive).",
      },
      "nickserv.passwordFile": {
        label: "IRC NickServ Password File",
        help: "Optional file path containing NickServ password.",
      },
      "nickserv.register": {
        label: "IRC NickServ Register",
        help: "If true, send NickServ REGISTER on every connect. Use once for initial registration, then disable.",
      },
      "nickserv.registerEmail": {
        label: "IRC NickServ Register Email",
        help: "Email used with NickServ REGISTER (required when register=true).",
      },
      configWrites: {
        label: "IRC Config Writes",
        help: "Allow IRC to write config in response to channel events/commands (default: true).",
      },
    },
  },
  {
    pluginId: "line",
    channelId: "line",
    label: "LINE",
    description: "LINE Messaging API webhook bot.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        enabled: {
          type: "boolean",
        },
        channelAccessToken: {
          type: "string",
        },
        channelSecret: {
          type: "string",
        },
        tokenFile: {
          type: "string",
        },
        secretFile: {
          type: "string",
        },
        name: {
          type: "string",
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["open", "allowlist", "pairing", "disabled"],
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "allowlist", "disabled"],
        },
        responsePrefix: {
          type: "string",
        },
        mediaMaxMb: {
          type: "number",
        },
        webhookPath: {
          type: "string",
        },
        threadBindings: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            idleHours: {
              type: "number",
            },
            maxAgeHours: {
              type: "number",
            },
            spawnSubagentSessions: {
              type: "boolean",
            },
            spawnAcpSessions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              channelAccessToken: {
                type: "string",
              },
              channelSecret: {
                type: "string",
              },
              tokenFile: {
                type: "string",
              },
              secretFile: {
                type: "string",
              },
              name: {
                type: "string",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["open", "allowlist", "pairing", "disabled"],
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "allowlist", "disabled"],
              },
              responsePrefix: {
                type: "string",
              },
              mediaMaxMb: {
                type: "number",
              },
              webhookPath: {
                type: "string",
              },
              threadBindings: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  idleHours: {
                    type: "number",
                  },
                  maxAgeHours: {
                    type: "number",
                  },
                  spawnSubagentSessions: {
                    type: "boolean",
                  },
                  spawnAcpSessions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              groups: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    requireMention: {
                      type: "boolean",
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                  },
                  additionalProperties: false,
                },
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
        groups: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              requireMention: {
                type: "boolean",
              },
              systemPrompt: {
                type: "string",
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
            },
            additionalProperties: false,
          },
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
  },
  {
    pluginId: "matrix",
    channelId: "matrix",
    label: "Matrix",
    description: "open protocol; install the plugin to enable.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        defaultAccount: {
          type: "string",
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {},
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        homeserver: {
          type: "string",
        },
        network: {
          type: "object",
          properties: {
            dangerouslyAllowPrivateNetwork: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        proxy: {
          type: "string",
        },
        userId: {
          type: "string",
        },
        accessToken: {
          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,
                },
              ],
            },
          ],
        },
        password: {
          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,
                },
              ],
            },
          ],
        },
        deviceId: {
          type: "string",
        },
        deviceName: {
          type: "string",
        },
        avatarUrl: {
          type: "string",
        },
        initialSyncLimit: {
          type: "number",
        },
        encryption: {
          type: "boolean",
        },
        allowlistOnly: {
          type: "boolean",
        },
        allowBots: {
          anyOf: [
            {
              type: "boolean",
            },
            {
              type: "string",
              const: "mentions",
            },
          ],
        },
        groupPolicy: {
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        blockStreaming: {
          type: "boolean",
        },
        streaming: {
          anyOf: [
            {
              type: "string",
              enum: ["partial", "quiet", "off"],
            },
            {
              type: "boolean",
            },
          ],
        },
        replyToMode: {
          type: "string",
          enum: ["off", "first", "all", "batched"],
        },
        threadReplies: {
          type: "string",
          enum: ["off", "inbound", "always"],
        },
        textChunkLimit: {
          type: "number",
        },
        chunkMode: {
          type: "string",
          enum: ["length", "newline"],
        },
        responsePrefix: {
          type: "string",
        },
        ackReaction: {
          type: "string",
        },
        ackReactionScope: {
          type: "string",
          enum: ["group-mentions", "group-all", "direct", "all", "none", "off"],
        },
        reactionNotifications: {
          type: "string",
          enum: ["off", "own"],
        },
        threadBindings: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            idleHours: {
              type: "number",
              minimum: 0,
            },
            maxAgeHours: {
              type: "number",
              minimum: 0,
            },
            spawnSubagentSessions: {
              type: "boolean",
            },
            spawnAcpSessions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        startupVerification: {
          type: "string",
          enum: ["off", "if-unverified"],
        },
        startupVerificationCooldownHours: {
          type: "number",
        },
        mediaMaxMb: {
          type: "number",
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        autoJoin: {
          type: "string",
          enum: ["always", "allowlist", "off"],
        },
        autoJoinAllowlist: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        dm: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            policy: {
              type: "string",
              enum: ["pairing", "allowlist", "open", "disabled"],
            },
            allowFrom: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            sessionScope: {
              type: "string",
              enum: ["per-user", "per-room"],
            },
            threadReplies: {
              type: "string",
              enum: ["off", "inbound", "always"],
            },
          },
          additionalProperties: false,
        },
        execApprovals: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            approvers: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            agentFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            sessionFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            target: {
              type: "string",
              enum: ["dm", "channel", "both"],
            },
          },
          additionalProperties: false,
        },
        groups: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              account: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              requireMention: {
                type: "boolean",
              },
              allowBots: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "string",
                    const: "mentions",
                  },
                ],
              },
              tools: {
                type: "object",
                properties: {
                  allow: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  alsoAllow: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  deny: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                },
                additionalProperties: false,
              },
              autoReply: {
                type: "boolean",
              },
              users: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        rooms: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              account: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              requireMention: {
                type: "boolean",
              },
              allowBots: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "string",
                    const: "mentions",
                  },
                ],
              },
              tools: {
                type: "object",
                properties: {
                  allow: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  alsoAllow: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  deny: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                },
                additionalProperties: false,
              },
              autoReply: {
                type: "boolean",
              },
              users: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
            messages: {
              type: "boolean",
            },
            pins: {
              type: "boolean",
            },
            profile: {
              type: "boolean",
            },
            memberInfo: {
              type: "boolean",
            },
            channelInfo: {
              type: "boolean",
            },
            verification: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
      },
      additionalProperties: false,
    },
  },
  {
    pluginId: "mattermost",
    channelId: "mattermost",
    label: "Mattermost",
    description: "self-hosted Slack-style chat; install the plugin to enable.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        configWrites: {
          type: "boolean",
        },
        botToken: {
          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,
                },
              ],
            },
          ],
        },
        baseUrl: {
          type: "string",
        },
        chatmode: {
          type: "string",
          enum: ["oncall", "onmessage", "onchar"],
        },
        oncharPrefixes: {
          type: "array",
          items: {
            type: "string",
          },
        },
        requireMention: {
          type: "boolean",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        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,
        },
        replyToMode: {
          type: "string",
          enum: ["off", "first", "all", "batched"],
        },
        responsePrefix: {
          type: "string",
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        commands: {
          type: "object",
          properties: {
            native: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
            nativeSkills: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
            callbackPath: {
              type: "string",
            },
            callbackUrl: {
              type: "string",
            },
          },
          additionalProperties: false,
        },
        interactions: {
          type: "object",
          properties: {
            callbackBaseUrl: {
              type: "string",
            },
            allowedSourceIps: {
              type: "array",
              items: {
                type: "string",
              },
            },
          },
          additionalProperties: false,
        },
        groups: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              requireMention: {
                type: "boolean",
              },
            },
            additionalProperties: false,
          },
        },
        network: {
          type: "object",
          properties: {
            dangerouslyAllowPrivateNetwork: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        dmChannelRetry: {
          type: "object",
          properties: {
            maxRetries: {
              type: "integer",
              minimum: 0,
              maximum: 10,
            },
            initialDelayMs: {
              type: "integer",
              minimum: 100,
              maximum: 60000,
            },
            maxDelayMs: {
              type: "integer",
              minimum: 1000,
              maximum: 60000,
            },
            timeoutMs: {
              type: "integer",
              minimum: 5000,
              maximum: 120000,
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              dangerouslyAllowNameMatching: {
                type: "boolean",
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              configWrites: {
                type: "boolean",
              },
              botToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              baseUrl: {
                type: "string",
              },
              chatmode: {
                type: "string",
                enum: ["oncall", "onmessage", "onchar"],
              },
              oncharPrefixes: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              requireMention: {
                type: "boolean",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              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,
              },
              replyToMode: {
                type: "string",
                enum: ["off", "first", "all", "batched"],
              },
              responsePrefix: {
                type: "string",
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              commands: {
                type: "object",
                properties: {
                  native: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                  nativeSkills: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                  callbackPath: {
                    type: "string",
                  },
                  callbackUrl: {
                    type: "string",
                  },
                },
                additionalProperties: false,
              },
              interactions: {
                type: "object",
                properties: {
                  callbackBaseUrl: {
                    type: "string",
                  },
                  allowedSourceIps: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                },
                additionalProperties: false,
              },
              groups: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                  },
                  additionalProperties: false,
                },
              },
              network: {
                type: "object",
                properties: {
                  dangerouslyAllowPrivateNetwork: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              dmChannelRetry: {
                type: "object",
                properties: {
                  maxRetries: {
                    type: "integer",
                    minimum: 0,
                    maximum: 10,
                  },
                  initialDelayMs: {
                    type: "integer",
                    minimum: 100,
                    maximum: 60000,
                  },
                  maxDelayMs: {
                    type: "integer",
                    minimum: 1000,
                    maximum: 60000,
                  },
                  timeoutMs: {
                    type: "integer",
                    minimum: 5000,
                    maximum: 120000,
                  },
                },
                additionalProperties: false,
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
  },
  {
    pluginId: "msteams",
    channelId: "msteams",
    label: "Microsoft Teams",
    description: "Teams SDK; enterprise support.",
    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,
    },
    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).",
      },
    },
  },
  {
    pluginId: "nextcloud-talk",
    channelId: "nextcloud-talk",
    label: "Nextcloud Talk",
    description: "Self-hosted chat via Nextcloud Talk webhook bots.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        baseUrl: {
          type: "string",
        },
        botSecret: {
          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,
                },
              ],
            },
          ],
        },
        botSecretFile: {
          type: "string",
        },
        apiUser: {
          type: "string",
        },
        apiPassword: {
          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,
                },
              ],
            },
          ],
        },
        apiPasswordFile: {
          type: "string",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        webhookPort: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        webhookHost: {
          type: "string",
        },
        webhookPath: {
          type: "string",
        },
        webhookPublicUrl: {
          type: "string",
        },
        allowFrom: {
          type: "array",
          items: {
            type: "string",
          },
        },
        groupAllowFrom: {
          type: "array",
          items: {
            type: "string",
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        rooms: {
          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,
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        network: {
          type: "object",
          properties: {
            dangerouslyAllowPrivateNetwork: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        dmHistoryLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
        },
        responsePrefix: {
          type: "string",
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              baseUrl: {
                type: "string",
              },
              botSecret: {
                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,
                      },
                    ],
                  },
                ],
              },
              botSecretFile: {
                type: "string",
              },
              apiUser: {
                type: "string",
              },
              apiPassword: {
                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,
                      },
                    ],
                  },
                ],
              },
              apiPasswordFile: {
                type: "string",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              webhookPort: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              webhookHost: {
                type: "string",
              },
              webhookPath: {
                type: "string",
              },
              webhookPublicUrl: {
                type: "string",
              },
              allowFrom: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              rooms: {
                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,
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                  },
                  additionalProperties: false,
                },
              },
              network: {
                type: "object",
                properties: {
                  dangerouslyAllowPrivateNetwork: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              historyLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              dmHistoryLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
              },
              responsePrefix: {
                type: "string",
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
  },
  {
    pluginId: "nostr",
    channelId: "nostr",
    label: "Nostr",
    description: "Decentralized protocol; encrypted DMs via NIP-04.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        defaultAccount: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        privateKey: {
          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,
                },
              ],
            },
          ],
        },
        relays: {
          type: "array",
          items: {
            type: "string",
          },
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        profile: {
          type: "object",
          properties: {
            name: {
              type: "string",
              maxLength: 256,
            },
            displayName: {
              type: "string",
              maxLength: 256,
            },
            about: {
              type: "string",
              maxLength: 2000,
            },
            picture: {
              type: "string",
              format: "uri",
            },
            banner: {
              type: "string",
              format: "uri",
            },
            website: {
              type: "string",
              format: "uri",
            },
            nip05: {
              type: "string",
            },
            lud16: {
              type: "string",
            },
          },
          additionalProperties: false,
        },
      },
      additionalProperties: false,
    },
  },
  {
    pluginId: "qa-channel",
    channelId: "qa-channel",
    label: "QA Channel",
    description: "Synthetic Slack-class transport for automated OpenClaw QA scenarios.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        baseUrl: {
          type: "string",
          format: "uri",
        },
        botUserId: {
          type: "string",
        },
        botDisplayName: {
          type: "string",
        },
        pollTimeoutMs: {
          type: "integer",
          minimum: 100,
          maximum: 30000,
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        defaultTo: {
          type: "string",
        },
        actions: {
          type: "object",
          properties: {
            messages: {
              type: "boolean",
            },
            reactions: {
              type: "boolean",
            },
            search: {
              type: "boolean",
            },
            threads: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              baseUrl: {
                type: "string",
                format: "uri",
              },
              botUserId: {
                type: "string",
              },
              botDisplayName: {
                type: "string",
              },
              pollTimeoutMs: {
                type: "integer",
                minimum: 100,
                maximum: 30000,
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              defaultTo: {
                type: "string",
              },
              actions: {
                type: "object",
                properties: {
                  messages: {
                    type: "boolean",
                  },
                  reactions: {
                    type: "boolean",
                  },
                  search: {
                    type: "boolean",
                  },
                  threads: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
            },
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      additionalProperties: false,
    },
  },
  {
    pluginId: "qqbot",
    channelId: "qqbot",
    label: "QQ Bot",
    description:
      "connect to QQ via official QQ Bot API with group chat and direct message support.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        enabled: {
          type: "boolean",
        },
        name: {
          type: "string",
        },
        appId: {
          type: "string",
        },
        clientSecret: {
          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,
                },
              ],
            },
          ],
        },
        clientSecretFile: {
          type: "string",
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        systemPrompt: {
          type: "string",
        },
        markdownSupport: {
          type: "boolean",
        },
        voiceDirectUploadFormats: {
          type: "array",
          items: {
            type: "string",
          },
        },
        audioFormatPolicy: {
          type: "object",
          properties: {
            sttDirectFormats: {
              type: "array",
              items: {
                type: "string",
              },
            },
            uploadDirectFormats: {
              type: "array",
              items: {
                type: "string",
              },
            },
            transcodeEnabled: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        urlDirectUpload: {
          type: "boolean",
        },
        upgradeUrl: {
          type: "string",
        },
        upgradeMode: {
          type: "string",
          enum: ["doc", "hot-reload"],
        },
        streaming: {
          anyOf: [
            {
              type: "boolean",
            },
            {
              type: "object",
              properties: {
                mode: {
                  default: "partial",
                  type: "string",
                  enum: ["off", "partial"],
                },
              },
              required: ["mode"],
              additionalProperties: {},
            },
          ],
        },
        tts: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            provider: {
              type: "string",
            },
            baseUrl: {
              type: "string",
            },
            apiKey: {
              type: "string",
            },
            model: {
              type: "string",
            },
            voice: {
              type: "string",
            },
            authStyle: {
              type: "string",
              enum: ["bearer", "api-key"],
            },
            queryParams: {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                type: "string",
              },
            },
            speed: {
              type: "number",
            },
          },
          additionalProperties: false,
        },
        stt: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            provider: {
              type: "string",
            },
            baseUrl: {
              type: "string",
            },
            apiKey: {
              type: "string",
            },
            model: {
              type: "string",
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              name: {
                type: "string",
              },
              appId: {
                type: "string",
              },
              clientSecret: {
                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,
                      },
                    ],
                  },
                ],
              },
              clientSecretFile: {
                type: "string",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              systemPrompt: {
                type: "string",
              },
              markdownSupport: {
                type: "boolean",
              },
              voiceDirectUploadFormats: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              audioFormatPolicy: {
                type: "object",
                properties: {
                  sttDirectFormats: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  uploadDirectFormats: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  transcodeEnabled: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              urlDirectUpload: {
                type: "boolean",
              },
              upgradeUrl: {
                type: "string",
              },
              upgradeMode: {
                type: "string",
                enum: ["doc", "hot-reload"],
              },
              streaming: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "object",
                    properties: {
                      mode: {
                        default: "partial",
                        type: "string",
                        enum: ["off", "partial"],
                      },
                    },
                    required: ["mode"],
                    additionalProperties: {},
                  },
                ],
              },
            },
            additionalProperties: {},
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      additionalProperties: {},
    },
  },
  {
    pluginId: "signal",
    channelId: "signal",
    label: "Signal",
    description: 'signal-cli linked device; more setup (David Reagans: "Hop on Discord.").',
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        configWrites: {
          type: "boolean",
        },
        account: {
          type: "string",
        },
        accountUuid: {
          type: "string",
        },
        httpUrl: {
          type: "string",
        },
        httpHost: {
          type: "string",
        },
        httpPort: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        cliPath: {
          type: "string",
        },
        autoStart: {
          type: "boolean",
        },
        startupTimeoutMs: {
          type: "integer",
          minimum: 1000,
          maximum: 120000,
        },
        receiveMode: {
          anyOf: [
            {
              type: "string",
              const: "on-start",
            },
            {
              type: "string",
              const: "manual",
            },
          ],
        },
        ignoreAttachments: {
          type: "boolean",
        },
        ignoreStories: {
          type: "boolean",
        },
        sendReadReceipts: {
          type: "boolean",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        defaultTo: {
          type: "string",
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        groups: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              requireMention: {
                type: "boolean",
              },
              ingest: {
                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,
                },
              },
            },
            additionalProperties: false,
          },
        },
        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: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        reactionNotifications: {
          type: "string",
          enum: ["off", "own", "all", "allowlist"],
        },
        reactionAllowlist: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        reactionLevel: {
          type: "string",
          enum: ["off", "ack", "minimal", "extensive"],
        },
        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",
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              configWrites: {
                type: "boolean",
              },
              account: {
                type: "string",
              },
              accountUuid: {
                type: "string",
              },
              httpUrl: {
                type: "string",
              },
              httpHost: {
                type: "string",
              },
              httpPort: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              cliPath: {
                type: "string",
              },
              autoStart: {
                type: "boolean",
              },
              startupTimeoutMs: {
                type: "integer",
                minimum: 1000,
                maximum: 120000,
              },
              receiveMode: {
                anyOf: [
                  {
                    type: "string",
                    const: "on-start",
                  },
                  {
                    type: "string",
                    const: "manual",
                  },
                ],
              },
              ignoreAttachments: {
                type: "boolean",
              },
              ignoreStories: {
                type: "boolean",
              },
              sendReadReceipts: {
                type: "boolean",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              defaultTo: {
                type: "string",
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              groups: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    ingest: {
                      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,
                      },
                    },
                  },
                  additionalProperties: false,
                },
              },
              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: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              reactionNotifications: {
                type: "string",
                enum: ["off", "own", "all", "allowlist"],
              },
              reactionAllowlist: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              reactionLevel: {
                type: "string",
                enum: ["off", "ack", "minimal", "extensive"],
              },
              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",
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "Signal",
        help: "Signal channel provider configuration including account identity and DM policy behavior. Keep account mapping explicit so routing remains stable across multi-device setups.",
      },
      dmPolicy: {
        label: "Signal DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.signal.allowFrom=["*"].',
      },
      configWrites: {
        label: "Signal Config Writes",
        help: "Allow Signal to write config in response to channel events/commands (default: true).",
      },
      account: {
        label: "Signal Account",
        help: "Signal account identifier (phone/number handle) used to bind this channel config to a specific Signal identity. Keep this aligned with your linked device/session state.",
      },
    },
  },
  {
    pluginId: "slack",
    channelId: "slack",
    label: "Slack",
    description: "supported (Socket Mode).",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        mode: {
          default: "socket",
          type: "string",
          enum: ["socket", "http"],
        },
        signingSecret: {
          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,
                },
              ],
            },
          ],
        },
        webhookPath: {
          default: "/slack/events",
          type: "string",
        },
        capabilities: {
          anyOf: [
            {
              type: "array",
              items: {
                type: "string",
              },
            },
            {
              type: "object",
              properties: {
                interactiveReplies: {
                  type: "boolean",
                },
              },
              additionalProperties: false,
            },
          ],
        },
        execApprovals: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            approvers: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            agentFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            sessionFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            target: {
              type: "string",
              enum: ["dm", "channel", "both"],
            },
          },
          additionalProperties: false,
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        commands: {
          type: "object",
          properties: {
            native: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
            nativeSkills: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
          },
          additionalProperties: false,
        },
        configWrites: {
          type: "boolean",
        },
        botToken: {
          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,
                },
              ],
            },
          ],
        },
        appToken: {
          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,
                },
              ],
            },
          ],
        },
        userToken: {
          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,
                },
              ],
            },
          ],
        },
        userTokenReadOnly: {
          default: true,
          type: "boolean",
        },
        allowBots: {
          type: "boolean",
        },
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        requireMention: {
          type: "boolean",
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
        },
        streaming: {
          type: "object",
          properties: {
            mode: {
              type: "string",
              enum: ["off", "partial", "block", "progress"],
            },
            chunkMode: {
              type: "string",
              enum: ["length", "newline"],
            },
            preview: {
              type: "object",
              properties: {
                chunk: {
                  type: "object",
                  properties: {
                    minChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    maxChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    breakPreference: {
                      anyOf: [
                        {
                          type: "string",
                          const: "paragraph",
                        },
                        {
                          type: "string",
                          const: "newline",
                        },
                        {
                          type: "string",
                          const: "sentence",
                        },
                      ],
                    },
                  },
                  additionalProperties: false,
                },
              },
              additionalProperties: false,
            },
            block: {
              type: "object",
              properties: {
                enabled: {
                  type: "boolean",
                },
                coalesce: {
                  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,
                },
              },
              additionalProperties: false,
            },
            nativeTransport: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        reactionNotifications: {
          type: "string",
          enum: ["off", "own", "all", "allowlist"],
        },
        reactionAllowlist: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        replyToMode: {
          anyOf: [
            {
              type: "string",
              const: "off",
            },
            {
              type: "string",
              const: "first",
            },
            {
              type: "string",
              const: "all",
            },
            {
              type: "string",
              const: "batched",
            },
          ],
        },
        replyToModeByChatType: {
          type: "object",
          properties: {
            direct: {
              anyOf: [
                {
                  type: "string",
                  const: "off",
                },
                {
                  type: "string",
                  const: "first",
                },
                {
                  type: "string",
                  const: "all",
                },
                {
                  type: "string",
                  const: "batched",
                },
              ],
            },
            group: {
              anyOf: [
                {
                  type: "string",
                  const: "off",
                },
                {
                  type: "string",
                  const: "first",
                },
                {
                  type: "string",
                  const: "all",
                },
                {
                  type: "string",
                  const: "batched",
                },
              ],
            },
            channel: {
              anyOf: [
                {
                  type: "string",
                  const: "off",
                },
                {
                  type: "string",
                  const: "first",
                },
                {
                  type: "string",
                  const: "all",
                },
                {
                  type: "string",
                  const: "batched",
                },
              ],
            },
          },
          additionalProperties: false,
        },
        thread: {
          type: "object",
          properties: {
            historyScope: {
              type: "string",
              enum: ["thread", "channel"],
            },
            inheritParent: {
              type: "boolean",
            },
            initialHistoryLimit: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            requireExplicitMention: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
            messages: {
              type: "boolean",
            },
            pins: {
              type: "boolean",
            },
            search: {
              type: "boolean",
            },
            permissions: {
              type: "boolean",
            },
            memberInfo: {
              type: "boolean",
            },
            channelInfo: {
              type: "boolean",
            },
            emojiList: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        slashCommand: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            name: {
              type: "string",
            },
            sessionPrefix: {
              type: "string",
            },
            ephemeral: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        defaultTo: {
          type: "string",
        },
        dm: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            policy: {
              type: "string",
              enum: ["pairing", "allowlist", "open", "disabled"],
            },
            allowFrom: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            groupEnabled: {
              type: "boolean",
            },
            groupChannels: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            replyToMode: {
              anyOf: [
                {
                  type: "string",
                  const: "off",
                },
                {
                  type: "string",
                  const: "first",
                },
                {
                  type: "string",
                  const: "all",
                },
                {
                  type: "string",
                  const: "batched",
                },
              ],
            },
          },
          additionalProperties: false,
        },
        channels: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              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,
                },
              },
              allowBots: {
                type: "boolean",
              },
              users: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              systemPrompt: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        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",
        },
        ackReaction: {
          type: "string",
        },
        typingReaction: {
          type: "string",
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              mode: {
                type: "string",
                enum: ["socket", "http"],
              },
              signingSecret: {
                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,
                      },
                    ],
                  },
                ],
              },
              webhookPath: {
                type: "string",
              },
              capabilities: {
                anyOf: [
                  {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  {
                    type: "object",
                    properties: {
                      interactiveReplies: {
                        type: "boolean",
                      },
                    },
                    additionalProperties: false,
                  },
                ],
              },
              execApprovals: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  approvers: {
                    type: "array",
                    items: {
                      anyOf: [
                        {
                          type: "string",
                        },
                        {
                          type: "number",
                        },
                      ],
                    },
                  },
                  agentFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  sessionFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  target: {
                    type: "string",
                    enum: ["dm", "channel", "both"],
                  },
                },
                additionalProperties: false,
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              commands: {
                type: "object",
                properties: {
                  native: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                  nativeSkills: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              configWrites: {
                type: "boolean",
              },
              botToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              appToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              userToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              userTokenReadOnly: {
                default: true,
                type: "boolean",
              },
              allowBots: {
                type: "boolean",
              },
              dangerouslyAllowNameMatching: {
                type: "boolean",
              },
              requireMention: {
                type: "boolean",
              },
              groupPolicy: {
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
              },
              streaming: {
                type: "object",
                properties: {
                  mode: {
                    type: "string",
                    enum: ["off", "partial", "block", "progress"],
                  },
                  chunkMode: {
                    type: "string",
                    enum: ["length", "newline"],
                  },
                  preview: {
                    type: "object",
                    properties: {
                      chunk: {
                        type: "object",
                        properties: {
                          minChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          maxChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          breakPreference: {
                            anyOf: [
                              {
                                type: "string",
                                const: "paragraph",
                              },
                              {
                                type: "string",
                                const: "newline",
                              },
                              {
                                type: "string",
                                const: "sentence",
                              },
                            ],
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                    additionalProperties: false,
                  },
                  block: {
                    type: "object",
                    properties: {
                      enabled: {
                        type: "boolean",
                      },
                      coalesce: {
                        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,
                      },
                    },
                    additionalProperties: false,
                  },
                  nativeTransport: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
              reactionNotifications: {
                type: "string",
                enum: ["off", "own", "all", "allowlist"],
              },
              reactionAllowlist: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              replyToMode: {
                anyOf: [
                  {
                    type: "string",
                    const: "off",
                  },
                  {
                    type: "string",
                    const: "first",
                  },
                  {
                    type: "string",
                    const: "all",
                  },
                  {
                    type: "string",
                    const: "batched",
                  },
                ],
              },
              replyToModeByChatType: {
                type: "object",
                properties: {
                  direct: {
                    anyOf: [
                      {
                        type: "string",
                        const: "off",
                      },
                      {
                        type: "string",
                        const: "first",
                      },
                      {
                        type: "string",
                        const: "all",
                      },
                      {
                        type: "string",
                        const: "batched",
                      },
                    ],
                  },
                  group: {
                    anyOf: [
                      {
                        type: "string",
                        const: "off",
                      },
                      {
                        type: "string",
                        const: "first",
                      },
                      {
                        type: "string",
                        const: "all",
                      },
                      {
                        type: "string",
                        const: "batched",
                      },
                    ],
                  },
                  channel: {
                    anyOf: [
                      {
                        type: "string",
                        const: "off",
                      },
                      {
                        type: "string",
                        const: "first",
                      },
                      {
                        type: "string",
                        const: "all",
                      },
                      {
                        type: "string",
                        const: "batched",
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              thread: {
                type: "object",
                properties: {
                  historyScope: {
                    type: "string",
                    enum: ["thread", "channel"],
                  },
                  inheritParent: {
                    type: "boolean",
                  },
                  initialHistoryLimit: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  requireExplicitMention: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                  messages: {
                    type: "boolean",
                  },
                  pins: {
                    type: "boolean",
                  },
                  search: {
                    type: "boolean",
                  },
                  permissions: {
                    type: "boolean",
                  },
                  memberInfo: {
                    type: "boolean",
                  },
                  channelInfo: {
                    type: "boolean",
                  },
                  emojiList: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              slashCommand: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  name: {
                    type: "string",
                  },
                  sessionPrefix: {
                    type: "string",
                  },
                  ephemeral: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              defaultTo: {
                type: "string",
              },
              dm: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  policy: {
                    type: "string",
                    enum: ["pairing", "allowlist", "open", "disabled"],
                  },
                  allowFrom: {
                    type: "array",
                    items: {
                      anyOf: [
                        {
                          type: "string",
                        },
                        {
                          type: "number",
                        },
                      ],
                    },
                  },
                  groupEnabled: {
                    type: "boolean",
                  },
                  groupChannels: {
                    type: "array",
                    items: {
                      anyOf: [
                        {
                          type: "string",
                        },
                        {
                          type: "number",
                        },
                      ],
                    },
                  },
                  replyToMode: {
                    anyOf: [
                      {
                        type: "string",
                        const: "off",
                      },
                      {
                        type: "string",
                        const: "first",
                      },
                      {
                        type: "string",
                        const: "all",
                      },
                      {
                        type: "string",
                        const: "batched",
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              channels: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    enabled: {
                      type: "boolean",
                    },
                    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,
                      },
                    },
                    allowBots: {
                      type: "boolean",
                    },
                    users: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                  },
                  additionalProperties: false,
                },
              },
              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",
              },
              ackReaction: {
                type: "string",
              },
              typingReaction: {
                type: "string",
              },
            },
            required: ["userTokenReadOnly"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["mode", "webhookPath", "userTokenReadOnly", "groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "Slack",
        help: "Slack channel provider configuration for bot/app tokens, streaming behavior, and DM policy controls. Keep token handling and thread behavior explicit to avoid noisy workspace interactions.",
      },
      "dm.policy": {
        label: "Slack DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.slack.allowFrom=["*"] (legacy: channels.slack.dm.allowFrom).',
      },
      dmPolicy: {
        label: "Slack DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.slack.allowFrom=["*"].',
      },
      configWrites: {
        label: "Slack Config Writes",
        help: "Allow Slack to write config in response to channel events/commands (default: true).",
      },
      "commands.native": {
        label: "Slack Native Commands",
        help: 'Override native commands for Slack (bool or "auto").',
      },
      "commands.nativeSkills": {
        label: "Slack Native Skill Commands",
        help: 'Override native skill commands for Slack (bool or "auto").',
      },
      allowBots: {
        label: "Slack Allow Bot Messages",
        help: "Allow bot-authored messages to trigger Slack replies (default: false).",
      },
      botToken: {
        label: "Slack Bot Token",
        help: "Slack bot token used for standard chat actions in the configured workspace. Keep this credential scoped and rotate if workspace app permissions change.",
      },
      appToken: {
        label: "Slack App Token",
        help: "Slack app-level token used for Socket Mode connections and event transport when enabled. Use least-privilege app scopes and store this token as a secret.",
      },
      userToken: {
        label: "Slack User Token",
        help: "Optional Slack user token for workflows requiring user-context API access beyond bot permissions. Use sparingly and audit scopes because this token can carry broader authority.",
      },
      userTokenReadOnly: {
        label: "Slack User Token Read Only",
        help: "When true, treat configured Slack user token usage as read-only helper behavior where possible. Keep enabled if you only need supplemental reads without user-context writes.",
      },
      "capabilities.interactiveReplies": {
        label: "Slack Interactive Replies",
        help: "Enable agent-authored Slack interactive reply directives (`[[slack_buttons: ...]]`, `[[slack_select: ...]]`). Default: false.",
      },
      execApprovals: {
        label: "Slack Exec Approvals",
        help: "Slack-native exec approval routing and approver authorization. When unset, OpenClaw auto-enables DM-first native approvals if approvers can be resolved for this workspace account.",
      },
      "execApprovals.enabled": {
        label: "Slack Exec Approvals Enabled",
        help: 'Controls Slack native exec approvals for this account: unset or "auto" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them.',
      },
      "execApprovals.approvers": {
        label: "Slack Exec Approval Approvers",
        help: "Slack user IDs allowed to approve exec requests for this workspace account. Use Slack user IDs or user targets such as `U123`, `user:U123`, or `<@U123>`. If you leave this unset, OpenClaw falls back to commands.ownerAllowFrom when possible.",
      },
      "execApprovals.agentFilter": {
        label: "Slack Exec Approval Agent Filter",
        help: 'Optional allowlist of agent IDs eligible for Slack exec approvals, for example `["main", "ops-agent"]`. Use this to keep approval prompts scoped to the agents you actually operate from Slack.',
      },
      "execApprovals.sessionFilter": {
        label: "Slack Exec Approval Session Filter",
        help: "Optional session-key filters matched as substring or regex-style patterns before Slack approval routing is used. Use narrow patterns so Slack approvals only appear for intended sessions.",
      },
      "execApprovals.target": {
        label: "Slack Exec Approval Target",
        help: 'Controls where Slack approval prompts are sent: "dm" sends to approver DMs (default), "channel" sends to the originating Slack chat/thread, and "both" sends to both. Channel delivery exposes the command text to the chat, so only use it in trusted channels.',
      },
      streaming: {
        label: "Slack Streaming Mode",
        help: 'Unified Slack stream preview mode: "off" | "partial" | "block" | "progress". Legacy boolean/streamMode keys are auto-mapped.',
      },
      "streaming.mode": {
        label: "Slack Streaming Mode",
        help: 'Canonical Slack preview mode: "off" | "partial" | "block" | "progress".',
      },
      "streaming.chunkMode": {
        label: "Slack Chunk Mode",
        help: 'Chunking mode for outbound Slack text delivery: "length" (default) or "newline".',
      },
      "streaming.block.enabled": {
        label: "Slack Block Streaming Enabled",
        help: 'Enable chunked block-style Slack preview delivery when channels.slack.streaming.mode="block".',
      },
      "streaming.block.coalesce": {
        label: "Slack Block Streaming Coalesce",
        help: "Merge streamed Slack block replies before final delivery.",
      },
      "streaming.nativeTransport": {
        label: "Slack Native Streaming",
        help: "Enable native Slack text streaming (chat.startStream/chat.appendStream/chat.stopStream) when channels.slack.streaming.mode is partial (default: true). Requires a reply thread target; top-level DMs stay on the non-thread fallback path.",
      },
      "thread.historyScope": {
        label: "Slack Thread History Scope",
        help: 'Scope for Slack thread history context ("thread" isolates per thread; "channel" reuses channel history).',
      },
      "thread.inheritParent": {
        label: "Slack Thread Parent Inheritance",
        help: "If true, Slack thread sessions inherit the parent channel transcript (default: false).",
      },
      "thread.initialHistoryLimit": {
        label: "Slack Thread Initial History Limit",
        help: "Maximum number of existing Slack thread messages to fetch when starting a new thread session (default: 20, set to 0 to disable).",
      },
      "thread.requireExplicitMention": {
        label: "Slack Thread Require Explicit Mention",
        help: "If true, require an explicit @mention even inside threads where the bot has participated. Suppresses implicit thread mention behavior so the bot only responds to explicit @bot mentions in threads (default: false).",
      },
    },
  },
  {
    pluginId: "synology-chat",
    channelId: "synology-chat",
    label: "Synology Chat",
    description: "Connect your Synology NAS Chat to OpenClaw with full agent capabilities.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        dangerouslyAllowInheritedWebhookPath: {
          type: "boolean",
        },
      },
      additionalProperties: {},
    },
  },
  {
    pluginId: "telegram",
    channelId: "telegram",
    label: "Telegram",
    description: "simplest way to get started — register a bot with @BotFather and get going.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        capabilities: {
          anyOf: [
            {
              type: "array",
              items: {
                type: "string",
              },
            },
            {
              type: "object",
              properties: {
                inlineButtons: {
                  type: "string",
                  enum: ["off", "dm", "group", "all", "allowlist"],
                },
              },
              additionalProperties: false,
            },
          ],
        },
        execApprovals: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            approvers: {
              type: "array",
              items: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
            },
            agentFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            sessionFilter: {
              type: "array",
              items: {
                type: "string",
              },
            },
            target: {
              type: "string",
              enum: ["dm", "channel", "both"],
            },
          },
          additionalProperties: false,
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        enabled: {
          type: "boolean",
        },
        commands: {
          type: "object",
          properties: {
            native: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
            nativeSkills: {
              anyOf: [
                {
                  type: "boolean",
                },
                {
                  type: "string",
                  const: "auto",
                },
              ],
            },
          },
          additionalProperties: false,
        },
        customCommands: {
          type: "array",
          items: {
            type: "object",
            properties: {
              command: {
                type: "string",
              },
              description: {
                type: "string",
              },
            },
            required: ["command", "description"],
            additionalProperties: false,
          },
        },
        configWrites: {
          type: "boolean",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        botToken: {
          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,
                },
              ],
            },
          ],
        },
        tokenFile: {
          type: "string",
        },
        replyToMode: {
          anyOf: [
            {
              type: "string",
              const: "off",
            },
            {
              type: "string",
              const: "first",
            },
            {
              type: "string",
              const: "all",
            },
            {
              type: "string",
              const: "batched",
            },
          ],
        },
        groups: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              requireMention: {
                type: "boolean",
              },
              ingest: {
                type: "boolean",
              },
              disableAudioPreflight: {
                type: "boolean",
              },
              groupPolicy: {
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              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,
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              systemPrompt: {
                type: "string",
              },
              topics: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    ingest: {
                      type: "boolean",
                    },
                    disableAudioPreflight: {
                      type: "boolean",
                    },
                    groupPolicy: {
                      type: "string",
                      enum: ["open", "disabled", "allowlist"],
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    agentId: {
                      type: "string",
                    },
                    errorPolicy: {
                      type: "string",
                      enum: ["always", "once", "silent"],
                    },
                    errorCooldownMs: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                  },
                  additionalProperties: false,
                },
              },
              errorPolicy: {
                type: "string",
                enum: ["always", "once", "silent"],
              },
              errorCooldownMs: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
            },
            additionalProperties: false,
          },
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        defaultTo: {
          anyOf: [
            {
              type: "string",
            },
            {
              type: "number",
            },
          ],
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        contextVisibility: {
          type: "string",
          enum: ["all", "allowlist", "allowlist_quote"],
        },
        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,
          },
        },
        direct: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              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,
                },
              },
              skills: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              enabled: {
                type: "boolean",
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              systemPrompt: {
                type: "string",
              },
              topics: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    ingest: {
                      type: "boolean",
                    },
                    disableAudioPreflight: {
                      type: "boolean",
                    },
                    groupPolicy: {
                      type: "string",
                      enum: ["open", "disabled", "allowlist"],
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    agentId: {
                      type: "string",
                    },
                    errorPolicy: {
                      type: "string",
                      enum: ["always", "once", "silent"],
                    },
                    errorCooldownMs: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                  },
                  additionalProperties: false,
                },
              },
              errorPolicy: {
                type: "string",
                enum: ["always", "once", "silent"],
              },
              errorCooldownMs: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              requireTopic: {
                type: "boolean",
              },
              autoTopicLabel: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "object",
                    properties: {
                      enabled: {
                        type: "boolean",
                      },
                      prompt: {
                        type: "string",
                      },
                    },
                    additionalProperties: false,
                  },
                ],
              },
            },
            additionalProperties: false,
          },
        },
        textChunkLimit: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        streaming: {
          type: "object",
          properties: {
            mode: {
              type: "string",
              enum: ["off", "partial", "block", "progress"],
            },
            chunkMode: {
              type: "string",
              enum: ["length", "newline"],
            },
            preview: {
              type: "object",
              properties: {
                chunk: {
                  type: "object",
                  properties: {
                    minChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    maxChars: {
                      type: "integer",
                      exclusiveMinimum: 0,
                      maximum: 9007199254740991,
                    },
                    breakPreference: {
                      anyOf: [
                        {
                          type: "string",
                          const: "paragraph",
                        },
                        {
                          type: "string",
                          const: "newline",
                        },
                        {
                          type: "string",
                          const: "sentence",
                        },
                      ],
                    },
                  },
                  additionalProperties: false,
                },
              },
              additionalProperties: false,
            },
            block: {
              type: "object",
              properties: {
                enabled: {
                  type: "boolean",
                },
                coalesce: {
                  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,
                },
              },
              additionalProperties: false,
            },
          },
          additionalProperties: false,
        },
        mediaMaxMb: {
          type: "number",
          exclusiveMinimum: 0,
        },
        timeoutSeconds: {
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        retry: {
          type: "object",
          properties: {
            attempts: {
              type: "integer",
              minimum: 1,
              maximum: 9007199254740991,
            },
            minDelayMs: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            maxDelayMs: {
              type: "integer",
              minimum: 0,
              maximum: 9007199254740991,
            },
            jitter: {
              type: "number",
              minimum: 0,
              maximum: 1,
            },
          },
          additionalProperties: false,
        },
        network: {
          type: "object",
          properties: {
            autoSelectFamily: {
              type: "boolean",
            },
            dnsResultOrder: {
              type: "string",
              enum: ["ipv4first", "verbatim"],
            },
            dangerouslyAllowPrivateNetwork: {
              description:
                "Dangerous opt-in for trusted Telegram fake-IP or transparent-proxy environments where api.telegram.org resolves to private/internal/special-use addresses during media downloads.",
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        proxy: {
          type: "string",
        },
        webhookUrl: {
          description:
            "Public HTTPS webhook URL registered with Telegram for inbound updates. This must be internet-reachable and requires channels.telegram.webhookSecret.",
          type: "string",
        },
        webhookSecret: {
          description:
            "Secret token sent to Telegram during webhook registration and verified on inbound webhook requests. Telegram returns this value for verification; this is not the gateway auth token and not the bot token.",
          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,
                },
              ],
            },
          ],
        },
        webhookPath: {
          description:
            "Local webhook route path served by the gateway listener. Defaults to /telegram-webhook.",
          type: "string",
        },
        webhookHost: {
          description:
            "Local bind host for the webhook listener. Defaults to 127.0.0.1; keep loopback unless you intentionally expose direct ingress.",
          type: "string",
        },
        webhookPort: {
          description:
            "Local bind port for the webhook listener. Defaults to 8787; set to 0 to let the OS assign an ephemeral port.",
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        webhookCertPath: {
          description:
            "Path to the self-signed certificate (PEM) to upload to Telegram during webhook registration. Required for self-signed certs (direct IP or no domain).",
          type: "string",
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
            sendMessage: {
              type: "boolean",
            },
            poll: {
              type: "boolean",
            },
            deleteMessage: {
              type: "boolean",
            },
            editMessage: {
              type: "boolean",
            },
            sticker: {
              type: "boolean",
            },
            createForumTopic: {
              type: "boolean",
            },
            editForumTopic: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        threadBindings: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
            idleHours: {
              type: "number",
              minimum: 0,
            },
            maxAgeHours: {
              type: "number",
              minimum: 0,
            },
            spawnSubagentSessions: {
              type: "boolean",
            },
            spawnAcpSessions: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        reactionNotifications: {
          type: "string",
          enum: ["off", "own", "all"],
        },
        reactionLevel: {
          type: "string",
          enum: ["off", "ack", "minimal", "extensive"],
        },
        heartbeat: {
          type: "object",
          properties: {
            showOk: {
              type: "boolean",
            },
            showAlerts: {
              type: "boolean",
            },
            useIndicator: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        healthMonitor: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        linkPreview: {
          type: "boolean",
        },
        silentErrorReplies: {
          type: "boolean",
        },
        responsePrefix: {
          type: "string",
        },
        ackReaction: {
          type: "string",
        },
        errorPolicy: {
          type: "string",
          enum: ["always", "once", "silent"],
        },
        errorCooldownMs: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        apiRoot: {
          type: "string",
          format: "uri",
        },
        trustedLocalFileRoots: {
          description:
            "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths under these roots are read directly; all other absolute paths are rejected.",
          type: "array",
          items: {
            type: "string",
          },
        },
        autoTopicLabel: {
          anyOf: [
            {
              type: "boolean",
            },
            {
              type: "object",
              properties: {
                enabled: {
                  type: "boolean",
                },
                prompt: {
                  type: "string",
                },
              },
              additionalProperties: false,
            },
          ],
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              capabilities: {
                anyOf: [
                  {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  {
                    type: "object",
                    properties: {
                      inlineButtons: {
                        type: "string",
                        enum: ["off", "dm", "group", "all", "allowlist"],
                      },
                    },
                    additionalProperties: false,
                  },
                ],
              },
              execApprovals: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  approvers: {
                    type: "array",
                    items: {
                      anyOf: [
                        {
                          type: "string",
                        },
                        {
                          type: "number",
                        },
                      ],
                    },
                  },
                  agentFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  sessionFilter: {
                    type: "array",
                    items: {
                      type: "string",
                    },
                  },
                  target: {
                    type: "string",
                    enum: ["dm", "channel", "both"],
                  },
                },
                additionalProperties: false,
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              enabled: {
                type: "boolean",
              },
              commands: {
                type: "object",
                properties: {
                  native: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                  nativeSkills: {
                    anyOf: [
                      {
                        type: "boolean",
                      },
                      {
                        type: "string",
                        const: "auto",
                      },
                    ],
                  },
                },
                additionalProperties: false,
              },
              customCommands: {
                type: "array",
                items: {
                  type: "object",
                  properties: {
                    command: {
                      type: "string",
                    },
                    description: {
                      type: "string",
                    },
                  },
                  required: ["command", "description"],
                  additionalProperties: false,
                },
              },
              configWrites: {
                type: "boolean",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              botToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              tokenFile: {
                type: "string",
              },
              replyToMode: {
                anyOf: [
                  {
                    type: "string",
                    const: "off",
                  },
                  {
                    type: "string",
                    const: "first",
                  },
                  {
                    type: "string",
                    const: "all",
                  },
                  {
                    type: "string",
                    const: "batched",
                  },
                ],
              },
              groups: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    requireMention: {
                      type: "boolean",
                    },
                    ingest: {
                      type: "boolean",
                    },
                    disableAudioPreflight: {
                      type: "boolean",
                    },
                    groupPolicy: {
                      type: "string",
                      enum: ["open", "disabled", "allowlist"],
                    },
                    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,
                      },
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    topics: {
                      type: "object",
                      propertyNames: {
                        type: "string",
                      },
                      additionalProperties: {
                        type: "object",
                        properties: {
                          requireMention: {
                            type: "boolean",
                          },
                          ingest: {
                            type: "boolean",
                          },
                          disableAudioPreflight: {
                            type: "boolean",
                          },
                          groupPolicy: {
                            type: "string",
                            enum: ["open", "disabled", "allowlist"],
                          },
                          skills: {
                            type: "array",
                            items: {
                              type: "string",
                            },
                          },
                          enabled: {
                            type: "boolean",
                          },
                          allowFrom: {
                            type: "array",
                            items: {
                              anyOf: [
                                {
                                  type: "string",
                                },
                                {
                                  type: "number",
                                },
                              ],
                            },
                          },
                          systemPrompt: {
                            type: "string",
                          },
                          agentId: {
                            type: "string",
                          },
                          errorPolicy: {
                            type: "string",
                            enum: ["always", "once", "silent"],
                          },
                          errorCooldownMs: {
                            type: "integer",
                            minimum: 0,
                            maximum: 9007199254740991,
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                    errorPolicy: {
                      type: "string",
                      enum: ["always", "once", "silent"],
                    },
                    errorCooldownMs: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                  },
                  additionalProperties: false,
                },
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              defaultTo: {
                anyOf: [
                  {
                    type: "string",
                  },
                  {
                    type: "number",
                  },
                ],
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              contextVisibility: {
                type: "string",
                enum: ["all", "allowlist", "allowlist_quote"],
              },
              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,
                },
              },
              direct: {
                type: "object",
                propertyNames: {
                  type: "string",
                },
                additionalProperties: {
                  type: "object",
                  properties: {
                    dmPolicy: {
                      type: "string",
                      enum: ["pairing", "allowlist", "open", "disabled"],
                    },
                    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,
                      },
                    },
                    skills: {
                      type: "array",
                      items: {
                        type: "string",
                      },
                    },
                    enabled: {
                      type: "boolean",
                    },
                    allowFrom: {
                      type: "array",
                      items: {
                        anyOf: [
                          {
                            type: "string",
                          },
                          {
                            type: "number",
                          },
                        ],
                      },
                    },
                    systemPrompt: {
                      type: "string",
                    },
                    topics: {
                      type: "object",
                      propertyNames: {
                        type: "string",
                      },
                      additionalProperties: {
                        type: "object",
                        properties: {
                          requireMention: {
                            type: "boolean",
                          },
                          ingest: {
                            type: "boolean",
                          },
                          disableAudioPreflight: {
                            type: "boolean",
                          },
                          groupPolicy: {
                            type: "string",
                            enum: ["open", "disabled", "allowlist"],
                          },
                          skills: {
                            type: "array",
                            items: {
                              type: "string",
                            },
                          },
                          enabled: {
                            type: "boolean",
                          },
                          allowFrom: {
                            type: "array",
                            items: {
                              anyOf: [
                                {
                                  type: "string",
                                },
                                {
                                  type: "number",
                                },
                              ],
                            },
                          },
                          systemPrompt: {
                            type: "string",
                          },
                          agentId: {
                            type: "string",
                          },
                          errorPolicy: {
                            type: "string",
                            enum: ["always", "once", "silent"],
                          },
                          errorCooldownMs: {
                            type: "integer",
                            minimum: 0,
                            maximum: 9007199254740991,
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                    errorPolicy: {
                      type: "string",
                      enum: ["always", "once", "silent"],
                    },
                    errorCooldownMs: {
                      type: "integer",
                      minimum: 0,
                      maximum: 9007199254740991,
                    },
                    requireTopic: {
                      type: "boolean",
                    },
                    autoTopicLabel: {
                      anyOf: [
                        {
                          type: "boolean",
                        },
                        {
                          type: "object",
                          properties: {
                            enabled: {
                              type: "boolean",
                            },
                            prompt: {
                              type: "string",
                            },
                          },
                          additionalProperties: false,
                        },
                      ],
                    },
                  },
                  additionalProperties: false,
                },
              },
              textChunkLimit: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              streaming: {
                type: "object",
                properties: {
                  mode: {
                    type: "string",
                    enum: ["off", "partial", "block", "progress"],
                  },
                  chunkMode: {
                    type: "string",
                    enum: ["length", "newline"],
                  },
                  preview: {
                    type: "object",
                    properties: {
                      chunk: {
                        type: "object",
                        properties: {
                          minChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          maxChars: {
                            type: "integer",
                            exclusiveMinimum: 0,
                            maximum: 9007199254740991,
                          },
                          breakPreference: {
                            anyOf: [
                              {
                                type: "string",
                                const: "paragraph",
                              },
                              {
                                type: "string",
                                const: "newline",
                              },
                              {
                                type: "string",
                                const: "sentence",
                              },
                            ],
                          },
                        },
                        additionalProperties: false,
                      },
                    },
                    additionalProperties: false,
                  },
                  block: {
                    type: "object",
                    properties: {
                      enabled: {
                        type: "boolean",
                      },
                      coalesce: {
                        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,
                      },
                    },
                    additionalProperties: false,
                  },
                },
                additionalProperties: false,
              },
              mediaMaxMb: {
                type: "number",
                exclusiveMinimum: 0,
              },
              timeoutSeconds: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
              retry: {
                type: "object",
                properties: {
                  attempts: {
                    type: "integer",
                    minimum: 1,
                    maximum: 9007199254740991,
                  },
                  minDelayMs: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  maxDelayMs: {
                    type: "integer",
                    minimum: 0,
                    maximum: 9007199254740991,
                  },
                  jitter: {
                    type: "number",
                    minimum: 0,
                    maximum: 1,
                  },
                },
                additionalProperties: false,
              },
              network: {
                type: "object",
                properties: {
                  autoSelectFamily: {
                    type: "boolean",
                  },
                  dnsResultOrder: {
                    type: "string",
                    enum: ["ipv4first", "verbatim"],
                  },
                  dangerouslyAllowPrivateNetwork: {
                    description:
                      "Dangerous opt-in for trusted Telegram fake-IP or transparent-proxy environments where api.telegram.org resolves to private/internal/special-use addresses during media downloads.",
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              proxy: {
                type: "string",
              },
              webhookUrl: {
                description:
                  "Public HTTPS webhook URL registered with Telegram for inbound updates. This must be internet-reachable and requires channels.telegram.webhookSecret.",
                type: "string",
              },
              webhookSecret: {
                description:
                  "Secret token sent to Telegram during webhook registration and verified on inbound webhook requests. Telegram returns this value for verification; this is not the gateway auth token and not the bot token.",
                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,
                      },
                    ],
                  },
                ],
              },
              webhookPath: {
                description:
                  "Local webhook route path served by the gateway listener. Defaults to /telegram-webhook.",
                type: "string",
              },
              webhookHost: {
                description:
                  "Local bind host for the webhook listener. Defaults to 127.0.0.1; keep loopback unless you intentionally expose direct ingress.",
                type: "string",
              },
              webhookPort: {
                description:
                  "Local bind port for the webhook listener. Defaults to 8787; set to 0 to let the OS assign an ephemeral port.",
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              webhookCertPath: {
                description:
                  "Path to the self-signed certificate (PEM) to upload to Telegram during webhook registration. Required for self-signed certs (direct IP or no domain).",
                type: "string",
              },
              actions: {
                type: "object",
                properties: {
                  reactions: {
                    type: "boolean",
                  },
                  sendMessage: {
                    type: "boolean",
                  },
                  poll: {
                    type: "boolean",
                  },
                  deleteMessage: {
                    type: "boolean",
                  },
                  editMessage: {
                    type: "boolean",
                  },
                  sticker: {
                    type: "boolean",
                  },
                  createForumTopic: {
                    type: "boolean",
                  },
                  editForumTopic: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              threadBindings: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                  idleHours: {
                    type: "number",
                    minimum: 0,
                  },
                  maxAgeHours: {
                    type: "number",
                    minimum: 0,
                  },
                  spawnSubagentSessions: {
                    type: "boolean",
                  },
                  spawnAcpSessions: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              reactionNotifications: {
                type: "string",
                enum: ["off", "own", "all"],
              },
              reactionLevel: {
                type: "string",
                enum: ["off", "ack", "minimal", "extensive"],
              },
              heartbeat: {
                type: "object",
                properties: {
                  showOk: {
                    type: "boolean",
                  },
                  showAlerts: {
                    type: "boolean",
                  },
                  useIndicator: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              healthMonitor: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              linkPreview: {
                type: "boolean",
              },
              silentErrorReplies: {
                type: "boolean",
              },
              responsePrefix: {
                type: "string",
              },
              ackReaction: {
                type: "string",
              },
              errorPolicy: {
                type: "string",
                enum: ["always", "once", "silent"],
              },
              errorCooldownMs: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              apiRoot: {
                type: "string",
                format: "uri",
              },
              trustedLocalFileRoots: {
                description:
                  "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths under these roots are read directly; all other absolute paths are rejected.",
                type: "array",
                items: {
                  type: "string",
                },
              },
              autoTopicLabel: {
                anyOf: [
                  {
                    type: "boolean",
                  },
                  {
                    type: "object",
                    properties: {
                      enabled: {
                        type: "boolean",
                      },
                      prompt: {
                        type: "string",
                      },
                    },
                    additionalProperties: false,
                  },
                ],
              },
            },
            required: ["dmPolicy", "groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["dmPolicy", "groupPolicy"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "Telegram",
        help: "Telegram channel provider configuration including auth tokens, retry behavior, and message rendering controls. Use this section to tune bot behavior for Telegram-specific API semantics.",
      },
      customCommands: {
        label: "Telegram Custom Commands",
        help: "Additional Telegram bot menu commands (merged with native; conflicts ignored).",
      },
      botToken: {
        label: "Telegram Bot Token",
        help: "Telegram bot token used to authenticate Bot API requests for this account/provider config. Use secret/env substitution and rotate tokens if exposure is suspected.",
      },
      dmPolicy: {
        label: "Telegram DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.telegram.allowFrom=["*"].',
      },
      configWrites: {
        label: "Telegram Config Writes",
        help: "Allow Telegram to write config in response to channel events/commands (default: true).",
      },
      "commands.native": {
        label: "Telegram Native Commands",
        help: 'Override native commands for Telegram (bool or "auto").',
      },
      "commands.nativeSkills": {
        label: "Telegram Native Skill Commands",
        help: 'Override native skill commands for Telegram (bool or "auto").',
      },
      streaming: {
        label: "Telegram Streaming Mode",
        help: 'Unified Telegram stream preview mode: "off" | "partial" | "block" | "progress" (default: "partial"). "progress" maps to "partial" on Telegram. Legacy boolean/streamMode keys are auto-mapped.',
      },
      "streaming.mode": {
        label: "Telegram Streaming Mode",
        help: 'Canonical Telegram preview mode: "off" | "partial" | "block" | "progress" (default: "partial"). "progress" maps to "partial" on Telegram.',
      },
      "streaming.chunkMode": {
        label: "Telegram Chunk Mode",
        help: 'Chunking mode for outbound Telegram text delivery: "length" (default) or "newline".',
      },
      "streaming.block.enabled": {
        label: "Telegram Block Streaming Enabled",
        help: 'Enable chunked block-style Telegram preview delivery when channels.telegram.streaming.mode="block".',
      },
      "streaming.block.coalesce": {
        label: "Telegram Block Streaming Coalesce",
        help: "Merge streamed Telegram block replies before sending final delivery.",
      },
      "streaming.preview.chunk.minChars": {
        label: "Telegram Draft Chunk Min Chars",
        help: 'Minimum chars before emitting a Telegram block preview chunk when channels.telegram.streaming.mode="block".',
      },
      "streaming.preview.chunk.maxChars": {
        label: "Telegram Draft Chunk Max Chars",
        help: 'Target max size for a Telegram block preview chunk when channels.telegram.streaming.mode="block".',
      },
      "streaming.preview.chunk.breakPreference": {
        label: "Telegram Draft Chunk Break Preference",
        help: "Preferred breakpoints for Telegram draft chunks (paragraph | newline | sentence).",
      },
      "retry.attempts": {
        label: "Telegram Retry Attempts",
        help: "Max retry attempts for outbound Telegram API calls (default: 3).",
      },
      "retry.minDelayMs": {
        label: "Telegram Retry Min Delay (ms)",
        help: "Minimum retry delay in ms for Telegram outbound calls.",
      },
      "retry.maxDelayMs": {
        label: "Telegram Retry Max Delay (ms)",
        help: "Maximum retry delay cap in ms for Telegram outbound calls.",
      },
      "retry.jitter": {
        label: "Telegram Retry Jitter",
        help: "Jitter factor (0-1) applied to Telegram retry delays.",
      },
      "network.autoSelectFamily": {
        label: "Telegram autoSelectFamily",
        help: "Override Node autoSelectFamily for Telegram (true=enable, false=disable).",
      },
      "network.dangerouslyAllowPrivateNetwork": {
        label: "Telegram Dangerously Allow Private Network",
        help: "Dangerous opt-in for trusted fake-IP or transparent-proxy environments where Telegram media downloads resolve api.telegram.org to private/internal/special-use addresses.",
      },
      timeoutSeconds: {
        label: "Telegram API Timeout (seconds)",
        help: "Max seconds before Telegram API requests are aborted (default: 500 per grammY).",
      },
      silentErrorReplies: {
        label: "Telegram Silent Error Replies",
        help: "When true, Telegram bot replies marked as errors are sent silently (no notification sound). Default: false.",
      },
      apiRoot: {
        label: "Telegram API Root URL",
        help: "Custom Telegram Bot API root URL. Use for self-hosted Bot API servers (https://github.com/tdlib/telegram-bot-api) or reverse proxies in regions where api.telegram.org is blocked.",
      },
      trustedLocalFileRoots: {
        label: "Telegram Trusted Local File Roots",
        help: "Trusted local filesystem roots for self-hosted Telegram Bot API absolute file_path values. Only absolute paths inside these roots are read directly; all other absolute paths are rejected.",
      },
      autoTopicLabel: {
        label: "Telegram Auto Topic Label",
        help: "Auto-rename DM forum topics on first message using LLM. Default: true. Set to false to disable, or use object form { enabled: true, prompt: '...' } for custom prompt.",
      },
      "autoTopicLabel.enabled": {
        label: "Telegram Auto Topic Label Enabled",
        help: "Whether auto topic labeling is enabled. Default: true.",
      },
      "autoTopicLabel.prompt": {
        label: "Telegram Auto Topic Label Prompt",
        help: "Custom prompt for LLM-based topic naming. The user message is appended after the prompt.",
      },
      "capabilities.inlineButtons": {
        label: "Telegram Inline Buttons",
        help: "Enable Telegram inline button components for supported command and interaction surfaces. Disable if your deployment needs plain-text-only compatibility behavior.",
      },
      execApprovals: {
        label: "Telegram Exec Approvals",
        help: "Telegram-native exec approval routing and approver authorization. When unset, OpenClaw auto-enables DM-first native approvals if approvers can be resolved for the selected bot account.",
      },
      "execApprovals.enabled": {
        label: "Telegram Exec Approvals Enabled",
        help: 'Controls Telegram native exec approvals for this account: unset or "auto" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them.',
      },
      "execApprovals.approvers": {
        label: "Telegram Exec Approval Approvers",
        help: "Telegram user IDs allowed to approve exec requests for this bot account. Use numeric Telegram user IDs. If you leave this unset, OpenClaw falls back to numeric owner IDs inferred from channels.telegram.allowFrom and direct-message defaultTo when possible.",
      },
      "execApprovals.agentFilter": {
        label: "Telegram Exec Approval Agent Filter",
        help: 'Optional allowlist of agent IDs eligible for Telegram exec approvals, for example `["main", "ops-agent"]`. Use this to keep approval prompts scoped to the agents you actually operate from Telegram.',
      },
      "execApprovals.sessionFilter": {
        label: "Telegram Exec Approval Session Filter",
        help: "Optional session-key filters matched as substring or regex-style patterns before Telegram approval routing is used. Use narrow patterns so Telegram approvals only appear for intended sessions.",
      },
      "execApprovals.target": {
        label: "Telegram Exec Approval Target",
        help: 'Controls where Telegram approval prompts are sent: "dm" sends to approver DMs (default), "channel" sends to the originating Telegram chat/topic, and "both" sends to both. Channel delivery exposes the command text to the chat, so only use it in trusted groups/topics.',
      },
      "threadBindings.enabled": {
        label: "Telegram Thread Binding Enabled",
        help: "Enable Telegram conversation binding features (/focus, /unfocus, /agents, and /session idle|max-age). Overrides session.threadBindings.enabled when set.",
      },
      "threadBindings.idleHours": {
        label: "Telegram Thread Binding Idle Timeout (hours)",
        help: "Inactivity window in hours for Telegram bound sessions. Set 0 to disable idle auto-unfocus (default: 24). Overrides session.threadBindings.idleHours when set.",
      },
      "threadBindings.maxAgeHours": {
        label: "Telegram Thread Binding Max Age (hours)",
        help: "Optional hard max age in hours for Telegram bound sessions. Set 0 to disable hard cap (default: 0). Overrides session.threadBindings.maxAgeHours when set.",
      },
      "threadBindings.spawnSubagentSessions": {
        label: "Telegram Thread-Bound Subagent Spawn",
        help: "Allow subagent spawns with thread=true to auto-bind Telegram current conversations when supported.",
      },
      "threadBindings.spawnAcpSessions": {
        label: "Telegram Thread-Bound ACP Spawn",
        help: "Allow ACP spawns with thread=true to auto-bind Telegram current conversations when supported.",
      },
    },
  },
  {
    pluginId: "tlon",
    channelId: "tlon",
    label: "Tlon",
    description: "decentralized messaging on Urbit; install the plugin to enable.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        ship: {
          type: "string",
          minLength: 1,
        },
        url: {
          type: "string",
        },
        code: {
          type: "string",
        },
        network: {
          type: "object",
          properties: {
            dangerouslyAllowPrivateNetwork: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        groupChannels: {
          type: "array",
          items: {
            type: "string",
            minLength: 1,
          },
        },
        dmAllowlist: {
          type: "array",
          items: {
            type: "string",
            minLength: 1,
          },
        },
        autoDiscoverChannels: {
          type: "boolean",
        },
        showModelSignature: {
          type: "boolean",
        },
        responsePrefix: {
          type: "string",
        },
        autoAcceptDmInvites: {
          type: "boolean",
        },
        autoAcceptGroupInvites: {
          type: "boolean",
        },
        ownerShip: {
          type: "string",
          minLength: 1,
        },
        authorization: {
          type: "object",
          properties: {
            channelRules: {
              type: "object",
              propertyNames: {
                type: "string",
              },
              additionalProperties: {
                type: "object",
                properties: {
                  mode: {
                    type: "string",
                    enum: ["restricted", "open"],
                  },
                  allowedShips: {
                    type: "array",
                    items: {
                      type: "string",
                      minLength: 1,
                    },
                  },
                },
                additionalProperties: false,
              },
            },
          },
          additionalProperties: false,
        },
        defaultAuthorizedShips: {
          type: "array",
          items: {
            type: "string",
            minLength: 1,
          },
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              ship: {
                type: "string",
                minLength: 1,
              },
              url: {
                type: "string",
              },
              code: {
                type: "string",
              },
              network: {
                type: "object",
                properties: {
                  dangerouslyAllowPrivateNetwork: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              groupChannels: {
                type: "array",
                items: {
                  type: "string",
                  minLength: 1,
                },
              },
              dmAllowlist: {
                type: "array",
                items: {
                  type: "string",
                  minLength: 1,
                },
              },
              autoDiscoverChannels: {
                type: "boolean",
              },
              showModelSignature: {
                type: "boolean",
              },
              responsePrefix: {
                type: "string",
              },
              autoAcceptDmInvites: {
                type: "boolean",
              },
              autoAcceptGroupInvites: {
                type: "boolean",
              },
              ownerShip: {
                type: "string",
                minLength: 1,
              },
            },
            additionalProperties: false,
          },
        },
      },
      additionalProperties: false,
    },
  },
  {
    pluginId: "twitch",
    channelId: "twitch",
    label: "Twitch",
    description: "Twitch chat integration",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      anyOf: [
        {
          allOf: [
            {
              type: "object",
              properties: {
                name: {
                  type: "string",
                },
                enabled: {
                  type: "boolean",
                },
                markdown: {
                  type: "object",
                  properties: {
                    tables: {
                      type: "string",
                      enum: ["off", "bullets", "code", "block"],
                    },
                  },
                  additionalProperties: false,
                },
              },
              additionalProperties: false,
            },
            {
              type: "object",
              properties: {
                username: {
                  type: "string",
                },
                accessToken: {
                  type: "string",
                },
                clientId: {
                  type: "string",
                },
                channel: {
                  type: "string",
                  minLength: 1,
                },
                enabled: {
                  type: "boolean",
                },
                allowFrom: {
                  type: "array",
                  items: {
                    type: "string",
                  },
                },
                allowedRoles: {
                  type: "array",
                  items: {
                    type: "string",
                    enum: ["moderator", "owner", "vip", "subscriber", "all"],
                  },
                },
                requireMention: {
                  type: "boolean",
                },
                responsePrefix: {
                  type: "string",
                },
                clientSecret: {
                  type: "string",
                },
                refreshToken: {
                  type: "string",
                },
                expiresIn: {
                  anyOf: [
                    {
                      type: "number",
                    },
                    {
                      type: "null",
                    },
                  ],
                },
                obtainmentTimestamp: {
                  type: "number",
                },
              },
              required: ["username", "accessToken", "channel"],
              additionalProperties: false,
            },
          ],
        },
        {
          allOf: [
            {
              type: "object",
              properties: {
                name: {
                  type: "string",
                },
                enabled: {
                  type: "boolean",
                },
                markdown: {
                  type: "object",
                  properties: {
                    tables: {
                      type: "string",
                      enum: ["off", "bullets", "code", "block"],
                    },
                  },
                  additionalProperties: false,
                },
              },
              additionalProperties: false,
            },
            {
              type: "object",
              properties: {
                accounts: {
                  type: "object",
                  propertyNames: {
                    type: "string",
                  },
                  additionalProperties: {
                    type: "object",
                    properties: {
                      username: {
                        type: "string",
                      },
                      accessToken: {
                        type: "string",
                      },
                      clientId: {
                        type: "string",
                      },
                      channel: {
                        type: "string",
                        minLength: 1,
                      },
                      enabled: {
                        type: "boolean",
                      },
                      allowFrom: {
                        type: "array",
                        items: {
                          type: "string",
                        },
                      },
                      allowedRoles: {
                        type: "array",
                        items: {
                          type: "string",
                          enum: ["moderator", "owner", "vip", "subscriber", "all"],
                        },
                      },
                      requireMention: {
                        type: "boolean",
                      },
                      responsePrefix: {
                        type: "string",
                      },
                      clientSecret: {
                        type: "string",
                      },
                      refreshToken: {
                        type: "string",
                      },
                      expiresIn: {
                        anyOf: [
                          {
                            type: "number",
                          },
                          {
                            type: "null",
                          },
                        ],
                      },
                      obtainmentTimestamp: {
                        type: "number",
                      },
                    },
                    required: ["username", "accessToken", "channel"],
                    additionalProperties: false,
                  },
                },
              },
              required: ["accounts"],
              additionalProperties: false,
            },
          ],
        },
      ],
    },
  },
  {
    pluginId: "whatsapp",
    channelId: "whatsapp",
    label: "WhatsApp",
    description: "works with your own number; recommend a separate phone + eSIM.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        enabled: {
          type: "boolean",
        },
        capabilities: {
          type: "array",
          items: {
            type: "string",
          },
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        configWrites: {
          type: "boolean",
        },
        sendReadReceipts: {
          type: "boolean",
        },
        messagePrefix: {
          type: "string",
        },
        responsePrefix: {
          type: "string",
        },
        dmPolicy: {
          default: "pairing",
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        selfChatMode: {
          type: "boolean",
        },
        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"],
        },
        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,
        },
        groups: {
          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,
                },
              },
            },
            additionalProperties: false,
          },
        },
        ackReaction: {
          type: "object",
          properties: {
            emoji: {
              type: "string",
            },
            direct: {
              default: true,
              type: "boolean",
            },
            group: {
              default: "mentions",
              type: "string",
              enum: ["always", "mentions", "never"],
            },
          },
          required: ["direct", "group"],
          additionalProperties: false,
        },
        reactionLevel: {
          type: "string",
          enum: ["off", "ack", "minimal", "extensive"],
        },
        debounceMs: {
          default: 0,
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        heartbeat: {
          type: "object",
          properties: {
            showOk: {
              type: "boolean",
            },
            showAlerts: {
              type: "boolean",
            },
            useIndicator: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        healthMonitor: {
          type: "object",
          properties: {
            enabled: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
        accounts: {
          type: "object",
          propertyNames: {
            type: "string",
          },
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              capabilities: {
                type: "array",
                items: {
                  type: "string",
                },
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              configWrites: {
                type: "boolean",
              },
              sendReadReceipts: {
                type: "boolean",
              },
              messagePrefix: {
                type: "string",
              },
              responsePrefix: {
                type: "string",
              },
              dmPolicy: {
                default: "pairing",
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              selfChatMode: {
                type: "boolean",
              },
              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"],
              },
              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,
              },
              groups: {
                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,
                      },
                    },
                  },
                  additionalProperties: false,
                },
              },
              ackReaction: {
                type: "object",
                properties: {
                  emoji: {
                    type: "string",
                  },
                  direct: {
                    default: true,
                    type: "boolean",
                  },
                  group: {
                    default: "mentions",
                    type: "string",
                    enum: ["always", "mentions", "never"],
                  },
                },
                required: ["direct", "group"],
                additionalProperties: false,
              },
              reactionLevel: {
                type: "string",
                enum: ["off", "ack", "minimal", "extensive"],
              },
              debounceMs: {
                default: 0,
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              heartbeat: {
                type: "object",
                properties: {
                  showOk: {
                    type: "boolean",
                  },
                  showAlerts: {
                    type: "boolean",
                  },
                  useIndicator: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              healthMonitor: {
                type: "object",
                properties: {
                  enabled: {
                    type: "boolean",
                  },
                },
                additionalProperties: false,
              },
              name: {
                type: "string",
              },
              authDir: {
                type: "string",
              },
              mediaMaxMb: {
                type: "integer",
                exclusiveMinimum: 0,
                maximum: 9007199254740991,
              },
            },
            required: ["dmPolicy", "groupPolicy", "debounceMs"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
        mediaMaxMb: {
          default: 50,
          type: "integer",
          exclusiveMinimum: 0,
          maximum: 9007199254740991,
        },
        actions: {
          type: "object",
          properties: {
            reactions: {
              type: "boolean",
            },
            sendMessage: {
              type: "boolean",
            },
            polls: {
              type: "boolean",
            },
          },
          additionalProperties: false,
        },
      },
      required: ["dmPolicy", "groupPolicy", "debounceMs", "mediaMaxMb"],
      additionalProperties: false,
    },
    uiHints: {
      "": {
        label: "WhatsApp",
        help: "WhatsApp channel provider configuration for access policy and message batching behavior. Use this section to tune responsiveness and direct-message routing safety for WhatsApp chats.",
      },
      dmPolicy: {
        label: "WhatsApp DM Policy",
        help: 'Direct message access control ("pairing" recommended). "open" requires channels.whatsapp.allowFrom=["*"].',
      },
      selfChatMode: {
        label: "WhatsApp Self-Phone Mode",
        help: "Same-phone setup (bot uses your personal WhatsApp number).",
      },
      debounceMs: {
        label: "WhatsApp Message Debounce (ms)",
        help: "Debounce window (ms) for batching rapid consecutive messages from the same sender (0 to disable).",
      },
      configWrites: {
        label: "WhatsApp Config Writes",
        help: "Allow WhatsApp to write config in response to channel events/commands (default: true).",
      },
    },
    unsupportedSecretRefSurfacePatterns: [
      "channels.whatsapp.accounts.*.creds.json",
      "channels.whatsapp.creds.json",
    ],
  },
  {
    pluginId: "zalo",
    channelId: "zalo",
    label: "Zalo",
    description: "Vietnam-focused messaging platform with Bot API.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        botToken: {
          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,
                },
              ],
            },
          ],
        },
        tokenFile: {
          type: "string",
        },
        webhookUrl: {
          type: "string",
        },
        webhookSecret: {
          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,
                },
              ],
            },
          ],
        },
        webhookPath: {
          type: "string",
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        mediaMaxMb: {
          type: "number",
        },
        proxy: {
          type: "string",
        },
        responsePrefix: {
          type: "string",
        },
        accounts: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              botToken: {
                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,
                      },
                    ],
                  },
                ],
              },
              tokenFile: {
                type: "string",
              },
              webhookUrl: {
                type: "string",
              },
              webhookSecret: {
                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,
                      },
                    ],
                  },
                ],
              },
              webhookPath: {
                type: "string",
              },
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              mediaMaxMb: {
                type: "number",
              },
              proxy: {
                type: "string",
              },
              responsePrefix: {
                type: "string",
              },
            },
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      additionalProperties: false,
    },
  },
  {
    pluginId: "zalouser",
    channelId: "zalouser",
    label: "Zalo Personal",
    description: "Zalo personal account via QR code login.",
    schema: {
      $schema: "http://json-schema.org/draft-07/schema#",
      type: "object",
      properties: {
        name: {
          type: "string",
        },
        enabled: {
          type: "boolean",
        },
        markdown: {
          type: "object",
          properties: {
            tables: {
              type: "string",
              enum: ["off", "bullets", "code", "block"],
            },
          },
          additionalProperties: false,
        },
        profile: {
          type: "string",
        },
        dangerouslyAllowNameMatching: {
          type: "boolean",
        },
        dmPolicy: {
          type: "string",
          enum: ["pairing", "allowlist", "open", "disabled"],
        },
        allowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        historyLimit: {
          type: "integer",
          minimum: 0,
          maximum: 9007199254740991,
        },
        groupAllowFrom: {
          type: "array",
          items: {
            anyOf: [
              {
                type: "string",
              },
              {
                type: "number",
              },
            ],
          },
        },
        groupPolicy: {
          default: "allowlist",
          type: "string",
          enum: ["open", "disabled", "allowlist"],
        },
        groups: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              enabled: {
                type: "boolean",
              },
              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,
              },
            },
            additionalProperties: false,
          },
        },
        messagePrefix: {
          type: "string",
        },
        responsePrefix: {
          type: "string",
        },
        accounts: {
          type: "object",
          properties: {},
          additionalProperties: {
            type: "object",
            properties: {
              name: {
                type: "string",
              },
              enabled: {
                type: "boolean",
              },
              markdown: {
                type: "object",
                properties: {
                  tables: {
                    type: "string",
                    enum: ["off", "bullets", "code", "block"],
                  },
                },
                additionalProperties: false,
              },
              profile: {
                type: "string",
              },
              dangerouslyAllowNameMatching: {
                type: "boolean",
              },
              dmPolicy: {
                type: "string",
                enum: ["pairing", "allowlist", "open", "disabled"],
              },
              allowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              historyLimit: {
                type: "integer",
                minimum: 0,
                maximum: 9007199254740991,
              },
              groupAllowFrom: {
                type: "array",
                items: {
                  anyOf: [
                    {
                      type: "string",
                    },
                    {
                      type: "number",
                    },
                  ],
                },
              },
              groupPolicy: {
                default: "allowlist",
                type: "string",
                enum: ["open", "disabled", "allowlist"],
              },
              groups: {
                type: "object",
                properties: {},
                additionalProperties: {
                  type: "object",
                  properties: {
                    enabled: {
                      type: "boolean",
                    },
                    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,
                    },
                  },
                  additionalProperties: false,
                },
              },
              messagePrefix: {
                type: "string",
              },
              responsePrefix: {
                type: "string",
              },
            },
            required: ["groupPolicy"],
            additionalProperties: false,
          },
        },
        defaultAccount: {
          type: "string",
        },
      },
      required: ["groupPolicy"],
      additionalProperties: false,
    },
  },
] as const;
