@essentialai/cogent-plugin 3.25.4 → 3.25.5

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,6 +1,6 @@
1
1
  {
2
2
  "name": "cogent",
3
- "version": "3.25.4",
3
+ "version": "3.25.5",
4
4
  "description": "Inter-session communication bridge for Claude Code with Slack integration. Enables CC agents and Slack team members to communicate in real time.",
5
5
  "author": {
6
6
  "name": "Essential AI Solutions",
@@ -26396,8 +26396,8 @@ var init_stdio2 = __esm({
26396
26396
  // src/constants.ts
26397
26397
  import { createRequire } from "node:module";
26398
26398
  function resolveVersion() {
26399
- if ("3.25.4") {
26400
- return "3.25.4";
26399
+ if ("3.25.5") {
26400
+ return "3.25.5";
26401
26401
  }
26402
26402
  try {
26403
26403
  const require2 = createRequire(import.meta.url);
@@ -35510,6 +35510,7 @@ var init_claude_preflight = __esm({
35510
35510
  var startup_exports = {};
35511
35511
  __export(startup_exports, {
35512
35512
  autoRelay: () => autoRelay,
35513
+ cancelPresenceRetry: () => cancelPresenceRetry,
35513
35514
  cloudHttpClient: () => cloudHttpClient,
35514
35515
  cloudInbox: () => cloudInbox,
35515
35516
  cloudWsClient: () => cloudWsClient,
@@ -35668,7 +35669,15 @@ function presenceRegisterArgs(p) {
35668
35669
  // AUD-003 ownership proof — reclaims a peer owned by an earlier token
35669
35670
  ];
35670
35671
  }
35671
- async function restorePeerPresence() {
35672
+ function cancelPresenceRetry() {
35673
+ if (presenceRetry) clearTimeout(presenceRetry);
35674
+ presenceRetry = null;
35675
+ }
35676
+ function presenceRetryDelayMs(attempt) {
35677
+ const base = Number(process.env.COGENT_PRESENCE_RETRY_MS);
35678
+ return Math.min((Number.isFinite(base) && base > 0 ? base : 3e4) * 2 ** attempt, 3e5);
35679
+ }
35680
+ async function restorePeerPresence(attempt = 0) {
35672
35681
  const outcome = await restorePresence({
35673
35682
  // The endpoint being a relay URL is what makes presence meaningful. We deliberately do
35674
35683
  // NOT gate on the active backend being the cloud one: at startup it is still the
@@ -35699,6 +35708,17 @@ async function restorePeerPresence() {
35699
35708
  });
35700
35709
  setPresence(outcome);
35701
35710
  logPresence(outcome);
35711
+ if (outcome.state === "offline" && outcome.detail.startsWith("presence restore failed")) {
35712
+ const delay = presenceRetryDelayMs(attempt);
35713
+ cancelPresenceRetry();
35714
+ presenceRetry = setTimeout(() => {
35715
+ presenceRetry = null;
35716
+ void restorePeerPresence(attempt + 1).catch(() => {
35717
+ });
35718
+ }, delay);
35719
+ presenceRetry.unref?.();
35720
+ logger.warn(`presence: restore failed \u2014 retrying in ${Math.round(delay / 1e3)}s`);
35721
+ }
35702
35722
  return outcome;
35703
35723
  }
35704
35724
  function createCloudWsClient(endpoint, sessionId, token, http, inbox, pollIntervalMs) {
@@ -35938,7 +35958,7 @@ async function runPreflights() {
35938
35958
  await preflightClaude(config2.COGENT_CLAUDE_PATH);
35939
35959
  }
35940
35960
  }
35941
- var UUID_V4_RE, execFileAsync3, PERSIST_PATH, legacyWarnEmitted, cloudWsClient, cloudInbox, cloudHttpClient, cloudModeActive, inboxNotifier, notifierBoundTo, reRegistrationInProgress, pendingLabelResolve;
35961
+ var UUID_V4_RE, execFileAsync3, PERSIST_PATH, legacyWarnEmitted, cloudWsClient, cloudInbox, cloudHttpClient, cloudModeActive, inboxNotifier, notifierBoundTo, reRegistrationInProgress, presenceRetry, pendingLabelResolve;
35942
35962
  var init_startup = __esm({
35943
35963
  "src/startup.ts"() {
35944
35964
  "use strict";
@@ -35971,6 +35991,7 @@ var init_startup = __esm({
35971
35991
  inboxNotifier = null;
35972
35992
  notifierBoundTo = null;
35973
35993
  reRegistrationInProgress = false;
35994
+ presenceRetry = null;
35974
35995
  pendingLabelResolve = null;
35975
35996
  }
35976
35997
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@essentialai/cogent-plugin",
3
- "version": "3.25.4",
3
+ "version": "3.25.5",
4
4
  "description": "Cogent — Claude Code plugin (skills + slash-commands + MCP server) for the cross-agent comms fabric.",
5
5
  "author": { "name": "Essential AI Solutions Ltd.", "url": "https://essentialai.uk" },
6
6
  "homepage": "https://cogent.tools",