@openclaw/nextcloud-talk 2026.5.9-beta.1 → 2026.5.10-beta.1
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-
|
|
1
|
+
import { t as nextcloudTalkPlugin } from "./channel-DSNSV1Y5.js";
|
|
2
2
|
export { nextcloudTalkPlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as fetchWithSsrFGuard, c as
|
|
1
|
+
import { a as fetchWithSsrFGuard, c as resolveDefaultGroupPolicy, i as deliverFormattedTextWithAttachments, l as warnMissingProviderGroupPolicyFallbackOnce, o as logInboundDrop, r as createChannelPairingController, s as resolveAllowlistProviderRuntimeGroupPolicy, t as GROUP_POLICY_BLOCKED_LABEL, u as getNextcloudTalkRuntime } from "./runtime-api-D_apwxTv.js";
|
|
2
2
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DIa4Qbi_.js";
|
|
3
3
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-bczDw2-2.js";
|
|
4
4
|
import { describeWebhookAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
@@ -8,7 +8,7 @@ import { createAllowlistProviderRouteAllowlistWarningCollector } from "openclaw/
|
|
|
8
8
|
import { buildWebhookChannelStatusSummary, createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
9
9
|
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, normalizeAccountId, resolveAccountWithDefaultFallback, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-core";
|
|
10
10
|
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
11
|
-
import { convertMarkdownTables, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
|
11
|
+
import { convertMarkdownTables, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/text-runtime";
|
|
12
12
|
import { buildSecretInputSchema, hasConfiguredSecretInput, normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
13
13
|
import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
14
14
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
@@ -27,8 +27,9 @@ import { requireChannelOpenAllowFrom, resolveLoggerBackedRuntime, runStoppablePa
|
|
|
27
27
|
import { z } from "openclaw/plugin-sdk/zod";
|
|
28
28
|
import { createAccountStatusSink } from "openclaw/plugin-sdk/channel-lifecycle";
|
|
29
29
|
import os from "node:os";
|
|
30
|
+
import { channelIngressRoutes, resolveStableChannelMessageIngress } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
31
|
+
import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";
|
|
30
32
|
import { buildChannelKeyCandidates, normalizeChannelSlug, resolveChannelEntryMatchWithFallback, resolveNestedAllowlistDecision } from "openclaw/plugin-sdk/channel-targets";
|
|
31
|
-
import { evaluateMatchedGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access";
|
|
32
33
|
import { createServer } from "node:http";
|
|
33
34
|
import { WEBHOOK_RATE_LIMIT_DEFAULTS, createAuthRateLimiter, isRequestBodyLimitError, readRequestBodyWithLimit, requestBodyErrorToText } from "openclaw/plugin-sdk/webhook-ingress";
|
|
34
35
|
import path from "node:path";
|
|
@@ -441,11 +442,11 @@ const nextcloudTalkDoctor = {
|
|
|
441
442
|
};
|
|
442
443
|
//#endregion
|
|
443
444
|
//#region extensions/nextcloud-talk/src/policy.ts
|
|
444
|
-
function
|
|
445
|
+
function normalizeNextcloudTalkAllowEntry(raw) {
|
|
445
446
|
return raw.trim().replace(/^(nextcloud-talk|nc-talk|nc):/i, "").toLowerCase();
|
|
446
447
|
}
|
|
447
448
|
function normalizeNextcloudTalkAllowlist(values) {
|
|
448
|
-
return (values ?? []).map((value) =>
|
|
449
|
+
return (values ?? []).map((value) => normalizeNextcloudTalkAllowEntry(String(value))).filter(Boolean);
|
|
449
450
|
}
|
|
450
451
|
function resolveNextcloudTalkAllowlistMatch(params) {
|
|
451
452
|
const allowFrom = normalizeNextcloudTalkAllowlist(params.allowFrom);
|
|
@@ -455,7 +456,7 @@ function resolveNextcloudTalkAllowlistMatch(params) {
|
|
|
455
456
|
matchKey: "*",
|
|
456
457
|
matchSource: "wildcard"
|
|
457
458
|
};
|
|
458
|
-
const senderId =
|
|
459
|
+
const senderId = normalizeNextcloudTalkAllowEntry(params.senderId);
|
|
459
460
|
if (allowFrom.includes(senderId)) return {
|
|
460
461
|
allowed: true,
|
|
461
462
|
matchKey: senderId,
|
|
@@ -503,39 +504,6 @@ function resolveNextcloudTalkRequireMention(params) {
|
|
|
503
504
|
if (typeof params.wildcardConfig?.requireMention === "boolean") return params.wildcardConfig.requireMention;
|
|
504
505
|
return true;
|
|
505
506
|
}
|
|
506
|
-
function resolveNextcloudTalkGroupAllow(params) {
|
|
507
|
-
const outerAllow = normalizeNextcloudTalkAllowlist(params.outerAllowFrom);
|
|
508
|
-
const innerAllow = normalizeNextcloudTalkAllowlist(params.innerAllowFrom);
|
|
509
|
-
const outerMatch = resolveNextcloudTalkAllowlistMatch({
|
|
510
|
-
allowFrom: params.outerAllowFrom,
|
|
511
|
-
senderId: params.senderId
|
|
512
|
-
});
|
|
513
|
-
const innerMatch = resolveNextcloudTalkAllowlistMatch({
|
|
514
|
-
allowFrom: params.innerAllowFrom,
|
|
515
|
-
senderId: params.senderId
|
|
516
|
-
});
|
|
517
|
-
return {
|
|
518
|
-
allowed: evaluateMatchedGroupAccessForPolicy({
|
|
519
|
-
groupPolicy: params.groupPolicy,
|
|
520
|
-
allowlistConfigured: outerAllow.length > 0 || innerAllow.length > 0,
|
|
521
|
-
allowlistMatched: resolveNestedAllowlistDecision({
|
|
522
|
-
outerConfigured: outerAllow.length > 0 || innerAllow.length > 0,
|
|
523
|
-
outerMatched: outerAllow.length > 0 ? outerMatch.allowed : true,
|
|
524
|
-
innerConfigured: innerAllow.length > 0,
|
|
525
|
-
innerMatched: innerMatch.allowed
|
|
526
|
-
})
|
|
527
|
-
}).allowed,
|
|
528
|
-
outerMatch: params.groupPolicy === "open" ? { allowed: true } : params.groupPolicy === "disabled" ? { allowed: false } : outerMatch,
|
|
529
|
-
innerMatch: params.groupPolicy === "open" ? { allowed: true } : params.groupPolicy === "disabled" ? { allowed: false } : innerMatch
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
function resolveNextcloudTalkMentionGate(params) {
|
|
533
|
-
const shouldBypassMention = params.isGroup && params.requireMention && !params.wasMentioned && params.allowTextCommands && params.commandAuthorized && params.hasControlCommand;
|
|
534
|
-
return {
|
|
535
|
-
shouldBypassMention,
|
|
536
|
-
shouldSkip: params.requireMention && !params.wasMentioned && !shouldBypassMention
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
507
|
//#endregion
|
|
540
508
|
//#region extensions/nextcloud-talk/src/room-info.ts
|
|
541
509
|
const ROOM_CACHE_TTL_MS = 300 * 1e3;
|
|
@@ -769,6 +737,40 @@ async function sendMessageNextcloudTalk(to, text, opts) {
|
|
|
769
737
|
//#endregion
|
|
770
738
|
//#region extensions/nextcloud-talk/src/inbound.ts
|
|
771
739
|
const CHANNEL_ID = "nextcloud-talk";
|
|
740
|
+
function hasAllowEntries(entries) {
|
|
741
|
+
return normalizeNextcloudTalkAllowlist(entries).length > 0;
|
|
742
|
+
}
|
|
743
|
+
function roomRoutes(params) {
|
|
744
|
+
if (!params.isGroup) return [];
|
|
745
|
+
const roomSenderConfigured = params.groupPolicy === "allowlist" && hasAllowEntries(params.roomAllowFrom);
|
|
746
|
+
return channelIngressRoutes(params.roomMatch.allowlistConfigured && {
|
|
747
|
+
id: "nextcloud-talk:room",
|
|
748
|
+
allowed: params.roomMatch.allowed,
|
|
749
|
+
precedence: 0,
|
|
750
|
+
matchId: "nextcloud-talk-room",
|
|
751
|
+
blockReason: "room_not_allowlisted"
|
|
752
|
+
}, params.roomConfig?.enabled === false && {
|
|
753
|
+
id: "nextcloud-talk:room-enabled",
|
|
754
|
+
enabled: false,
|
|
755
|
+
precedence: 10,
|
|
756
|
+
blockReason: "room_disabled"
|
|
757
|
+
}, roomSenderConfigured && {
|
|
758
|
+
id: "nextcloud-talk:room-sender",
|
|
759
|
+
kind: "nestedAllowlist",
|
|
760
|
+
precedence: 20,
|
|
761
|
+
blockReason: "room_sender_not_allowlisted",
|
|
762
|
+
...!hasAllowEntries(params.outerGroupAllowFrom) ? {
|
|
763
|
+
senderPolicy: "replace",
|
|
764
|
+
senderAllowFrom: params.roomAllowFrom
|
|
765
|
+
} : {
|
|
766
|
+
allowed: resolveNextcloudTalkAllowlistMatch({
|
|
767
|
+
allowFrom: params.roomAllowFrom,
|
|
768
|
+
senderId: params.senderId
|
|
769
|
+
}).allowed,
|
|
770
|
+
matchId: "nextcloud-talk-room-sender"
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
}
|
|
772
774
|
async function deliverNextcloudTalkReply(params) {
|
|
773
775
|
const { cfg, payload, roomToken, accountId, statusSink } = params;
|
|
774
776
|
await deliverFormattedTextWithAttachments({
|
|
@@ -804,83 +806,103 @@ async function handleNextcloudTalkInbound(params) {
|
|
|
804
806
|
const roomToken = message.roomToken;
|
|
805
807
|
const roomName = message.roomName;
|
|
806
808
|
statusSink?.({ lastInboundAt: message.timestamp });
|
|
807
|
-
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
|
808
|
-
const defaultGroupPolicy = resolveDefaultGroupPolicy(config);
|
|
809
|
-
const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
|
|
810
|
-
providerConfigPresent: (config.channels?.["nextcloud-talk"] ?? void 0) !== void 0,
|
|
811
|
-
groupPolicy: account.config.groupPolicy,
|
|
812
|
-
defaultGroupPolicy
|
|
813
|
-
});
|
|
814
|
-
warnMissingProviderGroupPolicyFallbackOnce({
|
|
815
|
-
providerMissingFallbackApplied,
|
|
816
|
-
providerKey: "nextcloud-talk",
|
|
817
|
-
accountId: account.accountId,
|
|
818
|
-
blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
|
|
819
|
-
log: (message) => runtime.log?.(message)
|
|
820
|
-
});
|
|
821
|
-
const configAllowFrom = normalizeNextcloudTalkAllowlist(account.config.allowFrom);
|
|
822
|
-
const configGroupAllowFrom = normalizeNextcloudTalkAllowlist(account.config.groupAllowFrom);
|
|
823
|
-
const storeAllowList = normalizeNextcloudTalkAllowlist(await readStoreAllowFromForDmPolicy({
|
|
824
|
-
provider: CHANNEL_ID,
|
|
825
|
-
accountId: account.accountId,
|
|
826
|
-
dmPolicy,
|
|
827
|
-
readStore: pairing.readStoreForDmPolicy
|
|
828
|
-
}));
|
|
829
809
|
const roomMatch = resolveNextcloudTalkRoomMatch({
|
|
830
810
|
rooms: account.config.rooms,
|
|
831
811
|
roomToken
|
|
832
812
|
});
|
|
833
813
|
const roomConfig = roomMatch.roomConfig;
|
|
834
|
-
if (isGroup && !roomMatch.allowed) {
|
|
835
|
-
runtime.log?.(`nextcloud-talk: drop room ${roomToken} (not allowlisted)`);
|
|
836
|
-
return;
|
|
837
|
-
}
|
|
838
|
-
if (roomConfig?.enabled === false) {
|
|
839
|
-
runtime.log?.(`nextcloud-talk: drop room ${roomToken} (disabled)`);
|
|
840
|
-
return;
|
|
841
|
-
}
|
|
842
|
-
const roomAllowFrom = normalizeNextcloudTalkAllowlist(roomConfig?.allowFrom);
|
|
843
814
|
const allowTextCommands = core.channel.commands.shouldHandleTextCommands({
|
|
844
815
|
cfg: config,
|
|
845
816
|
surface: CHANNEL_ID
|
|
846
817
|
});
|
|
847
|
-
const useAccessGroups = config.commands?.useAccessGroups !== false;
|
|
848
818
|
const hasControlCommand = core.channel.text.hasControlCommand(rawBody, config);
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
|
|
819
|
+
const shouldRequireMention = isGroup ? resolveNextcloudTalkRequireMention({
|
|
820
|
+
roomConfig,
|
|
821
|
+
wildcardConfig: roomMatch.wildcardConfig
|
|
822
|
+
}) : false;
|
|
823
|
+
const { groupPolicy, providerMissingFallbackApplied } = resolveAllowlistProviderRuntimeGroupPolicy({
|
|
824
|
+
providerConfigPresent: (config.channels?.[CHANNEL_ID] ?? void 0) !== void 0,
|
|
825
|
+
groupPolicy: account.config.groupPolicy,
|
|
826
|
+
defaultGroupPolicy: resolveDefaultGroupPolicy(config)
|
|
827
|
+
});
|
|
828
|
+
const allowFrom = normalizeStringEntries(account.config.allowFrom);
|
|
829
|
+
const outerGroupAllowFrom = account.config.groupAllowFrom?.length ? normalizeStringEntries(account.config.groupAllowFrom) : allowFrom;
|
|
830
|
+
const roomAllowFrom = normalizeStringEntries(roomConfig?.allowFrom);
|
|
831
|
+
const resolveAccess = async (wasMentioned) => await resolveStableChannelMessageIngress({
|
|
832
|
+
channelId: CHANNEL_ID,
|
|
833
|
+
accountId: account.accountId,
|
|
834
|
+
identity: {
|
|
835
|
+
key: "nextcloud-talk-user-id",
|
|
836
|
+
normalize: (value) => normalizeNextcloudTalkAllowEntry(value) || null,
|
|
837
|
+
sensitivity: "pii",
|
|
838
|
+
entryIdPrefix: "nextcloud-talk-entry"
|
|
839
|
+
},
|
|
840
|
+
cfg: config,
|
|
841
|
+
readStoreAllowFrom: async () => await pairing.readStoreForDmPolicy(CHANNEL_ID, account.accountId),
|
|
842
|
+
subject: { stableId: senderId },
|
|
843
|
+
conversation: {
|
|
844
|
+
kind: isGroup ? "group" : "direct",
|
|
845
|
+
id: isGroup ? roomToken : senderId
|
|
846
|
+
},
|
|
847
|
+
route: roomRoutes({
|
|
848
|
+
isGroup,
|
|
849
|
+
groupPolicy,
|
|
850
|
+
roomMatch,
|
|
851
|
+
roomConfig,
|
|
852
|
+
senderId,
|
|
853
|
+
outerGroupAllowFrom,
|
|
854
|
+
roomAllowFrom
|
|
855
|
+
}),
|
|
856
|
+
dmPolicy: account.config.dmPolicy ?? "pairing",
|
|
852
857
|
groupPolicy,
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
}
|
|
858
|
+
policy: {
|
|
859
|
+
groupAllowFromFallbackToAllowFrom: true,
|
|
860
|
+
activation: {
|
|
861
|
+
requireMention: isGroup && shouldRequireMention,
|
|
862
|
+
allowTextCommands
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
mentionFacts: isGroup && wasMentioned !== void 0 ? {
|
|
866
|
+
canDetectMention: true,
|
|
867
|
+
wasMentioned,
|
|
868
|
+
hasAnyMention: wasMentioned
|
|
869
|
+
} : void 0,
|
|
870
|
+
allowFrom,
|
|
871
|
+
groupAllowFrom: account.config.groupAllowFrom,
|
|
860
872
|
command: {
|
|
861
|
-
useAccessGroups,
|
|
862
873
|
allowTextCommands,
|
|
863
874
|
hasControlCommand
|
|
864
875
|
}
|
|
865
876
|
});
|
|
866
|
-
|
|
867
|
-
|
|
877
|
+
let access = await resolveAccess();
|
|
878
|
+
warnMissingProviderGroupPolicyFallbackOnce({
|
|
879
|
+
providerMissingFallbackApplied,
|
|
880
|
+
providerKey: "nextcloud-talk",
|
|
881
|
+
accountId: account.accountId,
|
|
882
|
+
blockedLabel: GROUP_POLICY_BLOCKED_LABEL.room,
|
|
883
|
+
log: (message) => runtime.log?.(message)
|
|
884
|
+
});
|
|
885
|
+
const commandAuthorized = access.commandAccess.authorized;
|
|
886
|
+
const accessReason = access.ingress.reasonCode === "route_blocked" ? "route blocked" : access.senderAccess.reasonCode;
|
|
868
887
|
if (isGroup) {
|
|
869
|
-
if (access.
|
|
870
|
-
runtime.log?.(`nextcloud-talk: drop
|
|
888
|
+
if (access.routeAccess.reason === "room_not_allowlisted") {
|
|
889
|
+
runtime.log?.(`nextcloud-talk: drop room ${roomToken} (not allowlisted)`);
|
|
871
890
|
return;
|
|
872
891
|
}
|
|
873
|
-
if (
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}).allowed) {
|
|
892
|
+
if (access.routeAccess.reason === "room_disabled") {
|
|
893
|
+
runtime.log?.(`nextcloud-talk: drop room ${roomToken} (disabled)`);
|
|
894
|
+
return;
|
|
895
|
+
}
|
|
896
|
+
if (access.routeAccess.reason === "room_sender_not_allowlisted") {
|
|
879
897
|
runtime.log?.(`nextcloud-talk: drop group sender ${senderId} (policy=${groupPolicy})`);
|
|
880
898
|
return;
|
|
881
899
|
}
|
|
882
|
-
|
|
883
|
-
|
|
900
|
+
if (access.senderAccess.decision !== "allow") {
|
|
901
|
+
runtime.log?.(`nextcloud-talk: drop group sender ${senderId} (reason=${accessReason})`);
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
} else if (access.senderAccess.decision !== "allow") {
|
|
905
|
+
if (access.senderAccess.decision === "pairing") await pairing.issueChallenge({
|
|
884
906
|
senderId,
|
|
885
907
|
senderIdLine: `Your Nextcloud user id: ${senderId}`,
|
|
886
908
|
meta: { name: senderName || void 0 },
|
|
@@ -895,10 +917,10 @@ async function handleNextcloudTalkInbound(params) {
|
|
|
895
917
|
runtime.error?.(`nextcloud-talk: pairing reply failed for ${senderId}: ${String(err)}`);
|
|
896
918
|
}
|
|
897
919
|
});
|
|
898
|
-
runtime.log?.(`nextcloud-talk: drop DM sender ${senderId} (reason=${
|
|
920
|
+
runtime.log?.(`nextcloud-talk: drop DM sender ${senderId} (reason=${accessReason})`);
|
|
899
921
|
return;
|
|
900
922
|
}
|
|
901
|
-
if (access.shouldBlockControlCommand) {
|
|
923
|
+
if (access.commandAccess.shouldBlockControlCommand) {
|
|
902
924
|
logInboundDrop({
|
|
903
925
|
log: (message) => runtime.log?.(message),
|
|
904
926
|
channel: CHANNEL_ID,
|
|
@@ -909,43 +931,27 @@ async function handleNextcloudTalkInbound(params) {
|
|
|
909
931
|
}
|
|
910
932
|
const mentionRegexes = core.channel.mentions.buildMentionRegexes(config);
|
|
911
933
|
const wasMentioned = mentionRegexes.length ? core.channel.mentions.matchesMentionPatterns(rawBody, mentionRegexes) : false;
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
requireMention: isGroup ? resolveNextcloudTalkRequireMention({
|
|
915
|
-
roomConfig,
|
|
916
|
-
wildcardConfig: roomMatch.wildcardConfig
|
|
917
|
-
}) : false,
|
|
918
|
-
wasMentioned,
|
|
919
|
-
allowTextCommands,
|
|
920
|
-
hasControlCommand,
|
|
921
|
-
commandAuthorized
|
|
922
|
-
});
|
|
923
|
-
if (isGroup && mentionGate.shouldSkip) {
|
|
934
|
+
if (isGroup) access = await resolveAccess(wasMentioned);
|
|
935
|
+
if (isGroup && access.activationAccess.shouldSkip) {
|
|
924
936
|
runtime.log?.(`nextcloud-talk: drop room ${roomToken} (no mention)`);
|
|
925
937
|
return;
|
|
926
938
|
}
|
|
927
|
-
const route =
|
|
939
|
+
const { route, buildEnvelope } = resolveInboundRouteEnvelopeBuilderWithRuntime({
|
|
928
940
|
cfg: config,
|
|
929
941
|
channel: CHANNEL_ID,
|
|
930
942
|
accountId: account.accountId,
|
|
931
943
|
peer: {
|
|
932
944
|
kind: isGroup ? "group" : "direct",
|
|
933
945
|
id: isGroup ? roomToken : senderId
|
|
934
|
-
}
|
|
946
|
+
},
|
|
947
|
+
runtime: core.channel,
|
|
948
|
+
sessionStore: config.session?.store
|
|
935
949
|
});
|
|
936
950
|
const fromLabel = isGroup ? `room:${roomName || roomToken}` : senderName || `user:${senderId}`;
|
|
937
|
-
const storePath =
|
|
938
|
-
const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(config);
|
|
939
|
-
const previousTimestamp = core.channel.session.readSessionUpdatedAt({
|
|
940
|
-
storePath,
|
|
941
|
-
sessionKey: route.sessionKey
|
|
942
|
-
});
|
|
943
|
-
const body = core.channel.reply.formatAgentEnvelope({
|
|
951
|
+
const { storePath, body } = buildEnvelope({
|
|
944
952
|
channel: "Nextcloud Talk",
|
|
945
953
|
from: fromLabel,
|
|
946
954
|
timestamp: message.timestamp,
|
|
947
|
-
previousTimestamp,
|
|
948
|
-
envelope: envelopeOptions,
|
|
949
955
|
body: rawBody
|
|
950
956
|
});
|
|
951
957
|
const groupSystemPrompt = normalizeOptionalString(roomConfig?.systemPrompt);
|
|
@@ -973,43 +979,35 @@ async function handleNextcloudTalkInbound(params) {
|
|
|
973
979
|
OriginatingTo: `nextcloud-talk:${roomToken}`,
|
|
974
980
|
CommandAuthorized: commandAuthorized
|
|
975
981
|
});
|
|
976
|
-
|
|
982
|
+
await core.channel.turn.runAssembled({
|
|
977
983
|
cfg: config,
|
|
978
|
-
agentId: route.agentId,
|
|
979
|
-
channel: CHANNEL_ID,
|
|
980
|
-
accountId: account.accountId
|
|
981
|
-
});
|
|
982
|
-
await core.channel.turn.runPrepared({
|
|
983
984
|
channel: CHANNEL_ID,
|
|
984
985
|
accountId: account.accountId,
|
|
986
|
+
agentId: route.agentId,
|
|
985
987
|
routeSessionKey: route.sessionKey,
|
|
986
988
|
storePath,
|
|
987
989
|
ctxPayload,
|
|
988
990
|
recordInboundSession: core.channel.session.recordInboundSession,
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
accountId: account.accountId,
|
|
1000
|
-
statusSink
|
|
1001
|
-
});
|
|
1002
|
-
},
|
|
1003
|
-
onError: (err, info) => {
|
|
1004
|
-
runtime.error?.(`nextcloud-talk ${info.kind} reply failed: ${String(err)}`);
|
|
1005
|
-
}
|
|
991
|
+
dispatchReplyWithBufferedBlockDispatcher: core.channel.reply.dispatchReplyWithBufferedBlockDispatcher,
|
|
992
|
+
delivery: {
|
|
993
|
+
deliver: async (payload) => {
|
|
994
|
+
await deliverNextcloudTalkReply({
|
|
995
|
+
cfg: config,
|
|
996
|
+
payload,
|
|
997
|
+
roomToken,
|
|
998
|
+
accountId: account.accountId,
|
|
999
|
+
statusSink
|
|
1000
|
+
});
|
|
1006
1001
|
},
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
skillFilter: roomConfig?.skills,
|
|
1010
|
-
disableBlockStreaming: typeof account.config.blockStreaming === "boolean" ? !account.config.blockStreaming : void 0
|
|
1002
|
+
onError: (err, info) => {
|
|
1003
|
+
runtime.error?.(`nextcloud-talk ${info.kind} reply failed: ${String(err)}`);
|
|
1011
1004
|
}
|
|
1012
|
-
}
|
|
1005
|
+
},
|
|
1006
|
+
replyPipeline: {},
|
|
1007
|
+
replyOptions: {
|
|
1008
|
+
skillFilter: roomConfig?.skills,
|
|
1009
|
+
disableBlockStreaming: typeof account.config.blockStreaming === "boolean" ? !account.config.blockStreaming : void 0
|
|
1010
|
+
},
|
|
1013
1011
|
record: { onRecordError: (err) => {
|
|
1014
1012
|
runtime.error?.(`nextcloud-talk: failed updating session meta: ${String(err)}`);
|
|
1015
1013
|
} }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as nextcloudTalkPlugin } from "./channel-
|
|
1
|
+
import { t as nextcloudTalkPlugin } from "./channel-DSNSV1Y5.js";
|
|
2
2
|
export { nextcloudTalkPlugin };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
|
|
2
|
-
import { readStoreAllowFromForDmPolicy, resolveDmGroupAccessWithCommandGate } from "openclaw/plugin-sdk/channel-policy";
|
|
3
2
|
import { logInboundDrop } from "openclaw/plugin-sdk/channel-logging";
|
|
4
3
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
5
4
|
import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-message";
|
|
@@ -12,4 +11,4 @@ const { setRuntime: setNextcloudTalkRuntime, getRuntime: getNextcloudTalkRuntime
|
|
|
12
11
|
errorMessage: "Nextcloud Talk runtime not initialized"
|
|
13
12
|
});
|
|
14
13
|
//#endregion
|
|
15
|
-
export { fetchWithSsrFGuard as a,
|
|
14
|
+
export { fetchWithSsrFGuard as a, resolveDefaultGroupPolicy as c, setNextcloudTalkRuntime as d, deliverFormattedTextWithAttachments as i, warnMissingProviderGroupPolicyFallbackOnce as l, createChannelMessageReplyPipeline as n, logInboundDrop as o, createChannelPairingController as r, resolveAllowlistProviderRuntimeGroupPolicy as s, GROUP_POLICY_BLOCKED_LABEL as t, getNextcloudTalkRuntime as u };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as fetchWithSsrFGuard, c as
|
|
2
|
-
export { GROUP_POLICY_BLOCKED_LABEL, createChannelMessageReplyPipeline, createChannelPairingController, deliverFormattedTextWithAttachments, fetchWithSsrFGuard, logInboundDrop,
|
|
1
|
+
import { a as fetchWithSsrFGuard, c as resolveDefaultGroupPolicy, d as setNextcloudTalkRuntime, i as deliverFormattedTextWithAttachments, l as warnMissingProviderGroupPolicyFallbackOnce, n as createChannelMessageReplyPipeline, o as logInboundDrop, r as createChannelPairingController, s as resolveAllowlistProviderRuntimeGroupPolicy, t as GROUP_POLICY_BLOCKED_LABEL } from "./runtime-api-D_apwxTv.js";
|
|
2
|
+
export { GROUP_POLICY_BLOCKED_LABEL, createChannelMessageReplyPipeline, createChannelPairingController, deliverFormattedTextWithAttachments, fetchWithSsrFGuard, logInboundDrop, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, setNextcloudTalkRuntime, warnMissingProviderGroupPolicyFallbackOnce };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/nextcloud-talk",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.10-beta.1",
|
|
4
4
|
"description": "OpenClaw Nextcloud Talk channel plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"openclaw": "workspace:*"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.5.
|
|
15
|
+
"openclaw": ">=2026.5.10-beta.1"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"minHostVersion": ">=2026.4.10"
|
|
45
45
|
},
|
|
46
46
|
"compat": {
|
|
47
|
-
"pluginApi": ">=2026.5.
|
|
47
|
+
"pluginApi": ">=2026.5.10-beta.1"
|
|
48
48
|
},
|
|
49
49
|
"build": {
|
|
50
|
-
"openclawVersion": "2026.5.
|
|
50
|
+
"openclawVersion": "2026.5.10-beta.1"
|
|
51
51
|
},
|
|
52
52
|
"release": {
|
|
53
53
|
"publishToClawHub": true,
|