@openclaw/msteams 2026.11.5-beta.1 → 2026.11.5-beta.2
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/.setup/{adapter.runtime-UOD_H_ph.cjs → adapter.runtime-BB38Rdj_.cjs} +5 -3
- package/dist/.setup/{approval-card-CD5q0Nla.cjs → approval-card-BHAKsdAM.cjs} +4 -2
- package/dist/.setup/{approval-handler.runtime-DbPxvynk.cjs → approval-handler.runtime-C16UvawQ.cjs} +6 -5
- package/dist/.setup/{bot-framework-service-url-CgVuKiIR.cjs → bot-framework-service-url-B3FWn2SV.cjs} +4 -2
- package/dist/.setup/{channel-DQrXOfhf.cjs → channel-BaTw0JW3.cjs} +44 -26
- package/dist/.setup/{channel.runtime-Du4GPMES.cjs → channel.runtime-Ch2M_-jN.cjs} +25 -17
- package/dist/.setup/{channel.setup--7ko_Kxv.cjs → channel.setup-B9yKGEse.cjs} +17 -11
- package/dist/.setup/{config-schema-BEXDIOC-.cjs → config-schema-3lVZ45cB.cjs} +4 -3
- package/dist/.setup/{conversation-store-state-AVgRyNE9.cjs → conversation-store-state-CVhMM0QY.cjs} +35 -21
- package/dist/.setup/{delegated-state-DhIHahf1.cjs → delegated-state-ilYzKwD8.cjs} +6 -4
- package/dist/.setup/{monitor-CXjIKz7o.cjs → monitor-b0zPpnmW.cjs} +67 -39
- package/dist/.setup/{oauth-BWG6qWCd.cjs → oauth-CUtfkgKE.cjs} +3 -2
- package/dist/.setup/{presentation-CaLawc5j.cjs → presentation-Duoi9Ijn.cjs} +5 -3
- package/dist/.setup/{reaction-types-DOzN5oTl.cjs → reaction-types-C6F6g2nk.cjs} +5 -3
- package/dist/.setup/{resolve-allowlist-Drj1jaq0.cjs → resolve-allowlist-7mIEepXB.cjs} +36 -20
- package/dist/.setup/{rolldown-runtime-CiKaZLfC.cjs → rolldown-runtime-BloeesfJ.cjs} +2 -1
- package/dist/.setup/{runtime-CbKazLGv.cjs → runtime-gZTAuFux.cjs} +2 -1
- package/dist/.setup/{secret-contract-api-DFqDvc_a.cjs → secret-contract-api-D554HIrH.cjs} +2 -1
- package/dist/.setup/{secret-contract-api-YGHrfAT0.cjs → secret-contract-api-r3hRtbBW.cjs} +1 -1
- package/dist/.setup/{send-BRUztzVJ.cjs → send-D1w7a_ip.cjs} +11 -9
- package/dist/.setup/{setup-plugin-api-BHEfter5.cjs → setup-plugin-api-ChovZJU6.cjs} +1 -1
- package/dist/.setup/{thread-session-BUUV1zk_.cjs → thread-session-CeWYiol_.cjs} +5 -3
- package/dist/.setup/{token-config-7K6UbNCo.cjs → token-config-DICiuJWr.cjs} +2 -1
- package/dist/.source-module-urls/7e43ee3ae4faab430a47269c8217f8d99ec60ecd85233f40e81d03efeb543068.json +1 -1
- package/dist/api.cjs +2 -2
- package/dist/channel-config-api.cjs +1 -1
- package/dist/channel-plugin-api.cjs +1 -1
- package/dist/configured-state.cjs +2 -1
- package/dist/directory-contract-api.cjs +2 -1
- package/dist/doctor-backup-resources.cjs +3 -2
- package/dist/doctor-contract-api.cjs +15 -9
- package/dist/index.cjs +2 -1
- package/dist/qa-runner-api.cjs +5 -3
- package/dist/runtime-api.cjs +1 -1
- package/dist/secret-contract-api.cjs +1 -1
- package/dist/setup-entry.cjs +4 -3
- package/dist/setup-plugin-api.cjs +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-BloeesfJ.cjs");
|
|
2
2
|
let node_url = require("node:url");
|
|
3
3
|
let openclaw_plugin_sdk_ssrf_runtime = require("openclaw/plugin-sdk/ssrf-runtime");
|
|
4
4
|
let openclaw_plugin_sdk_error_runtime = require("openclaw/plugin-sdk/error-runtime");
|
|
@@ -12,7 +12,7 @@ let node_events = require("node:events");
|
|
|
12
12
|
let node_http = require("node:http");
|
|
13
13
|
let node_stream_consumers = require("node:stream/consumers");
|
|
14
14
|
let openclaw_plugin_sdk_http_response_runtime = require("openclaw/plugin-sdk/http-response-runtime");
|
|
15
|
-
|
|
15
|
+
//#region extensions/msteams/src/qa/bot-framework-server.ts
|
|
16
16
|
const AMBIGUOUS_GATEWAY_TIMEOUT_MARKER = "QA-MSTEAMS-AMBIGUOUS-504";
|
|
17
17
|
async function readJson(request) {
|
|
18
18
|
const body = (await (0, node_stream_consumers.buffer)(request)).toString("utf8");
|
|
@@ -67,7 +67,8 @@ async function startMSTeamsQaBotFrameworkServer(options) {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region extensions/msteams/src/qa/adapter.runtime.ts
|
|
71
72
|
const SERVICE_URL = "https://smba.trafficmanager.net/qa";
|
|
72
73
|
const APP_ID = "qa-msteams-app";
|
|
73
74
|
const TENANT_ID = "qa-msteams-tenant";
|
|
@@ -301,4 +302,5 @@ async function createMSTeamsQaTransportAdapter(context) {
|
|
|
301
302
|
}
|
|
302
303
|
};
|
|
303
304
|
}
|
|
305
|
+
//#endregion
|
|
304
306
|
exports.createMSTeamsQaTransportAdapter = createMSTeamsQaTransportAdapter;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
2
2
|
let openclaw_plugin_sdk_approval_runtime = require("openclaw/plugin-sdk/approval-runtime");
|
|
3
|
-
|
|
3
|
+
//#region extensions/msteams/src/approval-card-actions.ts
|
|
4
4
|
const msTeamsApprovalControls = (0, openclaw_plugin_sdk_approval_runtime.createNativeApprovalControlRegistry)({ releaseClaimOnLookupExpiry: true });
|
|
5
5
|
function readMSTeamsApprovalActionToken(value) {
|
|
6
6
|
if (!(0, openclaw_plugin_sdk_string_coerce_runtime.isRecord)(value)) return null;
|
|
@@ -9,7 +9,8 @@ function readMSTeamsApprovalActionToken(value) {
|
|
|
9
9
|
if (submitted.openclawAction !== "approval") return null;
|
|
10
10
|
return (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(submitted.token) ?? null;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region extensions/msteams/src/approval-card.ts
|
|
13
14
|
function formatMSTeamsApprovalKind(kind) {
|
|
14
15
|
return kind === "plugin" ? "Plugin" : kind === "system-agent" ? "OpenClaw Change" : "Exec";
|
|
15
16
|
}
|
|
@@ -194,6 +195,7 @@ function buildMSTeamsCanonicalApprovalTerminalCard(result) {
|
|
|
194
195
|
buildApprovalMetadata(approval.id, metadata)
|
|
195
196
|
]);
|
|
196
197
|
}
|
|
198
|
+
//#endregion
|
|
197
199
|
Object.defineProperty(exports, "buildMSTeamsCanonicalApprovalTerminalCard", {
|
|
198
200
|
enumerable: true,
|
|
199
201
|
get: function() {
|
package/dist/.setup/{approval-handler.runtime-DbPxvynk.cjs → approval-handler.runtime-C16UvawQ.cjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_resolve_allowlist = require("./resolve-allowlist-
|
|
2
|
-
const require_channel = require("./channel-
|
|
3
|
-
const require_approval_card = require("./approval-card-
|
|
4
|
-
const require_send = require("./send-
|
|
1
|
+
const require_resolve_allowlist = require("./resolve-allowlist-7mIEepXB.cjs");
|
|
2
|
+
const require_channel = require("./channel-BaTw0JW3.cjs");
|
|
3
|
+
const require_approval_card = require("./approval-card-BHAKsdAM.cjs");
|
|
4
|
+
const require_send = require("./send-D1w7a_ip.cjs");
|
|
5
5
|
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
6
6
|
let openclaw_plugin_sdk_approval_native_runtime = require("openclaw/plugin-sdk/approval-native-runtime");
|
|
7
7
|
let openclaw_plugin_sdk_approval_handler_runtime = require("openclaw/plugin-sdk/approval-handler-runtime");
|
|
8
|
-
|
|
8
|
+
//#region extensions/msteams/src/approval-handler.runtime.ts
|
|
9
9
|
const log = (0, require("openclaw/plugin-sdk/runtime-env").createSubsystemLogger)("msteams/approvals");
|
|
10
10
|
const msTeamsApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handler_runtime.createChannelApprovalNativeRuntimeAdapterAsync)({
|
|
11
11
|
eventKinds: [
|
|
@@ -117,4 +117,5 @@ const msTeamsApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handler_ru
|
|
|
117
117
|
});
|
|
118
118
|
} }
|
|
119
119
|
});
|
|
120
|
+
//#endregion
|
|
120
121
|
exports.msTeamsApprovalNativeRuntime = msTeamsApprovalNativeRuntime;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
2
2
|
let openclaw_plugin_sdk_ssrf_policy = require("openclaw/plugin-sdk/ssrf-policy");
|
|
3
|
-
|
|
3
|
+
//#region extensions/msteams/src/accounts-webhook.ts
|
|
4
4
|
function resolveMSTeamsWebhookPath(channelConfig, accountId, account) {
|
|
5
5
|
const rootPath = channelConfig?.webhook?.path?.trim() || "/api/messages";
|
|
6
6
|
return account?.webhook?.path?.trim() || (accountId === openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID ? rootPath : `${rootPath.replace(/\/+$/u, "")}/${accountId}`);
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region extensions/msteams/src/bot-framework-service-url.ts
|
|
9
10
|
const BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST = (0, openclaw_plugin_sdk_ssrf_policy.normalizeHostnameSuffixAllowlist)([
|
|
10
11
|
"smba.trafficmanager.net",
|
|
11
12
|
"smba.infra.gcc.teams.microsoft.com",
|
|
@@ -30,6 +31,7 @@ function normalizeBotFrameworkServiceUrl(serviceUrl) {
|
|
|
30
31
|
if (normalized) return normalized;
|
|
31
32
|
throw new Error(`Blocked Microsoft Teams serviceUrl host: ${describeBotFrameworkServiceUrlHost(serviceUrl)}`);
|
|
32
33
|
}
|
|
34
|
+
//#endregion
|
|
33
35
|
Object.defineProperty(exports, "describeBotFrameworkServiceUrlHost", {
|
|
34
36
|
enumerable: true,
|
|
35
37
|
get: function() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_resolve_allowlist = require("./resolve-allowlist-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-BloeesfJ.cjs");
|
|
2
|
+
const require_resolve_allowlist = require("./resolve-allowlist-7mIEepXB.cjs");
|
|
3
3
|
require("../runtime-api.cjs");
|
|
4
4
|
const require_directory_contract_api = require("../directory-contract-api.cjs");
|
|
5
|
-
const require_presentation = require("./presentation-
|
|
6
|
-
const require_thread_session = require("./thread-session-
|
|
7
|
-
const require_channel_setup = require("./channel.setup
|
|
5
|
+
const require_presentation = require("./presentation-Duoi9Ijn.cjs");
|
|
6
|
+
const require_thread_session = require("./thread-session-CeWYiol_.cjs");
|
|
7
|
+
const require_channel_setup = require("./channel.setup-B9yKGEse.cjs");
|
|
8
8
|
let openclaw_plugin_sdk_approval_handler_adapter_runtime = require("openclaw/plugin-sdk/approval-handler-adapter-runtime");
|
|
9
9
|
let openclaw_plugin_sdk_channel_actions = require("openclaw/plugin-sdk/channel-actions");
|
|
10
10
|
let openclaw_plugin_sdk_channel_core = require("openclaw/plugin-sdk/channel-core");
|
|
@@ -27,7 +27,7 @@ let typebox = require("typebox");
|
|
|
27
27
|
let openclaw_plugin_sdk_dangerous_name_runtime = require("openclaw/plugin-sdk/dangerous-name-runtime");
|
|
28
28
|
let openclaw_plugin_sdk_runtime_group_policy = require("openclaw/plugin-sdk/runtime-group-policy");
|
|
29
29
|
let openclaw_plugin_sdk_channel_status = require("openclaw/plugin-sdk/channel-status");
|
|
30
|
-
|
|
30
|
+
//#region extensions/msteams/src/action-params.ts
|
|
31
31
|
/** Text and upload-source aliases shared by Teams message actions. */
|
|
32
32
|
function resolveActionContent(params) {
|
|
33
33
|
return typeof params.text === "string" ? params.text : typeof params.content === "string" ? params.content : typeof params.message === "string" ? params.message : "";
|
|
@@ -42,7 +42,8 @@ function resolveActionUploadFilePath(params) {
|
|
|
42
42
|
if (value.trim()) return value;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region extensions/msteams/src/action-results.ts
|
|
46
47
|
function jsonActionResult(data, details = data) {
|
|
47
48
|
return (0, openclaw_plugin_sdk_tool_results.textResult)(JSON.stringify(data), details);
|
|
48
49
|
}
|
|
@@ -77,7 +78,8 @@ function actionError(message) {
|
|
|
77
78
|
...(0, openclaw_plugin_sdk_tool_results.textResult)(message, { error: message })
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
|
-
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region extensions/msteams/src/action-threading.ts
|
|
81
83
|
/** Normalize Teams conversation targets for equality (strips `conversation:` and `;messageid=`). */
|
|
82
84
|
function normalizeMSTeamsThreadingTarget(raw) {
|
|
83
85
|
const value = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(raw);
|
|
@@ -142,7 +144,8 @@ function resolveMSTeamsAutoThreadId(params) {
|
|
|
142
144
|
if ((0, openclaw_plugin_sdk_reply_reference.isSingleUseReplyToMode)(context.replyToMode ?? "off") && context.hasRepliedRef?.value) return;
|
|
143
145
|
return context.currentThreadTs;
|
|
144
146
|
}
|
|
145
|
-
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region extensions/msteams/src/approval-native.ts
|
|
146
149
|
function isMSTeamsApprovalTransportEnabled(params) {
|
|
147
150
|
const account = require_resolve_allowlist.resolveMSTeamsAccount(params);
|
|
148
151
|
return account.enabled && account.configured && account.tokenStatus === "available";
|
|
@@ -217,7 +220,7 @@ const msTeamsLazyApprovalNativeRuntime = (0, openclaw_plugin_sdk_approval_handle
|
|
|
217
220
|
request
|
|
218
221
|
}),
|
|
219
222
|
load: async () => {
|
|
220
|
-
const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-
|
|
223
|
+
const { msTeamsApprovalNativeRuntime } = await Promise.resolve().then(() => require("./approval-handler.runtime-C16UvawQ.cjs"));
|
|
221
224
|
return msTeamsApprovalNativeRuntime;
|
|
222
225
|
}
|
|
223
226
|
});
|
|
@@ -263,7 +266,8 @@ const msTeamsApprovalCapability = {
|
|
|
263
266
|
}),
|
|
264
267
|
authorizeActorActionAsync: async (params) => require_thread_session.msTeamsApprovalAuth.authorizeActorAction?.(params)
|
|
265
268
|
};
|
|
266
|
-
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region extensions/msteams/src/channel-message-tool.ts
|
|
267
271
|
function describeMSTeamsMessageTool({ cfg, accountId }) {
|
|
268
272
|
const account = require_resolve_allowlist.resolveMSTeamsAccount({
|
|
269
273
|
cfg,
|
|
@@ -297,7 +301,8 @@ function describeMSTeamsMessageTool({ cfg, accountId }) {
|
|
|
297
301
|
} : null
|
|
298
302
|
};
|
|
299
303
|
}
|
|
300
|
-
|
|
304
|
+
//#endregion
|
|
305
|
+
//#region src/gateway/gateway-http-route-contracts.ts
|
|
301
306
|
const GATEWAY_PROBE_ROUTES = /* @__PURE__ */ new Map([
|
|
302
307
|
["/health", "live"],
|
|
303
308
|
["/healthz", "live"],
|
|
@@ -313,7 +318,8 @@ function classifyGatewayProbePath(pathname) {
|
|
|
313
318
|
}
|
|
314
319
|
return "outside";
|
|
315
320
|
}
|
|
316
|
-
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region packages/normalization-core/src/string-coerce.ts
|
|
317
323
|
/** Trims string input and returns null for non-strings or empty strings. */
|
|
318
324
|
function normalizeNullableString(value) {
|
|
319
325
|
if (typeof value !== "string") return null;
|
|
@@ -332,11 +338,13 @@ function normalizeOptionalLowercaseString(value) {
|
|
|
332
338
|
function normalizeLowercaseStringOrEmpty$1(value) {
|
|
333
339
|
return normalizeOptionalLowercaseString(value) ?? "";
|
|
334
340
|
}
|
|
335
|
-
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/plugins/http-path-prefix.ts
|
|
336
343
|
function prefixMatchPath(pathname, prefix) {
|
|
337
344
|
return pathname === prefix || pathname.startsWith(`${prefix}/`) || pathname.startsWith(`${prefix}%`);
|
|
338
345
|
}
|
|
339
|
-
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/gateway/security-path.ts
|
|
340
348
|
const MAX_PATH_DECODE_PASSES = 32;
|
|
341
349
|
function normalizePathSeparators(pathname) {
|
|
342
350
|
const collapsed = pathname.replace(/\/{2,}/g, "/");
|
|
@@ -385,7 +393,8 @@ function canonicalizePathForSecurity(pathname) {
|
|
|
385
393
|
};
|
|
386
394
|
}
|
|
387
395
|
const PROTECTED_PLUGIN_ROUTE_PREFIXES = ["/api/channels"];
|
|
388
|
-
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region src/gateway/server/plugins-http/path-context.ts
|
|
389
398
|
function normalizeProtectedPrefix(prefix) {
|
|
390
399
|
const collapsed = normalizeLowercaseStringOrEmpty$1(prefix).replace(/\/{2,}/g, "/");
|
|
391
400
|
if (collapsed.length <= 1) return collapsed || "/";
|
|
@@ -411,14 +420,16 @@ function resolvePluginRoutePathContext(pathname) {
|
|
|
411
420
|
rawNormalizedPath: canonical.rawNormalizedPath
|
|
412
421
|
};
|
|
413
422
|
}
|
|
414
|
-
|
|
423
|
+
//#endregion
|
|
424
|
+
//#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/gateway-config-runtime
|
|
415
425
|
var gateway_config_runtime_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
416
426
|
classifyGatewayProbePath: () => classifyGatewayProbePath,
|
|
417
427
|
isProtectedPluginRoutePathFromContext: () => isProtectedPluginRoutePathFromContext,
|
|
418
428
|
resolvePluginRoutePathContext: () => resolvePluginRoutePathContext
|
|
419
429
|
});
|
|
420
430
|
require_rolldown_runtime.__reExport(gateway_config_runtime_exports, require("openclaw/plugin-sdk/gateway-config-runtime"));
|
|
421
|
-
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region extensions/msteams/src/webhook-route.ts
|
|
422
433
|
function resolveMSTeamsWebhookCollisionIssue(cfg) {
|
|
423
434
|
const owners = /* @__PURE__ */ new Map();
|
|
424
435
|
for (const accountId of require_resolve_allowlist.listMSTeamsAccountIds(cfg)) {
|
|
@@ -453,7 +464,8 @@ function resolveMSTeamsWebhookPathIssue({ cfg, env, accountId = openclaw_plugin_
|
|
|
453
464
|
const recoveryPath = accountId === openclaw_plugin_sdk_account_id.DEFAULT_ACCOUNT_ID ? "/api/messages" : `/api/messages/${accountId}`;
|
|
454
465
|
return `Microsoft Teams webhook path ${path} ${reason}. Set ${configPath}.webhook.path to ${recoveryPath} and update the Azure Bot messaging endpoint or reverse-proxy upstream to Gateway port ${(0, gateway_config_runtime_exports.resolveGatewayPort)(cfg, env)}${recoveryPath}.` + (legacy ? ` Compatibility port ${legacy.port} continues serving the current path; verify delivery before removing ${resolveMSTeamsLegacyWebhookConfigPath(cfg, accountId)}.` : " The compatibility listener is disabled, so this path cannot receive Teams callbacks.");
|
|
455
466
|
}
|
|
456
|
-
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region extensions/msteams/src/doctor.ts
|
|
457
469
|
const isMSTeamsMutableAllowEntry = (0, openclaw_plugin_sdk_channel_policy.buildMutableAllowEntryDetector)({
|
|
458
470
|
prefixes: ["msteams:", "user:"],
|
|
459
471
|
stableIdPattern: /^[^\s@]+$/
|
|
@@ -505,7 +517,8 @@ const msteamsDoctor = {
|
|
|
505
517
|
collectMutableAllowlistWarnings: collectMSTeamsMutableAllowlistWarnings,
|
|
506
518
|
runConfigSequence: runMSTeamsWebhookDoctorSequence
|
|
507
519
|
};
|
|
508
|
-
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region extensions/msteams/src/graph-action-context.ts
|
|
509
522
|
const MSTEAMS_GROUP_MANAGEMENT_ACTIONS = /* @__PURE__ */ new Set([
|
|
510
523
|
"addParticipant",
|
|
511
524
|
"removeParticipant",
|
|
@@ -517,7 +530,8 @@ function withMSTeamsGraphMutationCurrentness(handleAction) {
|
|
|
517
530
|
return handleAction(ctx);
|
|
518
531
|
};
|
|
519
532
|
}
|
|
520
|
-
|
|
533
|
+
//#endregion
|
|
534
|
+
//#region extensions/msteams/src/outbound-config.ts
|
|
521
535
|
const MSTEAMS_TEXT_CHUNK_LIMIT = 4e3;
|
|
522
536
|
function resolveMSTeamsEffectiveTextChunkLimit(configuredLimit) {
|
|
523
537
|
return typeof configuredLimit === "number" && configuredLimit > 0 ? Math.min(configuredLimit, MSTEAMS_TEXT_CHUNK_LIMIT) : MSTEAMS_TEXT_CHUNK_LIMIT;
|
|
@@ -537,7 +551,8 @@ const msteamsOutboundConfig = {
|
|
|
537
551
|
} },
|
|
538
552
|
presentationCapabilities: require_presentation.MSTEAMS_PRESENTATION_CAPABILITIES
|
|
539
553
|
};
|
|
540
|
-
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region extensions/msteams/src/read-policy.ts
|
|
541
556
|
function normalizeTarget(raw) {
|
|
542
557
|
return raw ? require_resolve_allowlist.normalizeMSTeamsMessagingTarget(raw) ?? "" : "";
|
|
543
558
|
}
|
|
@@ -737,7 +752,8 @@ async function assertMSTeamsTeamEnumerationAllowed(params) {
|
|
|
737
752
|
if (!((directRoute.allowlistConfigured ? directRoute.allowed : groupPolicy === "open") || await isMappedChannelAllowed(cfg, accountId, stableTeamId, "__openclaw_all_channels__"))) throw new openclaw_plugin_sdk_channel_actions.ToolAuthorizationError("Microsoft Teams channel list requires access to every channel in the team.");
|
|
738
753
|
return stableTeamId;
|
|
739
754
|
}
|
|
740
|
-
|
|
755
|
+
//#endregion
|
|
756
|
+
//#region extensions/msteams/src/session-route.ts
|
|
741
757
|
function inferMSTeamsTargetChatType(raw) {
|
|
742
758
|
const target = (0, openclaw_plugin_sdk_channel_core.stripChannelTargetPrefix)(raw, "msteams", "teams");
|
|
743
759
|
if (!target) return;
|
|
@@ -788,7 +804,8 @@ function resolveMSTeamsOutboundSessionRoute(params) {
|
|
|
788
804
|
...channelThreadId !== void 0 ? { threadId: channelThreadId } : {}
|
|
789
805
|
} : route;
|
|
790
806
|
}
|
|
791
|
-
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region extensions/msteams/src/channel.ts
|
|
792
809
|
const TEAMS_GRAPH_PERMISSION_HINTS = {
|
|
793
810
|
"ChannelMessage.Read.All": "channel history",
|
|
794
811
|
"Chat.Read.All": "chat history",
|
|
@@ -804,7 +821,7 @@ const collectMSTeamsSecurityFindings = openclaw_plugin_sdk_channel_policy.create
|
|
|
804
821
|
severity: "warn",
|
|
805
822
|
title: "MS Teams security warning"
|
|
806
823
|
});
|
|
807
|
-
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-
|
|
824
|
+
const loadMSTeamsChannelRuntime = (0, openclaw_plugin_sdk_lazy_runtime.createLazyRuntimeNamedExport)(() => Promise.resolve().then(() => require("./channel.runtime-Ch2M_-jN.cjs")), "msTeamsChannelRuntime");
|
|
808
825
|
const MSTEAMS_REACTION_TYPES = [
|
|
809
826
|
"like",
|
|
810
827
|
"heart",
|
|
@@ -1313,7 +1330,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1313
1330
|
})
|
|
1314
1331
|
}),
|
|
1315
1332
|
gateway: { startAccount: async (ctx) => {
|
|
1316
|
-
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./monitor-
|
|
1333
|
+
const { monitorMSTeamsProvider } = await Promise.resolve().then(() => require("./monitor-b0zPpnmW.cjs"));
|
|
1317
1334
|
const account = require_resolve_allowlist.resolveMSTeamsAccount({
|
|
1318
1335
|
cfg: ctx.cfg,
|
|
1319
1336
|
accountId: ctx.accountId
|
|
@@ -1389,6 +1406,7 @@ const msteamsPlugin = (0, openclaw_plugin_sdk_channel_core.createChatChannelPlug
|
|
|
1389
1406
|
},
|
|
1390
1407
|
outbound: msteamsChannelOutbound
|
|
1391
1408
|
});
|
|
1409
|
+
//#endregion
|
|
1392
1410
|
Object.defineProperty(exports, "inferMSTeamsTargetChatType", {
|
|
1393
1411
|
enumerable: true,
|
|
1394
1412
|
get: function() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_token_config = require("./token-config-
|
|
2
|
-
const require_resolve_allowlist = require("./resolve-allowlist-
|
|
1
|
+
const require_token_config = require("./token-config-DICiuJWr.cjs");
|
|
2
|
+
const require_resolve_allowlist = require("./resolve-allowlist-7mIEepXB.cjs");
|
|
3
3
|
require("../runtime-api.cjs");
|
|
4
|
-
const require_delegated_state = require("./delegated-state-
|
|
5
|
-
const require_channel = require("./channel-
|
|
6
|
-
const require_presentation = require("./presentation-
|
|
7
|
-
const require_channel_setup = require("./channel.setup
|
|
8
|
-
const require_conversation_store_state = require("./conversation-store-state-
|
|
9
|
-
const require_send = require("./send-
|
|
10
|
-
const require_reaction_types = require("./reaction-types-
|
|
4
|
+
const require_delegated_state = require("./delegated-state-ilYzKwD8.cjs");
|
|
5
|
+
const require_channel = require("./channel-BaTw0JW3.cjs");
|
|
6
|
+
const require_presentation = require("./presentation-Duoi9Ijn.cjs");
|
|
7
|
+
const require_channel_setup = require("./channel.setup-B9yKGEse.cjs");
|
|
8
|
+
const require_conversation_store_state = require("./conversation-store-state-CVhMM0QY.cjs");
|
|
9
|
+
const require_send = require("./send-D1w7a_ip.cjs");
|
|
10
|
+
const require_reaction_types = require("./reaction-types-C6F6g2nk.cjs");
|
|
11
11
|
let openclaw_plugin_sdk_channel_outbound = require("openclaw/plugin-sdk/channel-outbound");
|
|
12
12
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
13
13
|
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
@@ -17,7 +17,7 @@ let openclaw_plugin_sdk_channel_inbound = require("openclaw/plugin-sdk/channel-i
|
|
|
17
17
|
let openclaw_plugin_sdk_channel_send_result = require("openclaw/plugin-sdk/channel-send-result");
|
|
18
18
|
let openclaw_plugin_sdk_string_normalization_runtime = require("openclaw/plugin-sdk/string-normalization-runtime");
|
|
19
19
|
let openclaw_plugin_sdk_text_chunking = require("openclaw/plugin-sdk/text-chunking");
|
|
20
|
-
|
|
20
|
+
//#region extensions/msteams/src/directory-live.ts
|
|
21
21
|
async function listMSTeamsDirectoryPeersLive(params) {
|
|
22
22
|
const query = params.query?.trim() ?? "";
|
|
23
23
|
if (!query) return [];
|
|
@@ -82,7 +82,8 @@ async function listMSTeamsDirectoryGroupsLive(params) {
|
|
|
82
82
|
}
|
|
83
83
|
return results;
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region extensions/msteams/src/graph-messages.ts
|
|
86
87
|
function stripTargetPrefix(raw) {
|
|
87
88
|
return raw.trim().replace(/^(conversation|user):/i, "").trim();
|
|
88
89
|
}
|
|
@@ -310,7 +311,8 @@ async function searchMessagesMSTeams(params) {
|
|
|
310
311
|
truncated
|
|
311
312
|
};
|
|
312
313
|
}
|
|
313
|
-
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region extensions/msteams/src/graph-group-management.ts
|
|
314
316
|
const MAX_CONVERSATION_MEMBER_PAGES = 100;
|
|
315
317
|
function resolveConversationMemberRoles(role, kind) {
|
|
316
318
|
const normalized = role?.trim().toLowerCase() || "member";
|
|
@@ -376,7 +378,8 @@ async function renameGroupMSTeams(params) {
|
|
|
376
378
|
newName: params.name
|
|
377
379
|
} };
|
|
378
380
|
}
|
|
379
|
-
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region extensions/msteams/src/graph-members.ts
|
|
380
383
|
const MAX_TEAM_MEMBER_PAGES = 100;
|
|
381
384
|
function normalizeUserId(value) {
|
|
382
385
|
return value?.replace(/^(msteams|teams|user):/i, "").trim().toLowerCase() ?? "";
|
|
@@ -426,7 +429,8 @@ async function getMemberInfoMSTeams(params) {
|
|
|
426
429
|
roles: member.roles ?? []
|
|
427
430
|
} };
|
|
428
431
|
}
|
|
429
|
-
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region extensions/msteams/src/graph-teams.ts
|
|
430
434
|
async function listChannelsMSTeams(params) {
|
|
431
435
|
const token = await require_resolve_allowlist.resolveGraphToken(params.cfg, { accountId: params.accountId });
|
|
432
436
|
const result = await require_resolve_allowlist.fetchAllGraphPages({
|
|
@@ -460,7 +464,8 @@ async function getChannelInfoMSTeams(params) {
|
|
|
460
464
|
createdDateTime: ch.createdDateTime
|
|
461
465
|
} };
|
|
462
466
|
}
|
|
463
|
-
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region extensions/msteams/src/outbound.ts
|
|
464
469
|
function toMSTeamsOutboundResult(result) {
|
|
465
470
|
const { conversationId, ...delivery } = result;
|
|
466
471
|
return {
|
|
@@ -645,7 +650,8 @@ const msteamsOutbound = {
|
|
|
645
650
|
}
|
|
646
651
|
})
|
|
647
652
|
};
|
|
648
|
-
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region extensions/msteams/src/probe.ts
|
|
649
655
|
function decodeJwtPayload(token) {
|
|
650
656
|
const parts = token.split(".");
|
|
651
657
|
if (parts.length < 2) return null;
|
|
@@ -735,7 +741,8 @@ async function probeMSTeams(cfg, params) {
|
|
|
735
741
|
};
|
|
736
742
|
}
|
|
737
743
|
}
|
|
738
|
-
|
|
744
|
+
//#endregion
|
|
745
|
+
//#region extensions/msteams/src/channel.runtime.ts
|
|
739
746
|
const msTeamsChannelRuntime = {
|
|
740
747
|
addParticipantMSTeams,
|
|
741
748
|
deleteMessageMSTeams: require_send.deleteMessageMSTeams,
|
|
@@ -760,4 +767,5 @@ const msTeamsChannelRuntime = {
|
|
|
760
767
|
sendAdaptiveCardMSTeams: require_send.sendAdaptiveCardMSTeams,
|
|
761
768
|
sendMessageMSTeams: require_send.sendMessageMSTeams
|
|
762
769
|
};
|
|
770
|
+
//#endregion
|
|
763
771
|
exports.msTeamsChannelRuntime = msTeamsChannelRuntime;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_token_config = require("./token-config-
|
|
2
|
-
const require_resolve_allowlist = require("./resolve-allowlist-
|
|
1
|
+
const require_token_config = require("./token-config-DICiuJWr.cjs");
|
|
2
|
+
const require_resolve_allowlist = require("./resolve-allowlist-7mIEepXB.cjs");
|
|
3
3
|
require("../runtime-api.cjs");
|
|
4
|
-
const require_delegated_state = require("./delegated-state-
|
|
5
|
-
const require_config_schema = require("./config-schema-
|
|
4
|
+
const require_delegated_state = require("./delegated-state-ilYzKwD8.cjs");
|
|
5
|
+
const require_config_schema = require("./config-schema-3lVZ45cB.cjs");
|
|
6
6
|
let openclaw_plugin_sdk_channel_policy = require("openclaw/plugin-sdk/channel-policy");
|
|
7
7
|
let openclaw_plugin_sdk_string_coerce_runtime = require("openclaw/plugin-sdk/string-coerce-runtime");
|
|
8
8
|
let openclaw_plugin_sdk_account_helpers = require("openclaw/plugin-sdk/account-helpers");
|
|
@@ -16,7 +16,7 @@ let openclaw_plugin_sdk_setup_tools = require("openclaw/plugin-sdk/setup-tools")
|
|
|
16
16
|
let openclaw_plugin_sdk_channel_dm_policy = require("openclaw/plugin-sdk/channel-dm-policy");
|
|
17
17
|
let openclaw_plugin_sdk_setup_runtime = require("openclaw/plugin-sdk/setup-runtime");
|
|
18
18
|
let openclaw_plugin_sdk_retry_runtime = require("openclaw/plugin-sdk/retry-runtime");
|
|
19
|
-
|
|
19
|
+
//#region extensions/msteams/src/accounts-mutations.ts
|
|
20
20
|
function patchMSTeamsAccountConfig(params) {
|
|
21
21
|
const accountId = (0, openclaw_plugin_sdk_account_id.normalizeAccountId)(params.accountId);
|
|
22
22
|
const msteams = params.cfg.channels?.msteams ?? {};
|
|
@@ -76,7 +76,8 @@ function patchMSTeamsAccountConfig(params) {
|
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region extensions/msteams/src/channel-config.ts
|
|
80
81
|
const msteamsMeta = {
|
|
81
82
|
id: "msteams",
|
|
82
83
|
label: "Microsoft Teams",
|
|
@@ -176,7 +177,8 @@ const msteamsConfigAdapter = {
|
|
|
176
177
|
accountId: params.accountId
|
|
177
178
|
}) ?? msteamsBaseConfigAdapter.deleteAccount(params)
|
|
178
179
|
};
|
|
179
|
-
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region extensions/msteams/src/setup-core.ts
|
|
180
182
|
const t$1 = (0, openclaw_plugin_sdk_setup.createSetupTranslator)();
|
|
181
183
|
const channel$1 = "msteams";
|
|
182
184
|
function resolveSetupAccountId(cfg, accountId) {
|
|
@@ -420,7 +422,8 @@ function createMSTeamsSetupWizardBase() {
|
|
|
420
422
|
}
|
|
421
423
|
};
|
|
422
424
|
}
|
|
423
|
-
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region extensions/msteams/src/errors.ts
|
|
424
427
|
function formatUnknownError(err) {
|
|
425
428
|
if (err instanceof Error) return err.message;
|
|
426
429
|
if (typeof err === "symbol") return err.description ?? err.toString();
|
|
@@ -535,7 +538,8 @@ function formatMSTeamsDeliveryFailureGuidance(classification) {
|
|
|
535
538
|
if (classification.kind === "replay-safe") return "The request was rate-limited before delivery; retrying later may succeed.";
|
|
536
539
|
if (classification.kind === "ambiguous") return "Delivery may already have succeeded; do not send the same content again without checking the conversation.";
|
|
537
540
|
}
|
|
538
|
-
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region extensions/msteams/src/setup-surface.ts
|
|
539
543
|
const t = (0, openclaw_plugin_sdk_setup.createSetupTranslator)();
|
|
540
544
|
const channel = "msteams";
|
|
541
545
|
function openDelegatedOAuthUrl(url) {
|
|
@@ -731,7 +735,7 @@ const msteamsSetupWizard = {
|
|
|
731
735
|
};
|
|
732
736
|
let oauthModule;
|
|
733
737
|
try {
|
|
734
|
-
oauthModule = await Promise.resolve().then(() => require("./oauth-
|
|
738
|
+
oauthModule = await Promise.resolve().then(() => require("./oauth-CUtfkgKE.cjs"));
|
|
735
739
|
} catch (err) {
|
|
736
740
|
await noteDelegatedAuthFailure(err);
|
|
737
741
|
return {
|
|
@@ -782,7 +786,8 @@ const msteamsSetupWizard = {
|
|
|
782
786
|
groupAccess: msteamsGroupAccess,
|
|
783
787
|
disable: (cfg) => (0, openclaw_plugin_sdk_setup.setSetupChannelEnabled)(cfg, channel, false)
|
|
784
788
|
};
|
|
785
|
-
|
|
789
|
+
//#endregion
|
|
790
|
+
//#region extensions/msteams/src/channel.setup.ts
|
|
786
791
|
const msteamsSetupPlugin = {
|
|
787
792
|
id: "msteams",
|
|
788
793
|
meta: msteamsMeta,
|
|
@@ -815,6 +820,7 @@ const msteamsSetupPlugin = {
|
|
|
815
820
|
setupWizard: msteamsSetupWizard,
|
|
816
821
|
setupContract: msteamsSetupContract
|
|
817
822
|
};
|
|
823
|
+
//#endregion
|
|
818
824
|
Object.defineProperty(exports, "classifyMSTeamsSendError", {
|
|
819
825
|
enumerable: true,
|
|
820
826
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_bot_framework_service_url = require("./bot-framework-service-url-
|
|
2
|
-
const require_token_config = require("./token-config-
|
|
1
|
+
const require_bot_framework_service_url = require("./bot-framework-service-url-B3FWn2SV.cjs");
|
|
2
|
+
const require_token_config = require("./token-config-DICiuJWr.cjs");
|
|
3
3
|
let openclaw_plugin_sdk_channel_core = require("openclaw/plugin-sdk/channel-core");
|
|
4
4
|
let openclaw_plugin_sdk_account_id = require("openclaw/plugin-sdk/account-id");
|
|
5
5
|
let openclaw_plugin_sdk_secret_input = require("openclaw/plugin-sdk/secret-input");
|
|
@@ -7,7 +7,7 @@ let openclaw_plugin_sdk_ssrf_policy = require("openclaw/plugin-sdk/ssrf-policy")
|
|
|
7
7
|
let openclaw_plugin_sdk_channel_config_schema = require("openclaw/plugin-sdk/channel-config-schema");
|
|
8
8
|
let openclaw_plugin_sdk_webhook_targets = require("openclaw/plugin-sdk/webhook-targets");
|
|
9
9
|
let zod = require("zod");
|
|
10
|
-
|
|
10
|
+
//#region extensions/msteams/src/config-schema.ts
|
|
11
11
|
function hasConfiguredValue(value) {
|
|
12
12
|
return typeof value === "string" ? value.trim().length > 0 : value !== void 0 && value !== null;
|
|
13
13
|
}
|
|
@@ -279,6 +279,7 @@ const MSTeamsConfigSchema = MSTeamsAccountConfigBaseSchema.extend({
|
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
const MSTeamsChannelConfigSchema = (0, openclaw_plugin_sdk_channel_config_schema.buildChannelConfigSchema)(MSTeamsConfigSchema, { uiHints: msTeamsChannelConfigUiHints });
|
|
282
|
+
//#endregion
|
|
282
283
|
Object.defineProperty(exports, "MSTeamsChannelConfigSchema", {
|
|
283
284
|
enumerable: true,
|
|
284
285
|
get: function() {
|