Refactor: Clean up obsolete files and organize codebase structure
This commit removes deprecated modules and reorganizes code into logical directories: Deleted files (superseded by newer systems): - claude_code_server.py (replaced by agent-sdk direct integration) - heartbeat.py (superseded by scheduled_tasks.py) - pulse_brain.py (unused in production) - config/pulse_brain_config.py (obsolete config) Created directory structure: - examples/ (7 example files: example_*.py, demo_*.py) - tests/ (5 test files: test_*.py) Updated imports: - agent.py: Removed heartbeat module and all enable_heartbeat logic - bot_runner.py: Removed heartbeat parameter from Agent initialization - llm_interface.py: Updated deprecated claude_code_server message Preserved essential files: - hooks.py (for future use) - adapters/skill_integration.py (for future use) - All Google integration tools (Gmail, Calendar, Contacts) - GLM provider code (backward compatibility) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
137
pyproject.toml
Normal file
137
pyproject.toml
Normal file
@@ -0,0 +1,137 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=68.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "ajarbot"
|
||||
version = "0.2.0"
|
||||
description = "Multi-platform AI agent powered by Claude with memory, tools, and scheduling"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
license = {text = "MIT"}
|
||||
authors = [
|
||||
{name = "Ajarbot Team"}
|
||||
]
|
||||
keywords = ["ai", "agent", "claude", "slack", "telegram", "chatbot", "assistant"]
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Operating System :: OS Independent",
|
||||
"Topic :: Communications :: Chat",
|
||||
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||
]
|
||||
|
||||
# Core dependencies (always installed)
|
||||
dependencies = [
|
||||
"watchdog>=3.0.0",
|
||||
"anthropic>=0.40.0",
|
||||
"requests>=2.31.0",
|
||||
"fastembed>=0.7.0",
|
||||
"usearch>=2.23.0",
|
||||
"numpy>=2.0.0",
|
||||
"pyyaml>=6.0.1",
|
||||
"python-dotenv>=1.0.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
# Slack adapter dependencies
|
||||
slack = [
|
||||
"slack-bolt>=1.18.0",
|
||||
"slack-sdk>=3.23.0",
|
||||
]
|
||||
|
||||
# Telegram adapter dependencies
|
||||
telegram = [
|
||||
"python-telegram-bot>=20.7",
|
||||
]
|
||||
|
||||
# Google integration (Gmail + Calendar)
|
||||
google = [
|
||||
"google-auth>=2.23.0",
|
||||
"google-auth-oauthlib>=1.1.0",
|
||||
"google-auth-httplib2>=0.1.1",
|
||||
"google-api-python-client>=2.108.0",
|
||||
]
|
||||
|
||||
# Agent SDK mode (uses Claude Pro subscription)
|
||||
agent-sdk = [
|
||||
"claude-code-sdk>=0.1.0",
|
||||
"fastapi>=0.109.0",
|
||||
"uvicorn>=0.27.0",
|
||||
]
|
||||
|
||||
# All optional dependencies
|
||||
all = [
|
||||
"slack-bolt>=1.18.0",
|
||||
"slack-sdk>=3.23.0",
|
||||
"python-telegram-bot>=20.7",
|
||||
"google-auth>=2.23.0",
|
||||
"google-auth-oauthlib>=1.1.0",
|
||||
"google-auth-httplib2>=0.1.1",
|
||||
"google-api-python-client>=2.108.0",
|
||||
"claude-code-sdk>=0.1.0",
|
||||
"fastapi>=0.109.0",
|
||||
"uvicorn>=0.27.0",
|
||||
]
|
||||
|
||||
# Development dependencies
|
||||
dev = [
|
||||
"pytest>=7.4.0",
|
||||
"black>=23.0.0",
|
||||
"ruff>=0.1.0",
|
||||
"mypy>=1.5.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/yourusername/ajarbot"
|
||||
Documentation = "https://github.com/yourusername/ajarbot#readme"
|
||||
Repository = "https://github.com/yourusername/ajarbot"
|
||||
Issues = "https://github.com/yourusername/ajarbot/issues"
|
||||
|
||||
[project.scripts]
|
||||
# Main entry point - runs ajarbot.py
|
||||
ajarbot = "ajarbot:main"
|
||||
|
||||
[tool.setuptools]
|
||||
# Auto-discover packages
|
||||
packages = ["config", "adapters", "adapters.slack", "adapters.telegram", "google_tools"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
# Include YAML config templates
|
||||
config = ["*.yaml"]
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
target-version = ["py310", "py311", "py312"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
target-version = "py310"
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
]
|
||||
ignore = [
|
||||
"E501", # line too long (handled by black)
|
||||
"B008", # do not perform function calls in argument defaults
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.10"
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
disallow_untyped_defs = false
|
||||
disallow_incomplete_defs = false
|
||||
check_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
Reference in New Issue
Block a user