codex-telegram 0.4.10__tar.gz → 0.4.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/PKG-INFO +1 -1
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/app_runtime/bootstrap.py +11 -1
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram/__init__.py +1 -1
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/PKG-INFO +1 -1
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/SOURCES.txt +1 -0
- codex-telegram-0.4.11/tests/test_bootstrap_update_check.py +53 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/LICENSE +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/MANIFEST.in +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/README.md +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/TELEGRAM.md +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/WEB.md +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/app_runtime/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/app_runtime/telegram_app.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/app_runtime/web_server.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/callbacks.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/features_ui.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/handlers.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/keyboard.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/projects_ui.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/skills_ui.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/bot/thread_ui.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/approval_flow.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/approval_guardian.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/client.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/collaboration_mode.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/common.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/context.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/contracts.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/core.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/projects.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/review.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/system.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/command_router/threads.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/commands.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/event_forwarding.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/events.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex/protocol.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram/cli.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/dependency_links.txt +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/entry_points.txt +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/requires.txt +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/top_level.txt +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/conf.toml.example +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/main.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/models/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/models/state.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/models/thread.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/models/user.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/pyproject.toml +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/setup.cfg +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_approval_guardian.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_approval_policy.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_callbacks_results.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_cli_entrypoint.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_codex_client.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_command_router.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_guardian_config.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_handlers_results.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_keyboard.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_main_approval_flow.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_normalize.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_pypi_check.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_single_instance.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_telegram_bot_config.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_thread_history.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_web_runtime.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/tests/test_web_server_local_command.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/approval_policy.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/config.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/local_command.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/logger.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/normalize.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/pypi_check.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/single_instance.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/utils/web_config.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/__init__.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/dependencies.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/routes.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/runtime.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/server.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/static/dist/assets/index-BbpBsR8Z.js +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/static/dist/assets/index-BfBVFmNi.css +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/static/dist/icons-tab-add.svg +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/static/dist/icons-tab-close.svg +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/static/dist/index.html +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/thread_history.py +0 -0
- {codex-telegram-0.4.10 → codex-telegram-0.4.11}/web/workspace.py +0 -0
|
@@ -14,13 +14,21 @@ logger = logging.getLogger("codex-telegram")
|
|
|
14
14
|
async def _check_update(*, verify_ssl: bool) -> None:
|
|
15
15
|
try:
|
|
16
16
|
version_info = await check_latest_version(verify_ssl=verify_ssl)
|
|
17
|
-
if version_info is
|
|
17
|
+
if version_info is None:
|
|
18
|
+
logger.info("PyPI update check did not return version information.")
|
|
19
|
+
return
|
|
20
|
+
if version_info.is_outdated:
|
|
18
21
|
logger.warning(
|
|
19
22
|
"A newer version of codex-telegram is available: %s (current: %s). "
|
|
20
23
|
"Run: pip install --upgrade codex-telegram",
|
|
21
24
|
version_info.latest,
|
|
22
25
|
version_info.current,
|
|
23
26
|
)
|
|
27
|
+
return
|
|
28
|
+
logger.info(
|
|
29
|
+
"codex-telegram is up to date at version %s.",
|
|
30
|
+
version_info.current,
|
|
31
|
+
)
|
|
24
32
|
except Exception as e:
|
|
25
33
|
logger.warning("Failed to check for updates: %s", e)
|
|
26
34
|
|
|
@@ -77,6 +85,7 @@ async def post_init(
|
|
|
77
85
|
default=True,
|
|
78
86
|
)
|
|
79
87
|
if update_check_enabled:
|
|
88
|
+
logger.info("Checking PyPI for codex-telegram updates...")
|
|
80
89
|
asyncio.create_task(_check_update(verify_ssl=update_check_verify_ssl))
|
|
81
90
|
state.update_notified = True
|
|
82
91
|
|
|
@@ -94,6 +103,7 @@ async def post_shutdown(
|
|
|
94
103
|
state_module.approval_guardian = None
|
|
95
104
|
state_module.command_router = None
|
|
96
105
|
state_module.codex_ready.clear()
|
|
106
|
+
state_module.update_notified = False
|
|
97
107
|
|
|
98
108
|
|
|
99
109
|
async def run_without_telegram(
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import types
|
|
2
|
+
import unittest
|
|
3
|
+
from unittest.mock import AsyncMock, patch
|
|
4
|
+
|
|
5
|
+
from app_runtime import bootstrap
|
|
6
|
+
from utils.pypi_check import VersionInfo
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class BootstrapUpdateCheckTests(unittest.IsolatedAsyncioTestCase):
|
|
10
|
+
@patch("app_runtime.bootstrap.check_latest_version", new_callable=AsyncMock)
|
|
11
|
+
async def test_check_update_logs_warning_when_outdated(self, mock_check_latest_version):
|
|
12
|
+
mock_check_latest_version.return_value = VersionInfo(
|
|
13
|
+
current="0.4.9",
|
|
14
|
+
latest="0.4.10",
|
|
15
|
+
is_outdated=True,
|
|
16
|
+
release_url="https://pypi.org/project/codex-telegram/0.4.10/",
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
with self.assertLogs("codex-telegram", level="WARNING") as logs:
|
|
20
|
+
await bootstrap._check_update(verify_ssl=True)
|
|
21
|
+
|
|
22
|
+
self.assertTrue(any("A newer version of codex-telegram is available" in entry for entry in logs.output))
|
|
23
|
+
|
|
24
|
+
@patch("app_runtime.bootstrap.check_latest_version", new_callable=AsyncMock)
|
|
25
|
+
async def test_check_update_logs_info_when_up_to_date(self, mock_check_latest_version):
|
|
26
|
+
mock_check_latest_version.return_value = VersionInfo(
|
|
27
|
+
current="0.4.10",
|
|
28
|
+
latest="0.4.10",
|
|
29
|
+
is_outdated=False,
|
|
30
|
+
release_url="https://pypi.org/project/codex-telegram/0.4.10/",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
with self.assertLogs("codex-telegram", level="INFO") as logs:
|
|
34
|
+
await bootstrap._check_update(verify_ssl=True)
|
|
35
|
+
|
|
36
|
+
self.assertTrue(any("codex-telegram is up to date at version 0.4.10." in entry for entry in logs.output))
|
|
37
|
+
|
|
38
|
+
async def test_post_shutdown_resets_update_notified(self):
|
|
39
|
+
state_module = types.SimpleNamespace(
|
|
40
|
+
codex_client=None,
|
|
41
|
+
approval_guardian=None,
|
|
42
|
+
command_router=object(),
|
|
43
|
+
codex_ready=types.SimpleNamespace(clear=lambda: None),
|
|
44
|
+
update_notified=True,
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
await bootstrap.post_shutdown(None, state_module=state_module)
|
|
48
|
+
|
|
49
|
+
self.assertFalse(state_module.update_notified)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if __name__ == "__main__":
|
|
53
|
+
unittest.main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codex-telegram-0.4.10 → codex-telegram-0.4.11}/codex_telegram.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|