agents-over-telegram 0.11.5 → 0.11.6
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/requirements/build.txt +2 -2
- package/requirements/runtime.txt +2 -2
- package/src/agents_over_telegram/__init__.py +1 -1
- package/src/agents_over_telegram/push.py +23 -6
- package/uv.lock +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Agents over Telegram (AOT) connects a coding agent project to a Telegram group o
|
|
|
4
4
|
|
|
5
5
|
## Supported agent hosts
|
|
6
6
|
|
|
7
|
-
Version 0.11.
|
|
7
|
+
Version 0.11.6 supports **Claude Code**, **Codex**, **Pi**, **Amp** and **Antigravity** (the `agy` CLI and the desktop app), and, untested, **Grok Bot** (see [hosts](docs/HOSTS.md#grok-bot-untested)). Every host works the same way: you install AOT for the host once, then ask the agent to connect each project. A new Telegram message reaches the running agent without a typed prompt: an idle agent wakes up, and a busy agent gets a notice at its next safe point. The notice never contains the message text; the agent reads it with its scoped Telegram tools.
|
|
8
8
|
|
|
9
9
|
[Agent hosts](docs/HOSTS.md) explains how each integration works and lists exactly what was tested. Most host checks used real host processes with a fake Telegram transport, not live Telegram.
|
|
10
10
|
|
package/package.json
CHANGED
package/pyproject.toml
CHANGED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agents-over-telegram"
|
|
7
|
-
version = "0.11.
|
|
7
|
+
version = "0.11.6"
|
|
8
8
|
description = "One human-owned Telegram bot, multiple isolated logical agent conversations"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
license = "Apache-2.0"
|
package/requirements/build.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Generated by scripts/export_requirements.py; do not edit.
|
|
2
|
-
# uv.lock-sha256:
|
|
3
|
-
# pyproject.toml-sha256:
|
|
2
|
+
# uv.lock-sha256: e005439958a3208724a6dd2da823b116fd547127da184353dc56e52cd4b4f12c
|
|
3
|
+
# pyproject.toml-sha256: a25465165d671a01658be9d5ea6805aecede90b54670af72bf1b4dc6361f68d6
|
|
4
4
|
hatchling==1.27.0 \
|
|
5
5
|
--hash=sha256:971c296d9819abb3811112fc52c7a9751c8d381898f36533bb16f9791e941fd6 \
|
|
6
6
|
--hash=sha256:d3a2f3567c4f926ea39849cdf924c7e99e6686c9c8e288ae1037c8fa2a5d937b
|
package/requirements/runtime.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Generated by scripts/export_requirements.py; do not edit.
|
|
2
|
-
# uv.lock-sha256:
|
|
3
|
-
# pyproject.toml-sha256:
|
|
2
|
+
# uv.lock-sha256: e005439958a3208724a6dd2da823b116fd547127da184353dc56e52cd4b4f12c
|
|
3
|
+
# pyproject.toml-sha256: a25465165d671a01658be9d5ea6805aecede90b54670af72bf1b4dc6361f68d6
|
|
4
4
|
annotated-types==0.8.0 \
|
|
5
5
|
--hash=sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7 \
|
|
6
6
|
--hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Local, scoped communication between agents and a human-owned Telegram bot."""
|
|
2
|
-
__version__ = "0.11.
|
|
2
|
+
__version__ = "0.11.6"
|
|
@@ -219,6 +219,15 @@ LOST_CLAIM_EVENT = {
|
|
|
219
219
|
RELAY_WAIT = 10.0
|
|
220
220
|
|
|
221
221
|
|
|
222
|
+
def _pending_on_relay(remote) -> int | None:
|
|
223
|
+
"""The agent's unacknowledged deliveries as the relay counts them, or None when it does not answer."""
|
|
224
|
+
try:
|
|
225
|
+
pending = remote.status().get('pending_messages')
|
|
226
|
+
except (Lost, Unavailable, CoreError, AttributeError):
|
|
227
|
+
return None
|
|
228
|
+
return pending if isinstance(pending, int) and not isinstance(pending, bool) else None
|
|
229
|
+
|
|
230
|
+
|
|
222
231
|
def prepare_watch(core, client_id: str, announce_backlog: bool = True) -> None:
|
|
223
232
|
"""Set a watcher up: the push tables, and without announce_backlog, the waiting work marked as known."""
|
|
224
233
|
ensure_tables(core)
|
|
@@ -277,7 +286,7 @@ def watch(core, client_id: str, emit: Callable[[dict], None], *, collect: bool =
|
|
|
277
286
|
return stopped(error.code)
|
|
278
287
|
raise
|
|
279
288
|
local_ready = False
|
|
280
|
-
lost_announced = False
|
|
289
|
+
lost_announced = unsure = False
|
|
281
290
|
|
|
282
291
|
def ready_locally():
|
|
283
292
|
nonlocal local_ready
|
|
@@ -310,11 +319,10 @@ def watch(core, client_id: str, emit: Callable[[dict], None], *, collect: bool =
|
|
|
310
319
|
event = remote.claim('watch')
|
|
311
320
|
lost_announced = False
|
|
312
321
|
except Lost:
|
|
313
|
-
# The relay may have recorded the claim already
|
|
314
|
-
# would find nothing.
|
|
315
|
-
#
|
|
316
|
-
event = None
|
|
317
|
-
lost_announced = True
|
|
322
|
+
# The relay may have recorded the claim already, so a local claim
|
|
323
|
+
# would find nothing. Below, the relay is asked whether work waits
|
|
324
|
+
# before the agent is woken: a slow relay must not wake it for nothing.
|
|
325
|
+
event, unsure = None, True
|
|
318
326
|
except Unavailable:
|
|
319
327
|
event = _NO_RELAY
|
|
320
328
|
except CoreError as error:
|
|
@@ -322,6 +330,15 @@ def watch(core, client_id: str, emit: Callable[[dict], None], *, collect: bool =
|
|
|
322
330
|
return stopped(error.code)
|
|
323
331
|
event = None
|
|
324
332
|
if event is not _NO_RELAY:
|
|
333
|
+
if event is not None:
|
|
334
|
+
unsure = False
|
|
335
|
+
elif unsure and not lost_announced:
|
|
336
|
+
pending = _pending_on_relay(remote)
|
|
337
|
+
if pending is not None:
|
|
338
|
+
# Announce once until a claim gets through again.
|
|
339
|
+
unsure = False
|
|
340
|
+
if pending:
|
|
341
|
+
event, lost_announced = LOST_CLAIM_EVENT, True
|
|
325
342
|
if event is not None:
|
|
326
343
|
emit(event)
|
|
327
344
|
events += 1
|