@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 +14 -1
- package/dist/openclaw.plugin.json +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
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.
|
|
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,
|
package/dist/package.json
CHANGED
package/package.json
CHANGED