@cfio/cohort-sync 0.31.3 → 0.31.4

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.
package/dist/index.js CHANGED
@@ -13635,7 +13635,7 @@ function dumpCtx(ctx) {
13635
13635
  function dumpEvent(event) {
13636
13636
  return dumpCtx(event);
13637
13637
  }
13638
- var PLUGIN_VERSION = true ? "0.31.3" : "unknown";
13638
+ var PLUGIN_VERSION = true ? "0.31.4" : "unknown";
13639
13639
  function resolveGatewayToken(api) {
13640
13640
  const token2 = api.config?.gateway?.auth?.token;
13641
13641
  return typeof token2 === "string" ? token2 : null;
@@ -13979,6 +13979,10 @@ function registerHookHandlers(api, logger, getState) {
13979
13979
  state.logger.debug("cohort-sync: resolve agent: result", { method: "fallback_main", resolved });
13980
13980
  return resolved;
13981
13981
  }
13982
+ function isHeartbeatCronSession(ctx) {
13983
+ const sessionKey = ctx.sessionKey ?? ctx.sessionId;
13984
+ return typeof sessionKey === "string" && sessionKey.includes(":cron:heartbeat");
13985
+ }
13982
13986
  api.on("agent_end", async (event, ctx) => {
13983
13987
  const state = getState();
13984
13988
  if (!state) return;
@@ -14051,6 +14055,15 @@ function registerHookHandlers(api, logger, getState) {
14051
14055
  if (!state) return;
14052
14056
  if (event?.outcome !== "error") return;
14053
14057
  const { logger: log } = state;
14058
+ if (isHeartbeatCronSession(ctx)) {
14059
+ log.debug("cohort-sync: suppressing heartbeat model error activity", {
14060
+ provider: event.provider,
14061
+ errorCategory: event.errorCategory,
14062
+ failureKind: event.failureKind,
14063
+ sessionKey: ctx.sessionKey
14064
+ });
14065
+ return;
14066
+ }
14054
14067
  log.debug("cohort-sync: hook: model_call_ended (error)", {
14055
14068
  provider: event.provider,
14056
14069
  errorCategory: event.errorCategory,
@@ -72,5 +72,5 @@
72
72
  }
73
73
  }
74
74
  },
75
- "version": "0.31.3"
75
+ "version": "0.31.4"
76
76
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.31.3",
3
+ "version": "0.31.4",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfio/cohort-sync",
3
- "version": "0.31.3",
3
+ "version": "0.31.4",
4
4
  "description": "OpenClaw plugin — syncs agent telemetry, sessions, and activity to the Cohort dashboard",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.cohort.bot/gateway",