@openclaw/nextcloud-talk 2026.6.33 → 2026.6.35

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/api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as nextcloudTalkPlugin } from "./channel-Df49F-hj.js";
1
+ import { t as nextcloudTalkPlugin } from "./channel-BpT1rYor.js";
2
2
  export { nextcloudTalkPlugin };
@@ -6,6 +6,7 @@ import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
6
6
  import { createLoggedPairingApprovalNotifier, createPairingPrefixStripper } from "openclaw/plugin-sdk/channel-pairing";
7
7
  import { createAllowlistProviderRouteAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
8
8
  import { buildWebhookChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
9
+ import { convertMarkdownTables, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
9
10
  import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, hasConfiguredAccountValue, normalizeAccountId, resolveAccountWithDefaultFallback, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-core";
10
11
  import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
11
12
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -19,7 +20,6 @@ import { ssrfPolicyFromPrivateNetworkOptIn, ssrfPolicyFromPrivateNetworkOptIn as
19
20
  import { readFileSync } from "node:fs";
20
21
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
21
22
  import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";
22
- import { convertMarkdownTables } from "openclaw/plugin-sdk/text-chunking";
23
23
  import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
24
24
  import { clearAccountEntryFields } from "openclaw/plugin-sdk/channel-plugin-common";
25
25
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$2 } from "openclaw/plugin-sdk/account-id";
@@ -36,6 +36,7 @@ import { resolveStateDir } from "openclaw/plugin-sdk/state-paths";
36
36
  import { channelIngressRoutes, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
37
37
  import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";
38
38
  import { buildChannelKeyCandidates, normalizeChannelSlug, resolveChannelEntryMatchWithFallback, resolveNestedAllowlistDecision } from "openclaw/plugin-sdk/channel-targets";
39
+ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
39
40
  import { createServer } from "node:http";
40
41
  import { WEBHOOK_RATE_LIMIT_DEFAULTS, createAuthRateLimiter, isRequestBodyLimitError, readRequestBodyWithLimit, requestBodyErrorToText } from "openclaw/plugin-sdk/webhook-ingress";
41
42
  import { jsonResult, readStringParam, resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions";
@@ -230,6 +231,7 @@ function generateNextcloudTalkSignature(params) {
230
231
  //#endregion
231
232
  //#region extensions/nextcloud-talk/src/bot-preflight.ts
232
233
  const BOT_FEATURE_RESPONSE = 2;
234
+ const BOT_PREFLIGHT_ERROR_BODY_LIMIT_BYTES = 8 * 1024;
233
235
  function normalizeUrlForMatch(value) {
234
236
  if (!value?.trim()) return "";
235
237
  try {
@@ -294,7 +296,7 @@ async function probeNextcloudTalkBotResponseFeature(params) {
294
296
  });
295
297
  try {
296
298
  if (!response.ok) {
297
- const body = await response.text().catch(() => "");
299
+ const body = await readResponseTextLimited(response, BOT_PREFLIGHT_ERROR_BODY_LIMIT_BYTES).catch(() => "");
298
300
  return {
299
301
  ok: false,
300
302
  code: "api_error",
@@ -641,10 +643,16 @@ function resolveNextcloudTalkRequireMention(params) {
641
643
  //#region extensions/nextcloud-talk/src/room-info.ts
642
644
  const ROOM_CACHE_TTL_MS = 300 * 1e3;
643
645
  const ROOM_CACHE_ERROR_TTL_MS = 30 * 1e3;
646
+ const ROOM_CACHE_MAX_ENTRIES = 1e3;
647
+ const NEXTCLOUD_TALK_ROOM_INFO_TIMEOUT_MS = 3e4;
644
648
  const roomCache = /* @__PURE__ */ new Map();
645
649
  function resolveRoomCacheKey(params) {
646
650
  return `${params.accountId}:${params.roomToken}`;
647
651
  }
652
+ function cacheRoomInfo(key, value) {
653
+ roomCache.set(key, value);
654
+ pruneMapToMaxSize(roomCache, ROOM_CACHE_MAX_ENTRIES);
655
+ }
648
656
  function coerceRoomType(value) {
649
657
  if (typeof value === "number" && Number.isSafeInteger(value) && value > 0) return value;
650
658
  return parseStrictPositiveInteger(value);
@@ -688,11 +696,12 @@ async function resolveNextcloudTalkRoomKind(params) {
688
696
  }
689
697
  },
690
698
  auditContext: "nextcloud-talk.room-info",
691
- policy: ssrfPolicyFromPrivateNetworkOptIn(account.config)
699
+ policy: ssrfPolicyFromPrivateNetworkOptIn(account.config),
700
+ timeoutMs: params.timeoutMs ?? NEXTCLOUD_TALK_ROOM_INFO_TIMEOUT_MS
692
701
  });
693
702
  try {
694
703
  if (!response.ok) {
695
- roomCache.set(key, {
704
+ cacheRoomInfo(key, {
696
705
  fetchedAt: Date.now(),
697
706
  error: `status:${response.status}`
698
707
  });
@@ -700,7 +709,7 @@ async function resolveNextcloudTalkRoomKind(params) {
700
709
  return;
701
710
  }
702
711
  const kind = resolveRoomKindFromType(coerceRoomType((await readProviderJsonResponse(response, "Nextcloud Talk room info failed")).ocs?.data?.type));
703
- roomCache.set(key, {
712
+ cacheRoomInfo(key, {
704
713
  fetchedAt: Date.now(),
705
714
  kind
706
715
  });
@@ -709,7 +718,7 @@ async function resolveNextcloudTalkRoomKind(params) {
709
718
  await release();
710
719
  }
711
720
  } catch (err) {
712
- roomCache.set(key, {
721
+ cacheRoomInfo(key, {
713
722
  fetchedAt: Date.now(),
714
723
  error: formatErrorMessage(err)
715
724
  });
@@ -952,7 +961,7 @@ function roomRoutes(params) {
952
961
  }
953
962
  async function deliverNextcloudTalkReply(params) {
954
963
  const { cfg, payload, roomToken, accountId, statusSink } = params;
955
- await deliverFormattedTextWithAttachments({
964
+ return { visibleReplySent: await deliverFormattedTextWithAttachments({
956
965
  payload,
957
966
  send: async ({ text, replyToId }) => {
958
967
  await sendMessageNextcloudTalk(roomToken, text, {
@@ -962,7 +971,7 @@ async function deliverNextcloudTalkReply(params) {
962
971
  });
963
972
  statusSink?.({ lastOutboundAt: Date.now() });
964
973
  }
965
- });
974
+ }) };
966
975
  }
967
976
  async function handleNextcloudTalkInbound(params) {
968
977
  const { message, account, config, runtime, statusSink } = params;
@@ -1169,8 +1178,12 @@ async function handleNextcloudTalkInbound(params) {
1169
1178
  recordInboundSession: core.channel.session.recordInboundSession,
1170
1179
  dispatchReplyWithBufferedBlockDispatcher: core.channel.reply.dispatchReplyWithBufferedBlockDispatcher,
1171
1180
  delivery: {
1181
+ preparePayload: (payload) => payload.text === void 0 ? payload : {
1182
+ ...payload,
1183
+ text: sanitizeAssistantVisibleText(payload.text)
1184
+ },
1172
1185
  deliver: async (payload) => {
1173
- await deliverNextcloudTalkReply({
1186
+ return await deliverNextcloudTalkReply({
1174
1187
  cfg: config,
1175
1188
  payload,
1176
1189
  roomToken,
@@ -2147,7 +2160,8 @@ const nextcloudTalkPlugin = createChatChannelPlugin({
2147
2160
  deliveryMode: "direct",
2148
2161
  chunker: (text, limit) => getNextcloudTalkRuntime().channel.text.chunkMarkdownText(text, limit),
2149
2162
  chunkerMode: "markdown",
2150
- textChunkLimit: 4e3
2163
+ textChunkLimit: 4e3,
2164
+ sanitizeText: ({ text }) => sanitizeAssistantVisibleText(text)
2151
2165
  },
2152
2166
  attachedResults: {
2153
2167
  channel: "nextcloud-talk",
@@ -1,2 +1,2 @@
1
- import { t as nextcloudTalkPlugin } from "./channel-Df49F-hj.js";
1
+ import { t as nextcloudTalkPlugin } from "./channel-BpT1rYor.js";
2
2
  export { nextcloudTalkPlugin };
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@openclaw/nextcloud-talk",
3
- "version": "2026.6.33",
3
+ "version": "2026.6.35",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/nextcloud-talk",
9
- "version": "2026.6.33",
9
+ "version": "2026.6.35",
10
10
  "dependencies": {
11
11
  "zod": "4.4.3"
12
12
  },
13
13
  "peerDependencies": {
14
- "openclaw": ">=2026.6.33"
14
+ "openclaw": ">=2026.6.35"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/nextcloud-talk",
3
- "version": "2026.6.33",
3
+ "version": "2026.6.35",
4
4
  "description": "OpenClaw Nextcloud Talk channel plugin for conversations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "type": "module",
10
10
  "peerDependencies": {
11
- "openclaw": ">=2026.6.33"
11
+ "openclaw": ">=2026.6.35"
12
12
  },
13
13
  "peerDependenciesMeta": {
14
14
  "openclaw": {
@@ -40,10 +40,10 @@
40
40
  "minHostVersion": ">=2026.4.10"
41
41
  },
42
42
  "compat": {
43
- "pluginApi": ">=2026.6.33"
43
+ "pluginApi": ">=2026.6.35"
44
44
  },
45
45
  "build": {
46
- "openclawVersion": "2026.6.33"
46
+ "openclawVersion": "2026.6.35"
47
47
  },
48
48
  "release": {
49
49
  "publishToClawHub": true,