-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
92 lines (83 loc) · 3.55 KB
/
config.example.yaml
File metadata and controls
92 lines (83 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# SlackServer Configuration Example
slack:
appToken: "xapp-1-..." # Socket Mode app-level token (starts with xapp-)
botToken: "xoxb-..." # Bot user OAuth token (starts with xoxb-)
logLevel: "Information" # Debug | Information | Warning | Error
# Bot configurations
bots:
# =================================================================
# QUICK START: Question Bot that responds to @mentions
# =================================================================
# 1. Replace C01234ABCDE with your channel ID
# 2. Invite your bot to the channel: /invite @YourBotName
# 3. Run: dotnet run
# 4. Test: @YourBotName what is the weather?
- name: "Question Bot"
description: "Responds when @mentioned - integrates with your CLI tools"
type: channel
channelId: "C01234ABCDE" # ⚠️ CHANGE THIS to your channel ID
messagePattern: "<@\\w+>\\s+.*" # Matches "@bot_name question"
script: "pwsh ./scripts/question-bot.ps1"
timeout: 30
# =================================================================
# TEST BOTS - Demo various response types
# =================================================================
# PowerShell Test Bot - demonstrates all response types
- name: "PowerShell Test Bot"
description: "Demonstrates various Slack response types using PowerShell"
type: channel # channel | bot_dm | all
channelId: "C01234ABCDE" # Required for type: channel
messagePattern: "^test ps" # Regex: matches "test ps" at start
script: "pwsh ./scripts/test-bot.ps1"
workingDirectory: null # Uses app directory
timeout: 30
# C# Test Bot - shows message analysis and rich formatting
- name: "C# Test Bot"
description: "Demonstrates Slack responses using C# CLI"
type: channel
channelId: "C01234ABCDE"
messagePattern: "^test cs" # Regex: matches "test cs" at start
script: "dotnet run --project ./TestBotCli --no-build -c Release"
timeout: 30
# Deploy Bot Example
- name: "Deploy Bot"
description: "Handles deployment commands"
type: channel
channelId: "C9876DEPLOY"
messagePattern: "^deploy (staging|production)"
script: "pwsh ./scripts/deploy.ps1"
workingDirectory: "C:\\Projects\\MyApp"
timeout: 300
environment:
DEPLOY_TARGET: "production"
# AI Assistant Bot Example (responds to DMs)
- name: "AI Assistant"
description: "General purpose AI assistant in DMs"
type: bot_dm # Only responds to direct messages
messagePattern: ".*" # Matches any message
script: "python ./bots/ai-assistant/main.py"
timeout: 60
environment:
OPENAI_API_KEY: "${OPENAI_API_KEY}" # Can reference environment variables
# Health Check Bot Example
- name: "Health Check"
description: "Checks system health"
type: bot_dm
messagePattern: "^(health|status)"
script: "pwsh ./scripts/health-check.ps1"
timeout: 10
# GitHub Notification Bot Example
- name: "GitHub Bot"
description: "GitHub webhook handler"
type: channel
channelId: "C1234GITHUB"
messagePattern: "gh\\s+(\\S+)\\s+(\\S+)" # gh owner/repo command
script: "python ./bots/github/handler.py"
timeout: 30
# General Help Bot (responds everywhere)
- name: "Help Bot"
description: "Provides help information"
type: all # Responds to channels and DMs
messagePattern: "^(help|\\?)"
script: "pwsh ./scripts/help.ps1"
timeout: 5