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 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.5 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.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-over-telegram",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "Coordinate logical agents through one human-owned Telegram bot. Pi package: the push extension and the setup skills.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
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.5"
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"
@@ -1,6 +1,6 @@
1
1
  # Generated by scripts/export_requirements.py; do not edit.
2
- # uv.lock-sha256: 1d1117f7e8f6579e9e6066fc3ebbfb683b1e0a2a86f6eff08c7f9e730e13a453
3
- # pyproject.toml-sha256: 609cff05b658cb850e4c7ded46c8d594c1da6da0bff770047baee8a47f8c04a7
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
@@ -1,6 +1,6 @@
1
1
  # Generated by scripts/export_requirements.py; do not edit.
2
- # uv.lock-sha256: 1d1117f7e8f6579e9e6066fc3ebbfb683b1e0a2a86f6eff08c7f9e730e13a453
3
- # pyproject.toml-sha256: 609cff05b658cb850e4c7ded46c8d594c1da6da0bff770047baee8a47f8c04a7
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.5"
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; a local claim
314
- # would find nothing. Announce that work may be waiting, once
315
- # until a claim gets through again.
316
- event = None if lost_announced else LOST_CLAIM_EVENT
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
package/uv.lock CHANGED
@@ -10,7 +10,7 @@ resolution-markers = [
10
10
 
11
11
  [[package]]
12
12
  name = "agents-over-telegram"
13
- version = "0.11.5"
13
+ version = "0.11.6"
14
14
  source = { editable = "." }
15
15
  dependencies = [
16
16
  { name = "anyio" },