@cfio/cohort-sync 0.31.10 → 0.31.11
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 +15 -4
- package/dist/openclaw.plugin.json +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11880,6 +11880,17 @@ function deriveConvexUrl(apiUrl2) {
|
|
|
11880
11880
|
}
|
|
11881
11881
|
return normalized;
|
|
11882
11882
|
}
|
|
11883
|
+
async function buildHookResponseError(response) {
|
|
11884
|
+
let detail = "";
|
|
11885
|
+
try {
|
|
11886
|
+
const body = await response.text();
|
|
11887
|
+
if (body.trim()) {
|
|
11888
|
+
detail = `: ${body.trim().slice(0, 500)}`;
|
|
11889
|
+
}
|
|
11890
|
+
} catch {
|
|
11891
|
+
}
|
|
11892
|
+
return new Error(`/hooks/agent returned ${response.status} ${response.statusText}${detail}`);
|
|
11893
|
+
}
|
|
11883
11894
|
var savedLogger = null;
|
|
11884
11895
|
function setLogger(logger) {
|
|
11885
11896
|
savedLogger = logger;
|
|
@@ -12223,7 +12234,7 @@ async function injectNotification(port, hooksToken, n, agentId = "main") {
|
|
|
12223
12234
|
signal: AbortSignal.timeout(1e4)
|
|
12224
12235
|
});
|
|
12225
12236
|
if (!response.ok) {
|
|
12226
|
-
throw
|
|
12237
|
+
throw await buildHookResponseError(response);
|
|
12227
12238
|
}
|
|
12228
12239
|
}
|
|
12229
12240
|
function buildBriefingGenerationMessage(args) {
|
|
@@ -12258,12 +12269,12 @@ async function injectBriefingGeneration(port, hooksToken, args) {
|
|
|
12258
12269
|
name: "Cohort",
|
|
12259
12270
|
agentId: args.agentId,
|
|
12260
12271
|
deliver: false,
|
|
12261
|
-
sessionKey:
|
|
12272
|
+
sessionKey: `hook:cohort:briefing-${args.requestId}`
|
|
12262
12273
|
}),
|
|
12263
12274
|
signal: AbortSignal.timeout(1e4)
|
|
12264
12275
|
});
|
|
12265
12276
|
if (!response.ok) {
|
|
12266
|
-
throw
|
|
12277
|
+
throw await buildHookResponseError(response);
|
|
12267
12278
|
}
|
|
12268
12279
|
}
|
|
12269
12280
|
var deliveryFailures = /* @__PURE__ */ new Map();
|
|
@@ -13730,7 +13741,7 @@ function dumpEvent(event) {
|
|
|
13730
13741
|
function positiveNumber(value) {
|
|
13731
13742
|
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
|
|
13732
13743
|
}
|
|
13733
|
-
var PLUGIN_VERSION = true ? "0.31.
|
|
13744
|
+
var PLUGIN_VERSION = true ? "0.31.11" : "unknown";
|
|
13734
13745
|
function resolveGatewayToken(api) {
|
|
13735
13746
|
const token2 = api.config?.gateway?.auth?.token;
|
|
13736
13747
|
return typeof token2 === "string" ? token2 : null;
|
package/dist/package.json
CHANGED
package/package.json
CHANGED