Telegram orchestrator for running Codex single/multi-agent workflows
Project description
codex-orchestrator
Telegram Bot에서 Codex 워크플로우(single/multi)를 실행하기 위한 Python 오케스트레이터입니다.
주요 기능
- Telegram long polling 기반 요청 처리
/mode,/profile,/cancel등 운영 명령 라우팅- 사용자 허용 목록(
telegram.allowed_users) 기반 접근 제어 - Codex MCP warmup 및 상태 확인
- 세션/트레이스 파일 저장
- 표준출력 로그 타임스탬프 자동 prefix
프로젝트 구조
src/core: 라우팅, 오케스트레이션, 세션, 프로파일, 트레이스src/workflows: single/multi 워크플로우src/integrations: Codex executor, MCP 상태 연동src/bot: Telegram update 파싱, 메시지 분할scripts/telegram_polling_runner.py: 운영 진입점tests:unittest테스트
요구 사항
- Python 3.11+
npx+codex mcp-server를 실행할 수 있는 환경- Telegram Bot 토큰
설치
python3 -m pip install codex-orchestrator
개발 환경에서 로컬 소스를 직접 실행할 때:
python3 -m pip install mcp python-dotenv
사용자 설정 파일
- 환경변수 템플릿 준비
cp .env.example .env
- 사용자 conf 준비
mkdir -p ~/.codex-orchestrator
cp conf.toml.example ~/.codex-orchestrator/conf.toml
- 최소 필수 설정
.env의TELEGRAM_BOT_TOKEN값을 실제 토큰으로 변경~/.codex-orchestrator/conf.toml의telegram.allowed_users를 실제 사용자 ID로 변경- 필요 시
conf.toml의codex.*,telegram.polling.*로 런타임 옵션 조정
참고:
CODEX_CONF_PATH를 설정하면 기본 경로(~/.codex-orchestrator/conf.toml) 대신 해당 파일을 사용합니다.- 상대 경로
working_directory와system_prompt_file은 conf 파일 위치 기준으로 해석됩니다.
실행
PyPI 설치 기준:
codex-orchestrator-polling
로컬 소스 실행 기준:
PYTHONPATH=src python3 scripts/telegram_polling_runner.py
테스트
전체:
PYTHONPATH=src python3 -m unittest discover -s tests -p 'test_*.py' -q
특정 모듈:
PYTHONPATH=src python3 -m unittest -q tests.test_telegram_polling_runner
Telegram 명령
/start: 명령 안내/mode single|multi: 모드 전환/new: 현재 세션 초기화/status: 실행 상태 확인/cancel: 실행 중 요청 취소/profile list|<name>: 프로파일 목록/전환
운영 파일
- 세션:
~/.codex-orchestrator/sessions/{chatId}-{userId}.json - 트레이스:
~/.codex-orchestrator/traces/{yyyy-mm-dd}.jsonl
추가 문서
docs/telegram-integration-runbook.md: Telegram 연동/운영 절차docs/usage-single-mode.md: single 모드 중심 사용 가이드
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codex_orchestrator-0.1.1.tar.gz
(54.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codex_orchestrator-0.1.1.tar.gz.
File metadata
- Download URL: codex_orchestrator-0.1.1.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0205452208851b8aa83b8a6a58309182c27a7213010395646e0cd8a8b9115c1
|
|
| MD5 |
6ec0073bcb0357261c37fc510080e734
|
|
| BLAKE2b-256 |
6cbeced5c05970fbe2db39c769df4b42d0c949e0ba7b88fd08f1f63bc5a75858
|
File details
Details for the file codex_orchestrator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: codex_orchestrator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd1b9333a11611495d3d66122155e90628ef771ba6b8f8ccdabae818a605efe4
|
|
| MD5 |
1607e130181ff2db6ef6f96ba89c5ff9
|
|
| BLAKE2b-256 |
c9a1bd4ee14e365314e4015a7cf4f6cea62c59d9488bb5f07b67eba72e8ba0c6
|