chore: rename package
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
"""Telegram Codex bridge package."""
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
# codex_telegram_bridge — Developer Guide
|
# takopi — Developer Guide
|
||||||
|
|
||||||
This document describes the internal architecture and module responsibilities.
|
This document describes the internal architecture and module responsibilities.
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "codex-telegram-bridge"
|
name = "takopi"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Telegram bridge tools for Codex."
|
description = "Telegram bridge tools for Codex."
|
||||||
readme = "readme.md"
|
readme = "readme.md"
|
||||||
@@ -12,17 +12,18 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
exec-bridge = "codex_telegram_bridge.exec_bridge:main"
|
takopi = "takopi.exec_bridge:main"
|
||||||
|
exec-bridge = "takopi.exec_bridge:main"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["hatchling"]
|
requires = ["hatchling"]
|
||||||
build-backend = "hatchling.build"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["src/codex_telegram_bridge"]
|
packages = ["src/takopi"]
|
||||||
|
|
||||||
[tool.hatch.build.targets.sdist]
|
[tool.hatch.build.targets.sdist]
|
||||||
include = ["src/codex_telegram_bridge", "readme.md"]
|
include = ["src/takopi", "readme.md"]
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
dev = [
|
dev = [
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
# Codex Telegram Bridge
|
# Takopi
|
||||||
|
|
||||||
|
> 🐙 A little helper from Happy Planet, here to make your Codex sessions happier-pi!
|
||||||
|
|
||||||
A Telegram bot that bridges messages to [Codex](https://github.com/openai/codex) sessions using non-interactive `codex exec` and `codex exec resume`.
|
A Telegram bot that bridges messages to [Codex](https://github.com/openai/codex) sessions using non-interactive `codex exec` and `codex exec resume`.
|
||||||
|
|
||||||
@@ -22,10 +24,10 @@ A Telegram bot that bridges messages to [Codex](https://github.com/openai/codex)
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone and enter the directory
|
# Clone and enter the directory
|
||||||
cd codex-telegram-bridge
|
cd takopi
|
||||||
|
|
||||||
# Run directly with uv (installs deps automatically)
|
# Run directly with uv (installs deps automatically)
|
||||||
uv run exec-bridge --help
|
uv run takopi --help
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
@@ -47,7 +49,7 @@ The bridge only accepts messages where the chat ID equals the sender ID and both
|
|||||||
### Running
|
### Running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run exec-bridge
|
uv run takopi
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Options
|
#### Options
|
||||||
@@ -94,7 +96,7 @@ See [`developing.md`](developing.md) for architecture details.
|
|||||||
uv run pytest
|
uv run pytest
|
||||||
|
|
||||||
# Run with debug logging
|
# Run with debug logging
|
||||||
uv run exec-bridge --debug 2>&1 | tee debug.log
|
uv run takopi --debug 2>&1 | tee debug.log
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
"""Takopi — Telegram Codex bridge package."""
|
||||||
Vendored
+37
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from codex_telegram_bridge.exec_bridge import (
|
from takopi.exec_bridge import (
|
||||||
extract_session_id,
|
extract_session_id,
|
||||||
prepare_telegram,
|
prepare_telegram,
|
||||||
resolve_resume_session,
|
resolve_resume_session,
|
||||||
@@ -184,7 +184,7 @@ class _FakeRunnerWithEvents:
|
|||||||
|
|
||||||
|
|
||||||
def test_final_notify_sends_loud_final_message() -> None:
|
def test_final_notify_sends_loud_final_message() -> None:
|
||||||
from codex_telegram_bridge.exec_bridge import BridgeConfig, _handle_message
|
from takopi.exec_bridge import BridgeConfig, _handle_message
|
||||||
|
|
||||||
bot = _FakeBot()
|
bot = _FakeBot()
|
||||||
runner = _FakeRunner(answer="ok")
|
runner = _FakeRunner(answer="ok")
|
||||||
@@ -213,7 +213,7 @@ def test_final_notify_sends_loud_final_message() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_new_final_message_forces_notification_when_too_long_to_edit() -> None:
|
def test_new_final_message_forces_notification_when_too_long_to_edit() -> None:
|
||||||
from codex_telegram_bridge.exec_bridge import BridgeConfig, _handle_message
|
from takopi.exec_bridge import BridgeConfig, _handle_message
|
||||||
|
|
||||||
bot = _FakeBot()
|
bot = _FakeBot()
|
||||||
runner = _FakeRunner(answer="x" * 10_000)
|
runner = _FakeRunner(answer="x" * 10_000)
|
||||||
@@ -242,7 +242,7 @@ def test_new_final_message_forces_notification_when_too_long_to_edit() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_progress_edits_are_rate_limited() -> None:
|
def test_progress_edits_are_rate_limited() -> None:
|
||||||
from codex_telegram_bridge.exec_bridge import BridgeConfig, _handle_message
|
from takopi.exec_bridge import BridgeConfig, _handle_message
|
||||||
|
|
||||||
bot = _FakeBot()
|
bot = _FakeBot()
|
||||||
clock = _FakeClock()
|
clock = _FakeClock()
|
||||||
@@ -306,7 +306,7 @@ def test_progress_edits_are_rate_limited() -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_bridge_flow_sends_progress_edits_and_final_resume() -> None:
|
def test_bridge_flow_sends_progress_edits_and_final_resume() -> None:
|
||||||
from codex_telegram_bridge.exec_bridge import BridgeConfig, _handle_message
|
from takopi.exec_bridge import BridgeConfig, _handle_message
|
||||||
|
|
||||||
bot = _FakeBot()
|
bot = _FakeBot()
|
||||||
clock = _FakeClock()
|
clock = _FakeClock()
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from codex_telegram_bridge.exec_render import ExecProgressRenderer, render_event_cli
|
from takopi.exec_render import ExecProgressRenderer, render_event_cli
|
||||||
|
|
||||||
|
|
||||||
def _loads(lines: str) -> list[dict]:
|
def _loads(lines: str) -> list[dict]:
|
||||||
@@ -57,7 +57,7 @@ def test_render_event_cli_real_run_fixture() -> None:
|
|||||||
assert any(line.startswith("0. ▸ `") for line in out)
|
assert any(line.startswith("0. ▸ `") for line in out)
|
||||||
assert any(line.startswith("0. ✓ `") for line in out)
|
assert any(line.startswith("0. ✓ `") for line in out)
|
||||||
assert "assistant:" in out
|
assert "assistant:" in out
|
||||||
assert any("exec-bridge" in line for line in out)
|
assert any("takopi" in line for line in out)
|
||||||
assert out[-1] == "turn completed"
|
assert out[-1] == "turn completed"
|
||||||
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from codex_telegram_bridge.exec_bridge import CodexExecRunner
|
from takopi.exec_bridge import CodexExecRunner
|
||||||
|
|
||||||
|
|
||||||
def test_run_serialized_serializes_same_session() -> None:
|
def test_run_serialized_serializes_same_session() -> None:
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
from codex_telegram_bridge.rendering import render_markdown
|
from takopi.rendering import render_markdown
|
||||||
|
|
||||||
|
|
||||||
def test_render_markdown_basic_entities() -> None:
|
def test_render_markdown_basic_entities() -> None:
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from codex_telegram_bridge import exec_bridge
|
from takopi import exec_bridge
|
||||||
|
|
||||||
|
|
||||||
def test_manage_subprocess_kills_when_terminate_times_out(monkeypatch) -> None:
|
def test_manage_subprocess_kills_when_terminate_times_out(monkeypatch) -> None:
|
||||||
+2
-2
@@ -4,8 +4,8 @@ import logging
|
|||||||
import httpx
|
import httpx
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from codex_telegram_bridge.logging import RedactTokenFilter
|
from takopi.logging import RedactTokenFilter
|
||||||
from codex_telegram_bridge.telegram_client import TelegramClient
|
from takopi.telegram_client import TelegramClient
|
||||||
|
|
||||||
|
|
||||||
def test_telegram_429_retry_after_calls_sleep() -> None:
|
def test_telegram_429_retry_after_calls_sleep() -> None:
|
||||||
Reference in New Issue
Block a user