webex-bot-ai 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- webex_bot_ai-0.1.0/.dockerignore +32 -0
- webex_bot_ai-0.1.0/.env.example +125 -0
- webex_bot_ai-0.1.0/.github/workflows/docker-publish.yml +69 -0
- webex_bot_ai-0.1.0/.github/workflows/publish.yml +33 -0
- webex_bot_ai-0.1.0/.github/workflows/release.yml +36 -0
- webex_bot_ai-0.1.0/.github/workflows/test.yml +32 -0
- webex_bot_ai-0.1.0/.gitignore +236 -0
- webex_bot_ai-0.1.0/.pre-commit-config.yaml +15 -0
- webex_bot_ai-0.1.0/CHANGELOG.md +5 -0
- webex_bot_ai-0.1.0/Dockerfile +43 -0
- webex_bot_ai-0.1.0/LICENSE +21 -0
- webex_bot_ai-0.1.0/MANIFEST.in +3 -0
- webex_bot_ai-0.1.0/PKG-INFO +252 -0
- webex_bot_ai-0.1.0/README.md +217 -0
- webex_bot_ai-0.1.0/pyproject.toml +130 -0
- webex_bot_ai-0.1.0/src/__init__.py +1 -0
- webex_bot_ai-0.1.0/src/commands/__init__.py +5 -0
- webex_bot_ai-0.1.0/src/commands/ai.py +653 -0
- webex_bot_ai-0.1.0/src/config.py +293 -0
- webex_bot_ai-0.1.0/src/conversation/__init__.py +7 -0
- webex_bot_ai-0.1.0/src/conversation/manager.py +387 -0
- webex_bot_ai-0.1.0/src/conversation/persistence.py +260 -0
- webex_bot_ai-0.1.0/src/conversation/types.py +19 -0
- webex_bot_ai-0.1.0/src/main.py +231 -0
- webex_bot_ai-0.1.0/src/mcp/__init__.py +6 -0
- webex_bot_ai-0.1.0/src/mcp/client.py +278 -0
- webex_bot_ai-0.1.0/src/mcp/types.py +54 -0
- webex_bot_ai-0.1.0/src/sentry.py +170 -0
- webex_bot_ai-0.1.0/uv.lock +2367 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Docker ignore file to reduce build context size
|
|
2
|
+
**/__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.so
|
|
8
|
+
.git
|
|
9
|
+
.gitignore
|
|
10
|
+
.github
|
|
11
|
+
.vscode
|
|
12
|
+
.idea
|
|
13
|
+
*.md
|
|
14
|
+
!README.md
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
!.env.example
|
|
18
|
+
*.log
|
|
19
|
+
.coverage
|
|
20
|
+
.pytest_cache
|
|
21
|
+
.mypy_cache
|
|
22
|
+
dist/
|
|
23
|
+
build/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
screenshots/
|
|
26
|
+
docker-compose.yml
|
|
27
|
+
Dockerfile*
|
|
28
|
+
*.tar
|
|
29
|
+
*.zip
|
|
30
|
+
.venv/
|
|
31
|
+
venv/
|
|
32
|
+
.ruff_cache/
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Webex AI Bot Configuration
|
|
2
|
+
# Copy this file to .env and configure your values
|
|
3
|
+
|
|
4
|
+
# ==============================================================================
|
|
5
|
+
# REQUIRED: Webex Bot Settings
|
|
6
|
+
# ==============================================================================
|
|
7
|
+
|
|
8
|
+
# Your Webex bot access token (get from developer.webex.com)
|
|
9
|
+
WEBEX_ACCESS_TOKEN=your_webex_bot_token_here
|
|
10
|
+
|
|
11
|
+
# ==============================================================================
|
|
12
|
+
# REQUIRED: LLM Provider Settings
|
|
13
|
+
# ==============================================================================
|
|
14
|
+
|
|
15
|
+
# For OpenAI models (gpt-4o-mini, gpt-4o, etc.)
|
|
16
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
|
17
|
+
|
|
18
|
+
# OR for other providers via LiteLLM:
|
|
19
|
+
# - Ollama: No API key needed for local models
|
|
20
|
+
# - OpenRouter: Set OPENROUTER_API_KEY
|
|
21
|
+
# - Anthropic: Set ANTHROPIC_API_KEY
|
|
22
|
+
# - Azure: Set AZURE_API_KEY, AZURE_API_BASE, AZURE_API_VERSION
|
|
23
|
+
|
|
24
|
+
# ==============================================================================
|
|
25
|
+
# OPTIONAL: Bot Identity
|
|
26
|
+
# ==============================================================================
|
|
27
|
+
|
|
28
|
+
# Bot name for mention handling (extracted from email if not set)
|
|
29
|
+
# BOT_NAME=Assistant
|
|
30
|
+
|
|
31
|
+
# Display name shown in Webex
|
|
32
|
+
# BOT_DISPLAY_NAME=AI Assistant
|
|
33
|
+
|
|
34
|
+
# ==============================================================================
|
|
35
|
+
# OPTIONAL: Webex Access Control
|
|
36
|
+
# ==============================================================================
|
|
37
|
+
|
|
38
|
+
# Comma-separated list of approved user emails
|
|
39
|
+
# WEBEX_APPROVED_USERS=user1@example.com,user2@example.com
|
|
40
|
+
|
|
41
|
+
# Comma-separated list of approved email domains
|
|
42
|
+
# WEBEX_APPROVED_DOMAINS=example.com,company.com
|
|
43
|
+
|
|
44
|
+
# Comma-separated list of approved room IDs
|
|
45
|
+
# WEBEX_APPROVED_ROOMS=room_id_1,room_id_2
|
|
46
|
+
|
|
47
|
+
# ==============================================================================
|
|
48
|
+
# OPTIONAL: LLM Configuration
|
|
49
|
+
# ==============================================================================
|
|
50
|
+
|
|
51
|
+
# Model to use (LiteLLM format)
|
|
52
|
+
# Examples:
|
|
53
|
+
# gpt-4o-mini - OpenAI GPT-4o Mini
|
|
54
|
+
# gpt-4o - OpenAI GPT-4o
|
|
55
|
+
# ollama_chat/gpt-oss:120b - Ollama GPT OSS 120B
|
|
56
|
+
# ollama_chat/qwen3:32b - Ollama Qwen 3 32B
|
|
57
|
+
# openrouter/meta-llama/llama-3.1-70b-instruct - OpenRouter
|
|
58
|
+
# LLM_MODEL=gpt-4o-mini
|
|
59
|
+
|
|
60
|
+
# Temperature (0.0 - 2.0, affects response randomness)
|
|
61
|
+
# LLM_TEMPERATURE=0.7
|
|
62
|
+
|
|
63
|
+
# Maximum tokens in response
|
|
64
|
+
# LLM_MAX_TOKENS=2048
|
|
65
|
+
|
|
66
|
+
# Custom API base URL (for self-hosted models or proxies)
|
|
67
|
+
# LLM_API_BASE=http://localhost:11434
|
|
68
|
+
|
|
69
|
+
# API key for LLM (alternative to provider-specific keys)
|
|
70
|
+
# LLM_API_KEY=your_api_key_here
|
|
71
|
+
|
|
72
|
+
# Custom system prompt (template with {bot_name} placeholder)
|
|
73
|
+
# LLM_SYSTEM_PROMPT=You are {bot_name}, a helpful AI assistant...
|
|
74
|
+
|
|
75
|
+
# ==============================================================================
|
|
76
|
+
# OPTIONAL: Conversation Management
|
|
77
|
+
# ==============================================================================
|
|
78
|
+
|
|
79
|
+
# Maximum messages to keep per thread
|
|
80
|
+
# CONVERSATION_MAX_HISTORY_MESSAGES=50
|
|
81
|
+
|
|
82
|
+
# Hours before conversation is considered stale
|
|
83
|
+
# CONVERSATION_TIMEOUT_HOURS=24
|
|
84
|
+
|
|
85
|
+
# Path to SQLite database file for storing conversation history
|
|
86
|
+
# CONVERSATION_DB_PATH=conversations.db
|
|
87
|
+
|
|
88
|
+
# Enable or disable conversation persistence to database
|
|
89
|
+
# CONVERSATION_ENABLE_PERSISTENCE=true
|
|
90
|
+
|
|
91
|
+
# ==============================================================================
|
|
92
|
+
# OPTIONAL: MCP (Model Context Protocol) Integration
|
|
93
|
+
# ==============================================================================
|
|
94
|
+
|
|
95
|
+
# Enable MCP integration
|
|
96
|
+
# MCP_ENABLED=false
|
|
97
|
+
|
|
98
|
+
# Request timeout in seconds for MCP operations
|
|
99
|
+
# MCP_REQUEST_TIMEOUT=30
|
|
100
|
+
|
|
101
|
+
# MCP Servers configuration (JSON array)
|
|
102
|
+
# Each server needs: name, url, and optionally: headers, auth_token, enabled
|
|
103
|
+
#
|
|
104
|
+
# Example - single server:
|
|
105
|
+
# MCP_SERVERS=[{"name": "my-mcp-server", "url": "http://localhost:8000/mcp", "enabled": true}]
|
|
106
|
+
#
|
|
107
|
+
# Example - server with authentication:
|
|
108
|
+
# MCP_SERVERS=[{"name": "secure-server", "url": "https://api.example.com/mcp", "auth_token": "your-token", "enabled": true}]
|
|
109
|
+
#
|
|
110
|
+
# Example - multiple servers:
|
|
111
|
+
# MCP_SERVERS=[{"name": "server1", "url": "http://localhost:8000/mcp"}, {"name": "server2", "url": "http://localhost:8001/mcp"}]
|
|
112
|
+
#
|
|
113
|
+
# MCP_SERVERS=[]
|
|
114
|
+
|
|
115
|
+
# Sentry Error Tracking (Optional)
|
|
116
|
+
# Set SENTRY_DSN to enable error tracking and performance monitoring
|
|
117
|
+
# SENTRY_DSN=https://your-key@o12345.ingest.us.sentry.io/6789
|
|
118
|
+
# Optional Sentry configuration
|
|
119
|
+
# SENTRY_TRACES_SAMPLE_RATE=1.0
|
|
120
|
+
# SENTRY_SEND_DEFAULT_PII=true
|
|
121
|
+
# SENTRY_ENVIRONMENT=production
|
|
122
|
+
# SENTRY_RELEASE=1.2.3
|
|
123
|
+
# SENTRY_PROFILE_SESSION_SAMPLE_RATE=1.0
|
|
124
|
+
# SENTRY_PROFILE_LIFECYCLE=trace
|
|
125
|
+
# SENTRY_ENABLE_LOGS=true
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Docker Multi-arch Build and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
tags: ["v*.*.*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: ["main"]
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
REGISTRY: ghcr.io
|
|
12
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build-and-push:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
packages: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v6
|
|
24
|
+
|
|
25
|
+
- name: Set up QEMU
|
|
26
|
+
uses: docker/setup-qemu-action@v3
|
|
27
|
+
|
|
28
|
+
- name: Set up Docker Buildx
|
|
29
|
+
uses: docker/setup-buildx-action@v3
|
|
30
|
+
|
|
31
|
+
- name: Log in to GitHub Container Registry
|
|
32
|
+
if: github.event_name != 'pull_request'
|
|
33
|
+
uses: docker/login-action@v3
|
|
34
|
+
with:
|
|
35
|
+
registry: ${{ env.REGISTRY }}
|
|
36
|
+
username: ${{ github.actor }}
|
|
37
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
|
|
39
|
+
- name: Extract metadata for Docker
|
|
40
|
+
id: meta
|
|
41
|
+
uses: docker/metadata-action@v5
|
|
42
|
+
with:
|
|
43
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
44
|
+
tags: |
|
|
45
|
+
# Set latest tag for main branch
|
|
46
|
+
type=raw,value=latest,enable={{is_default_branch}}
|
|
47
|
+
# Tag with branch name (e.g., main, develop)
|
|
48
|
+
type=ref,event=branch
|
|
49
|
+
# Tag with PR number (e.g., pr-2)
|
|
50
|
+
type=ref,event=pr
|
|
51
|
+
# Tag with semver - v1.2.3 -> 1.2.3
|
|
52
|
+
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
53
|
+
# Tag with major.minor - v1.2.3 -> 1.2
|
|
54
|
+
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
55
|
+
# Tag with major - v1.2.3 -> 1
|
|
56
|
+
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
57
|
+
# Tag with git sha
|
|
58
|
+
type=sha,format=short
|
|
59
|
+
|
|
60
|
+
- name: Build and push Docker image
|
|
61
|
+
uses: docker/build-push-action@v6
|
|
62
|
+
with:
|
|
63
|
+
context: .
|
|
64
|
+
platforms: linux/amd64
|
|
65
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
66
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
67
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
68
|
+
cache-from: type=gha
|
|
69
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment:
|
|
12
|
+
name: pypi
|
|
13
|
+
url: https://pypi.org/p/webex-bot-ai
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write # Mandatory for Trusted Publishing
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Install the latest version of uv and set the python version
|
|
22
|
+
uses: astral-sh/setup-uv@v7
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.13'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --locked --all-extras --no-dev
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
create-release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
outputs:
|
|
14
|
+
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
15
|
+
tag_name: ${{ steps.get_version.outputs.tag_name }}
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Get version from tag
|
|
22
|
+
id: get_version
|
|
23
|
+
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
24
|
+
|
|
25
|
+
- name: Create Release
|
|
26
|
+
id: create_release
|
|
27
|
+
uses: softprops/action-gh-release@v2
|
|
28
|
+
with:
|
|
29
|
+
tag_name: ${{ steps.get_version.outputs.tag_name }}
|
|
30
|
+
name: ${{ steps.get_version.outputs.tag_name }}
|
|
31
|
+
generate_release_notes: true
|
|
32
|
+
append_body: true
|
|
33
|
+
body: |
|
|
34
|
+
## Docker Images
|
|
35
|
+
- `ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.tag_name }}`
|
|
36
|
+
prerelease: ${{ contains(steps.get_version.outputs.tag_name, '-') }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Test & Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
- push
|
|
5
|
+
- pull_request
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
|
|
20
|
+
- name: Install the latest version of uv and set the python version
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync --locked --all-extras --all-groups
|
|
27
|
+
|
|
28
|
+
- name: Run ruff linter
|
|
29
|
+
run: uv run ruff check .
|
|
30
|
+
|
|
31
|
+
- name: Run ruff formatter
|
|
32
|
+
run: uv run ruff format --check .
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be added to the global gitignore or merged into this project gitignore. For a JetBrains IDE
|
|
158
|
+
# it is recommended to use a global gitignore:
|
|
159
|
+
# https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# JetBrains IDEs
|
|
161
|
+
.idea/
|
|
162
|
+
|
|
163
|
+
# VS Code
|
|
164
|
+
.vscode/
|
|
165
|
+
!.vscode/tasks.json
|
|
166
|
+
!.vscode/launch.json
|
|
167
|
+
!.vscode/extensions.json
|
|
168
|
+
!.vscode/settings.json
|
|
169
|
+
|
|
170
|
+
# Project specific
|
|
171
|
+
# Environment files
|
|
172
|
+
.env.local
|
|
173
|
+
.env.production
|
|
174
|
+
.env.development
|
|
175
|
+
|
|
176
|
+
# Logs
|
|
177
|
+
*.log
|
|
178
|
+
logs/
|
|
179
|
+
|
|
180
|
+
# Temporary files
|
|
181
|
+
*.tmp
|
|
182
|
+
*.temp
|
|
183
|
+
temp/
|
|
184
|
+
tmp/
|
|
185
|
+
|
|
186
|
+
# Backup files
|
|
187
|
+
*.backup
|
|
188
|
+
*.bak
|
|
189
|
+
backups/
|
|
190
|
+
|
|
191
|
+
# SSL Certificates (if stored locally)
|
|
192
|
+
*.pem
|
|
193
|
+
*.key
|
|
194
|
+
*.crt
|
|
195
|
+
*.cert
|
|
196
|
+
certificates/
|
|
197
|
+
|
|
198
|
+
# Test outputs
|
|
199
|
+
test_results/
|
|
200
|
+
test_output/
|
|
201
|
+
|
|
202
|
+
# Documentation builds
|
|
203
|
+
docs/_build/
|
|
204
|
+
docs/build/
|
|
205
|
+
|
|
206
|
+
# MacOS
|
|
207
|
+
.DS_Store
|
|
208
|
+
.AppleDouble
|
|
209
|
+
.LSOverride
|
|
210
|
+
|
|
211
|
+
# Windows
|
|
212
|
+
Thumbs.db
|
|
213
|
+
ehthumbs.db
|
|
214
|
+
Desktop.ini
|
|
215
|
+
|
|
216
|
+
# Linux
|
|
217
|
+
*~
|
|
218
|
+
|
|
219
|
+
# UV specific
|
|
220
|
+
.uv/
|
|
221
|
+
|
|
222
|
+
# Runtime files
|
|
223
|
+
*.pid
|
|
224
|
+
*.sock
|
|
225
|
+
|
|
226
|
+
# Database files (if any)
|
|
227
|
+
*.db
|
|
228
|
+
*.sqlite
|
|
229
|
+
*.sqlite3
|
|
230
|
+
|
|
231
|
+
# Cache directories
|
|
232
|
+
.cache/
|
|
233
|
+
cache/
|
|
234
|
+
|
|
235
|
+
# ruff cache
|
|
236
|
+
.ruff_cache/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- hooks:
|
|
3
|
+
- args:
|
|
4
|
+
- --fix
|
|
5
|
+
id: ruff-check
|
|
6
|
+
- id: ruff-format
|
|
7
|
+
repo: https://github.com/astral-sh/ruff-pre-commit
|
|
8
|
+
rev: v0.14.10
|
|
9
|
+
- hooks:
|
|
10
|
+
- id: commitizen
|
|
11
|
+
- id: commitizen-branch
|
|
12
|
+
stages:
|
|
13
|
+
- pre-push
|
|
14
|
+
repo: https://github.com/commitizen-tools/commitizen
|
|
15
|
+
rev: v4.11.0
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
FROM python:3.13-alpine3.23 AS builder
|
|
2
|
+
|
|
3
|
+
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade pip \
|
|
4
|
+
&& pip install --root-user-action=ignore --no-cache-dir uv
|
|
5
|
+
|
|
6
|
+
ENV UV_LINK_MODE=copy
|
|
7
|
+
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
11
|
+
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
12
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
13
|
+
uv sync --locked --all-extras --no-install-project --no-dev
|
|
14
|
+
|
|
15
|
+
COPY pyproject.toml uv.lock LICENSE README.md ./
|
|
16
|
+
COPY src/ ./src/
|
|
17
|
+
|
|
18
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
19
|
+
uv sync --locked --all-extras --no-dev
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
FROM python:3.13-alpine3.23
|
|
23
|
+
LABEL org.opencontainers.image.title="Webex Bot AI" \
|
|
24
|
+
org.opencontainers.image.description="AI-powered Webex Bot" \
|
|
25
|
+
org.opencontainers.image.url="https://github.com/mhajder/webex-bot-ai" \
|
|
26
|
+
org.opencontainers.image.source="https://github.com/mhajder/webex-bot-ai" \
|
|
27
|
+
org.opencontainers.image.vendor="Mateusz Hajder" \
|
|
28
|
+
org.opencontainers.image.licenses="MIT"
|
|
29
|
+
ENV PYTHONUNBUFFERED=1
|
|
30
|
+
|
|
31
|
+
RUN apk add --no-cache ca-certificates \
|
|
32
|
+
&& addgroup -g 1000 appuser \
|
|
33
|
+
&& adduser -D -u 1000 -G appuser appuser
|
|
34
|
+
|
|
35
|
+
COPY --from=builder --chown=appuser:appuser /app /app
|
|
36
|
+
|
|
37
|
+
WORKDIR /app
|
|
38
|
+
|
|
39
|
+
USER appuser
|
|
40
|
+
|
|
41
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
42
|
+
|
|
43
|
+
ENTRYPOINT ["webex-bot-ai"]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Mateusz Hajder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|