@integrity-labs/agt-cli 0.28.624 → 0.28.626

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.
@@ -16,7 +16,7 @@ import {
16
16
  rotateDailySession,
17
17
  sessionFileExists,
18
18
  todayLocalIso
19
- } from "./chunk-EDH4GZIW.js";
19
+ } from "./chunk-XQ7BNYC4.js";
20
20
  import {
21
21
  reapOrphanChannelMcps
22
22
  } from "./chunk-XWVM4KPK.js";
@@ -4167,4 +4167,4 @@ export {
4167
4167
  stopAllSessionsAndWait,
4168
4168
  getProjectDir
4169
4169
  };
4170
- //# sourceMappingURL=chunk-UIB2SMFE.js.map
4170
+ //# sourceMappingURL=chunk-7QNQRV3A.js.map
@@ -10061,6 +10061,50 @@ function remoteMcpConnectionLabel(definitionId, connectionKey) {
10061
10061
  return `${definitionId} (${connectionKey})`;
10062
10062
  }
10063
10063
 
10064
+ // ../../packages/core/dist/integrations/slack-socket-state.js
10065
+ var SLACK_SOCKET_STATE_FILENAME = "slack-socket-state.json";
10066
+ var SLACK_SOCKET_STATE_MAX_AGE_MS = 18e4;
10067
+ function parseSlackSocketState(raw, nowMs, maxAgeMs = SLACK_SOCKET_STATE_MAX_AGE_MS) {
10068
+ if (!raw)
10069
+ return null;
10070
+ let parsed;
10071
+ try {
10072
+ parsed = JSON.parse(raw);
10073
+ } catch {
10074
+ return null;
10075
+ }
10076
+ if (!parsed || typeof parsed !== "object")
10077
+ return null;
10078
+ const o = parsed;
10079
+ if (typeof o["connected"] !== "boolean")
10080
+ return null;
10081
+ if (typeof o["updated_at_ms"] !== "number" || !Number.isFinite(o["updated_at_ms"]))
10082
+ return null;
10083
+ const downRaw = o["down_for_ms"];
10084
+ const downForMs = downRaw === null ? null : typeof downRaw === "number" && Number.isFinite(downRaw) && downRaw >= 0 ? downRaw : void 0;
10085
+ if (downForMs === void 0)
10086
+ return null;
10087
+ const age = nowMs - o["updated_at_ms"];
10088
+ if (age > maxAgeMs)
10089
+ return null;
10090
+ if (age < -maxAgeMs)
10091
+ return null;
10092
+ return {
10093
+ connected: o["connected"],
10094
+ down_for_ms: downForMs,
10095
+ updated_at_ms: o["updated_at_ms"]
10096
+ };
10097
+ }
10098
+ function isSlackInboundTransportDown(state, downForAtLeastMs) {
10099
+ if (!state)
10100
+ return false;
10101
+ if (state.connected)
10102
+ return false;
10103
+ if (state.down_for_ms === null)
10104
+ return false;
10105
+ return state.down_for_ms >= downForAtLeastMs;
10106
+ }
10107
+
10064
10108
  // ../../packages/core/dist/anchor/types.js
10065
10109
  var ANCHOR_API_BASE_URL = "https://api.anchorbrowser.io/v1";
10066
10110
  var ANCHOR_API_KEY_HEADER = "anchor-api-key";
@@ -11976,6 +12020,9 @@ export {
11976
12020
  REMOTE_MCP_PROXY_ENV,
11977
12021
  readRemoteMcpAuthConfig,
11978
12022
  buildForwardHeaders,
12023
+ SLACK_SOCKET_STATE_FILENAME,
12024
+ parseSlackSocketState,
12025
+ isSlackInboundTransportDown,
11979
12026
  classifyCursorAdvance,
11980
12027
  cursorAdvanceCounterKey,
11981
12028
  formatCursorAdvanceShortfall,
@@ -12048,4 +12095,4 @@ export {
12048
12095
  minutesSinceLocalMidnight,
12049
12096
  peekCurrentSession
12050
12097
  };
12051
- //# sourceMappingURL=chunk-EDH4GZIW.js.map
12098
+ //# sourceMappingURL=chunk-XQ7BNYC4.js.map