From 47cebb820f5da6c81ac7e6374d5736110e886b64 Mon Sep 17 00:00:00 2001 From: biwasbhandari Date: Wed, 18 Mar 2026 07:41:03 +0545 Subject: [PATCH 1/2] docs: flag repository for archive --- CLAUDE.md | 134 +----------------------------------------------------- README.md | 2 + 2 files changed, 3 insertions(+), 133 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 21acc3f3..71ee291e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,133 +1 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Essential Commands - -### Python Development -```bash -# Start the web server (main API) -uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload - -# Start worker mode (background services) -python -m app.worker - -# Format and lint code -ruff format . -ruff check . - -# Type checking -typos # Check for typos - -# Run tests -pytest # Testing framework - -# Install dependencies -uv sync # UV package manager -source .venv/bin/activate # Activate virtual environment - -# Install TypeScript tools -cd agent-tools-ts/ && bun install && cd .. -``` - -### TypeScript Tools (agent-tools-ts/) -```bash -# Build TypeScript tools -bun run build - -# Development mode with watch -bun run dev - -# Type checking -bun run typecheck - -# Run tests (currently skipped) -bun run test -``` - -## Architecture Overview - -### Dual-Mode System -The application operates in two distinct modes: - -1. **Web Server Mode** (`app/main.py`): FastAPI application with CORS, WebSocket chat endpoint, RESTful APIs, and health monitoring -2. **Worker Mode** (`app/worker.py`): Background job processing, Telegram bot integration, system metrics monitoring - -### Service Layer Structure -- **API Layer** (`app/api/`): REST endpoints for agents, DAOs, tools, webhooks, profiles -- **Services** (`app/services/`): Core business logic organized by domain - - `ai/`: AI workflows, embeddings, LLM processing, evaluation - - `communication/`: Discord, Telegram, Twitter integrations - - `core/`: DAO service and core business logic - - `infrastructure/`: Job management, scheduling, startup services - - `integrations/`: External APIs (Hiro, webhooks, chainhook handlers) - - `processing/`: Data processing services -- **Backend Layer** (`app/backend/`): Data persistence with Supabase integration -- **Tools** (`app/tools/`): Domain-specific utilities for agent accounts, DAOs, DEX trading, wallets - -### Key Components - -#### Job Management System -Advanced job processing system with auto-discovery, monitoring, and background task execution located in `app/services/infrastructure/job_management/`. - -#### Webhook Handlers -Sophisticated blockchain event processing system in `app/services/integrations/webhooks/chainhook/` with handlers for: -- DAO proposals and voting -- Trading events (buy/sell) -- Airdrop processing -- Block state monitoring - -#### TypeScript Tools Integration -The `agent-tools-ts/` submodule provides blockchain interaction utilities for: -- Stacks blockchain operations -- DEX trading (Faktory, Bitflow, Alex, Jing) -- DAO contract deployments -- Agent account management -- Wallet operations - -## Development Practices - -### Code Style -- Follow Cursor rules in `.cursor/rules/global.mdc` -- Use `ruff` for formatting with double quotes and 4-space indentation -- Type hints required for all functions -- Google-style docstrings -- Snake_case for variables/functions, PascalCase for classes - -### Environment Setup -- Python 3.13+ required -- UV for dependency management (`uv.lock`) -- Bun for TypeScript tools -- Environment configuration via `.env` file - -### Testing -- Use `pytest` for Python testing -- TypeScript tests currently skipped -- Run tests before commits - -### Configuration -Environment variables are organized in `app/config.py` with dataclasses for: -- Database (Supabase) -- Twitter/X integration -- Backend wallet operations -- Various service configurations - -## Important Notes - -### Security -- Never commit sensitive information (API keys, seed phrases) -- Use environment variables for all secrets -- Validate all user inputs - -### Dependencies -- Python dependencies managed via `pyproject.toml` and UV -- TypeScript dependencies in `agent-tools-ts/package.json` -- Git submodule for agent-tools-ts integration - -### Blockchain Integration -The system is deeply integrated with Stacks blockchain: -- Native Stacks network support (mainnet/testnet) -- DAO proposal management and voting -- DEX trading across multiple platforms -- Agent account autonomous operations -- Transaction processing and event handling \ No newline at end of file +> **⚠️ This repository is scheduled for archive.** This project has been retired. diff --git a/README.md b/README.md index 59f51f5d..5ac7c881 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +> **⚠️ This repository is scheduled for archive.** This project has been retired. + # aibtcdev-backend [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) From 5a87883c1668f7bebf69703a192d98c805da554d Mon Sep 17 00:00:00 2001 From: biwasbhandari Date: Wed, 18 Mar 2026 07:58:29 +0545 Subject: [PATCH 2/2] style: fix ruff formatting in twitter_service.py --- app/services/communication/twitter_service.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/services/communication/twitter_service.py b/app/services/communication/twitter_service.py index f556e3ad..d937a2e2 100644 --- a/app/services/communication/twitter_service.py +++ b/app/services/communication/twitter_service.py @@ -775,9 +775,11 @@ async def get_conversation_context( # Sort replies by creation time replies.sort( - key=lambda x: x.created_at - if hasattr(x, "created_at") and x.created_at - else "" + key=lambda x: ( + x.created_at + if hasattr(x, "created_at") and x.created_at + else "" + ) ) return { @@ -817,9 +819,11 @@ async def get_conversation_context( # Sort all tweets by creation time all_tweets = [original_tweet] + all_conversation_tweets all_tweets.sort( - key=lambda x: x.created_at - if hasattr(x, "created_at") and x.created_at - else "" + key=lambda x: ( + x.created_at + if hasattr(x, "created_at") and x.created_at + else "" + ) ) # Find the position of the target tweet @@ -925,9 +929,9 @@ async def get_tweet_replies(self, tweet_id: str) -> List[tweepy.Tweet]: # Sort by creation time replies.sort( - key=lambda x: x.created_at - if hasattr(x, "created_at") and x.created_at - else "" + key=lambda x: ( + x.created_at if hasattr(x, "created_at") and x.created_at else "" + ) ) logger.info(f"Found {len(replies)} replies to tweet {tweet_id}")