github nicobailon/pi-intercom v0.17.0

latest releases: v0.19.0, v0.18.1, v0.18.0...
one month ago

pi-intercom 0.17.0 makes messaging between sessions more reliable. A send now counts as delivered only after the other session confirms it got the message, so messages to a crashed session no longer look successful. Sessions that crash or stop responding drop off the session list on their own, and sessions keep reconnecting until the broker comes back instead of staying offline. You can also move a running session into its own pool with /intercom-pool <name> to keep groups of sessions apart.

Highlights

  • /intercom-pool <name> moves a running session into its own pool, so it only talks to sessions in that pool.
  • A send reports success only after the other session confirms it got the message.
  • Crashed or unresponsive sessions leave the session list on their own, and messages to them wait until they reconnect.
  • Sessions keep trying to reconnect to the broker until it comes back.
  • Two sessions with the same session ID no longer take it from each other every second.

Need to know

Who What to do
Everyone Close all Pi sessions once after upgrading so the broker restarts with the new version.
Anyone with a shared stableId in config.json Only one session at a time can now use that ID. Set a separate PI_INTERCOM_STABLE_ID for each session instead.
pi-subagents users The fix for two wakes arriving at once needs the matching pi-subagents release.

Changelog

Highlights

  • Move a running session into its own intercom pool with /intercom-pool <name>, so it only talks to sessions in that pool.
  • A send now reports success only after the other session confirms it got the message. Messages to a session that crashed are no longer reported as delivered.
  • Sessions that crash or stop responding drop off the session list on their own, and messages to them wait until they reconnect.
  • After the broker goes away, sessions keep trying to reconnect until it comes back, instead of staying offline.
  • If you use a shared stableId in config.json, switch to a separate PI_INTERCOM_STABLE_ID per session, then close all Pi sessions once after upgrading.

Added

  • /intercom-pool <name> moves a running session into a separate intercom pool, so it only talks to sessions in that pool. /intercom-pool default moves it back. The current pool shows in status and in the /intercom overlay. Thanks to @Pl8tinium for issue #156.

Fixed

  • If a background reconnect to the broker failed, pi-intercom never tried again. The session stayed offline until you next used the intercom tool or overlay. It now keeps retrying, waiting 1s, 2s, 5s, 10s, and then 30s between tries, until the broker is reachable (#159).
  • A send could report socket_delivered for a message the other session never got, because that session's process had died while its connection still looked open. The broker now waits up to 5 seconds for the receiving Pi session to confirm the message. Without that confirmation, the send reports an unconfirmed outcome you can retry, and an ask to an unresponsive session fails right away instead of waiting for the ask timeout. If the session was only slow, its later reply still arrives as an ordinary message. A send that reaches a session while it reloads can also report unconfirmed. The CLI and other non-Pi clients work as before. Thanks to @catlain for issue #157.
  • Two running Pi sessions with the same intercom session ID no longer take the ID from each other every second, with messages going to whichever one registered last. The first running session keeps the ID. The second gets E_SESSION_HELD, stops reconnecting, and shows which process and directory hold the ID; /reload tries again. If the session holding an ID has exited, a new session can take it right away. Behavior change: a machine-wide stableId in config.json now lets only one session at a time use intercom, so set a separate PI_INTERCOM_STABLE_ID for each session instead. This takes effect once the broker restarts, so close all Pi sessions once after upgrading. Thanks to @Ribelio for #155.
  • A session whose process died without closing its connection stayed in the session list, and messages kept going to it. The broker now drops a session that has been silent for three heartbeat intervals (90 seconds by default). Messages to it wait and are delivered when it reconnects. Thanks to @catlain for issue #157.
  • When an intercom message and a subagent notice reached an idle session at the same time, both extensions tried to wake it, and the second wake failed with Agent is already processing a prompt. pi-intercom and pi-subagents now share one wake per session, so the second message is added to the turn the first one starts. This needs the matching pi-subagents release.

Don't miss a new pi-intercom release

NewReleases is sending notifications on new releases.