Skip to content

0.21.0: Activity And Delivery Extension Platform#128

Merged
llblab merged 1 commit into
mainfrom
dev
Jul 13, 2026
Merged

0.21.0: Activity And Delivery Extension Platform#128
llblab merged 1 commit into
mainfrom
dev

Conversation

@llblab

@llblab llblab commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

This release adds stable target-aware Telegram Delivery and normalized Activity APIs for companion extensions, with public package membranes, lifecycle-safe dispatch, logical message handles, and leader/follower transport support.

It also hardens cross-thread authorization, session replacement, shutdown fencing, partial chunk recovery, compaction identity, Pi 0.80.6 compatibility, and private Guest Mode attribution while keeping index.ts composition-only.

Why

Companion extensions previously had to reach into bridge internals or own Telegram transport to show lifecycle-adjacent UI. The new platform provides narrow supported contracts while preserving pi-telegram's routing, authorization, ordering, and process-ownership boundaries.

User-visible behavior

  • Companion extensions can register non-blocking Activity handlers for agent, reasoning, assistant, tool, compaction, and settlement events.
  • Extensions can send, edit, delete, and reconcile chunked Telegram views through authorized active-turn, instance, aggregate, or explicit targets.
  • Reload/session replacement creates fresh Activity and Delivery generations; stale handlers and handles fail closed.
  • Partial multi-chunk failures return recoverable handles for deterministic retry or cleanup.
  • Private Guest Mode keeps guest anchored to the remote conversation peer when replying to a bot response.

Changed areas

  • api/activity.ts, lib/activity.ts: stable registration, normalization, dispatcher isolation, generation fencing, and Delivery-backed contexts.
  • api/delivery.ts, lib/delivery.ts: target policy, rendering/transport adaptation, ordering, logical handles, lifecycle fencing, and partial recovery.
  • lib/bus*.ts: explicit authenticated aggregate-delivery marker authorization and stripping.
  • lib/lifecycle.ts, lib/bindings.ts, lib/pi.ts: typed Pi 0.80.6 lifecycle mapping and session replacement.
  • Docs/package metadata: complete public API contracts, architecture guidance, external demo reference, and version 0.21.0.

Risk Notes

  • Activity handler queues intentionally have no hard event-count drop policy; adjacent streaming deltas coalesce and consumers must keep handler work bounded.
  • A Telegram request already accepted before shutdown may materialize, but the retiring operation cannot continue or adopt the replacement generation.
  • No config migration is required. Pi 0.80.6 or newer is required for the public agent_settled boundary.

Validation

  • npm run validate — 1,138 tests; 1,137 passed, 1 platform skip; typecheck passed; audit clean; npm pack dry-run produced llblab-pi-telegram-0.21.0.tgz.
  • Domain DAG validator — passed with 0 errors and 0 warnings.
  • ABCd context validator — passed with 0 errors and 0 warnings.
  • Final multi-lens review and verification — ready; no remaining Activity or Delivery release blocker.

@llblab llblab merged commit 5980881 into main Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant