@cfio/cohort-sync 0.11.3 → 0.11.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 +7 -6
- package/dist/openclaw.plugin.json +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12046,13 +12046,14 @@ async function startNotificationSubscription(port, cfg, hooksToken, logger, gwCl
|
|
|
12046
12046
|
);
|
|
12047
12047
|
}
|
|
12048
12048
|
const sourceMap = resolvedNameMap ?? cfg.agentNameMap ?? { main: "main" };
|
|
12049
|
-
const
|
|
12049
|
+
const subscriptionTargets = /* @__PURE__ */ new Map();
|
|
12050
12050
|
for (const [openclawId, cohortName] of Object.entries(sourceMap)) {
|
|
12051
|
-
|
|
12051
|
+
subscriptionTargets.set(cohortName, openclawId);
|
|
12052
|
+
if (openclawId !== cohortName) {
|
|
12053
|
+
subscriptionTargets.set(openclawId, openclawId);
|
|
12054
|
+
}
|
|
12052
12055
|
}
|
|
12053
|
-
const
|
|
12054
|
-
for (const agentName of agentNames) {
|
|
12055
|
-
const openclawAgentId = reverseNameMap[agentName] ?? agentName;
|
|
12056
|
+
for (const [agentName, openclawAgentId] of subscriptionTargets) {
|
|
12056
12057
|
logger.info(`cohort-sync: subscribing to notifications for agent "${agentName}" (openclawId: "${openclawAgentId}")`);
|
|
12057
12058
|
let processing = false;
|
|
12058
12059
|
const apiKeyHash = hashApiKey(cfg.apiKey);
|
|
@@ -13333,7 +13334,7 @@ function dumpCtx(ctx) {
|
|
|
13333
13334
|
function dumpEvent(event) {
|
|
13334
13335
|
return dumpCtx(event);
|
|
13335
13336
|
}
|
|
13336
|
-
var PLUGIN_VERSION = true ? "0.11.
|
|
13337
|
+
var PLUGIN_VERSION = true ? "0.11.4" : "unknown";
|
|
13337
13338
|
function resolveGatewayToken(api) {
|
|
13338
13339
|
const token = api.config?.gateway?.auth?.token;
|
|
13339
13340
|
return typeof token === "string" ? token : null;
|
package/dist/package.json
CHANGED
package/package.json
CHANGED