@agentsignalnet/claude-plugin 0.2.104 → 0.2.105

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "agentsignal",
3
3
  "displayName": "AgentSignal",
4
- "version": "0.2.104",
4
+ "version": "0.2.105",
5
5
  "description": "Page a human from inside Claude Code, or become an addressable agent that other agents can reach.",
6
6
  "author": {
7
7
  "name": "Data Group AI",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsignalnet/claude-plugin",
3
- "version": "0.2.104",
3
+ "version": "0.2.105",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1475,16 +1475,6 @@ for (const identity of identities()) {
1475
1475
  */
1476
1476
  async function loop() {
1477
1477
  for (;;) {
1478
- // Reconcile on every cycle, not only at startup. Registering and looking
1479
- // are two steps, so a one-shot check at startup loses a race it is
1480
- // supposed to settle: if the higher pid registers first and looks before
1481
- // the lower one has registered, it sees an empty registry and stays -- and
1482
- // the lower pid, looking afterwards, is the one entitled to stay. Both
1483
- // keep watching, which is the exact duplicate this check exists to
1484
- // prevent. Looking again each cycle converges whatever the order was,
1485
- // because the late registration is visible by the next one.
1486
- if (yieldToLowerPid(standDown)) return;
1487
-
1488
1478
  const started = Date.now();
1489
1479
  try {
1490
1480
  await tick();
@@ -1500,4 +1490,26 @@ async function loop() {
1500
1490
  }
1501
1491
  }
1502
1492
 
1493
+ /*
1494
+ THE BACKSTOP GETS ITS OWN CLOCK, because the poll no longer has one.
1495
+
1496
+ Reconciling used to happen at the top of every cycle, and a cycle was two
1497
+ seconds, so a duplicate watcher stood down about that fast. Then the poll
1498
+ started holding its request open for twenty-five seconds -- and the check
1499
+ went with it, because it was riding the cycle rather than a timer. A
1500
+ duplicate that appeared just after one check now survived until the next,
1501
+ twelve times longer than before, delivering every message twice the whole
1502
+ while.
1503
+
1504
+ Neither change was wrong and neither test could see it: the long-poll tests
1505
+ assert request counts, the two-watcher tests start daemons and wait. The
1506
+ regression lived in the gap between two commits that were correct apart.
1507
+
1508
+ So it runs on `intervalMs` regardless of what the poll is doing. It is cheap
1509
+ -- a directory read and a pid check -- and it is the only thing standing
1510
+ between a failed lock and two watchers, which is not a thing to make twelve
1511
+ times slower as a side effect.
1512
+ */
1513
+ setInterval(() => yieldToLowerPid(standDown), intervalMs);
1514
+
1503
1515
  await loop();