docs: update developing.md to match current code
This commit is contained in:
+21
-3
@@ -15,6 +15,14 @@ uv run takopi --help
|
|||||||
# Or install locally from the repo to test outside the repo
|
# Or install locally from the repo to test outside the repo
|
||||||
uv tool install .
|
uv tool install .
|
||||||
takopi --help
|
takopi --help
|
||||||
|
|
||||||
|
# Run tests, linting, type checking
|
||||||
|
uv run pytest
|
||||||
|
uv run ruff check src tests
|
||||||
|
uv run ty check .
|
||||||
|
|
||||||
|
# Or all at once
|
||||||
|
make check
|
||||||
```
|
```
|
||||||
|
|
||||||
## Module Responsibilities
|
## Module Responsibilities
|
||||||
@@ -36,8 +44,8 @@ The orchestrator module containing:
|
|||||||
|
|
||||||
**Key patterns:**
|
**Key patterns:**
|
||||||
- Per-session locks prevent concurrent resumes to the same `session_id`
|
- Per-session locks prevent concurrent resumes to the same `session_id`
|
||||||
- `asyncio.Semaphore` limits overall concurrency (default: 16)
|
- Worker pool with `asyncio.Queue` limits concurrency (default: 16 workers)
|
||||||
- `asyncio.TaskGroup` manages per-message tasks
|
- `asyncio.TaskGroup` manages worker tasks
|
||||||
- Progress edits are throttled to ~2s intervals
|
- Progress edits are throttled to ~2s intervals
|
||||||
- Subprocess stderr is drained to a bounded deque for error reporting
|
- Subprocess stderr is drained to a bounded deque for error reporting
|
||||||
- `poll_updates()` uses Telegram `getUpdates` long-polling with a single server-side updates
|
- `poll_updates()` uses Telegram `getUpdates` long-polling with a single server-side updates
|
||||||
@@ -79,7 +87,7 @@ Transforms Codex JSONL events into human-readable text:
|
|||||||
### `config.py` — Configuration Loading
|
### `config.py` — Configuration Loading
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def load_telegram_config(path=None) -> tuple[dict, Path]:
|
def load_telegram_config() -> tuple[dict, Path]:
|
||||||
# Loads ./.codex/takopi.toml, then ~/.codex/takopi.toml
|
# Loads ./.codex/takopi.toml, then ~/.codex/takopi.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -93,6 +101,16 @@ def setup_logging(*, debug: bool):
|
|||||||
# Configures root logger with redaction filter
|
# Configures root logger with redaction filter
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `onboarding.py` — Setup Validation
|
||||||
|
|
||||||
|
```python
|
||||||
|
def check_setup() -> SetupResult:
|
||||||
|
# Validates codex CLI on PATH and config file
|
||||||
|
|
||||||
|
def render_setup_guide(result: SetupResult):
|
||||||
|
# Displays rich panel with setup instructions
|
||||||
|
```
|
||||||
|
|
||||||
## Data Flow
|
## Data Flow
|
||||||
|
|
||||||
### New Message Flow
|
### New Message Flow
|
||||||
|
|||||||
Reference in New Issue
Block a user