@openclaw/msteams 2026.9.6 → 2026.9.7
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/assets/icon.png +0 -0
- package/dist/.setup/{adapter.runtime-CQWZeqB5.cjs → adapter.runtime-BiWeMKXE.cjs} +21 -29
- package/dist/.setup/{approval-card-CPNH_q3P.cjs → approval-card-DWPDItvq.cjs} +6 -3
- package/dist/.setup/{approval-handler.runtime-CUnanUdR.cjs → approval-handler.runtime-D1s7UR3U.cjs} +4 -4
- package/dist/.setup/bot-framework-service-url-BUhTe8F3.cjs +55 -0
- package/dist/.setup/{channel-BDp16XRR.cjs → channel-ByzS7QJ0.cjs} +286 -180
- package/dist/.setup/{channel.runtime-Cv5F8JCa.cjs → channel.runtime-Baz8XDFs.cjs} +43 -142
- package/dist/.setup/{channel.setup-BVDfgdCc.cjs → channel.setup-DL8lcWT_.cjs} +6 -6
- package/dist/.setup/{config-schema-D22Lr1Qk.cjs → config-schema-0KoBzb0t.cjs} +24 -38
- package/dist/.setup/{messenger-8RA1FUJa.cjs → conversation-store-state-B7JuyZTm.cjs} +693 -287
- package/dist/.setup/{src-BfOCwlHp.cjs → monitor-BJ7IyH4y.cjs} +422 -592
- package/dist/.setup/{oauth-C6m7dvHj.cjs → oauth-DQjOnJ4l.cjs} +1 -1
- package/dist/.setup/{reaction-types-C7RA7Wxt.cjs → reaction-types-CQ4oSUe7.cjs} +2 -6
- package/dist/.setup/{resolve-allowlist-CHzaaWiC.cjs → resolve-allowlist-Pl_NQFYH.cjs} +55 -312
- package/dist/.setup/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-BloeesfJ.cjs} +22 -0
- package/dist/.setup/{send-CYN_N7O1.cjs → send-VUM7Sryb.cjs} +43 -96
- package/dist/.setup/{setup-plugin-api-DpiaA8z1.cjs → setup-plugin-api-Dyf8kF-l.cjs} +1 -1
- package/dist/.setup/{thread-session-CXgHK-yi.cjs → thread-session--rw3BTal.cjs} +2 -5
- 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 +0 -1
- package/dist/directory-contract-api.cjs +1 -1
- package/dist/doctor-contract-api.cjs +201 -371
- package/dist/qa-runner-api.cjs +1 -1
- package/dist/runtime-api.cjs +0 -6
- package/dist/setup-entry.cjs +1 -1
- package/dist/setup-plugin-api.cjs +1 -1
- package/openclaw.plugin.json +46 -5
- package/package.json +9 -9
- package/dist/.setup/polls-BJ4-4uZm.cjs +0 -668
- package/dist/.setup/secret-input-C65t6kjM.cjs +0 -1
- package/dist/.setup/sso-token-store-YYLHXgFH.cjs +0 -111
package/assets/icon.png
CHANGED
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
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");
|
|
5
|
-
let node_crypto = require("node:crypto");
|
|
6
5
|
let node_fs_promises = require("node:fs/promises");
|
|
7
6
|
node_fs_promises = require_rolldown_runtime.__toESM(node_fs_promises, 1);
|
|
8
7
|
let node_path = require("node:path");
|
|
9
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
|
+
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_timers_promises = require("node:timers/promises");
|
|
11
11
|
let node_events = require("node:events");
|
|
12
12
|
let node_http = require("node:http");
|
|
@@ -71,15 +71,6 @@ async function startMSTeamsQaBotFrameworkServer(options) {
|
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
async function reserveMSTeamsQaWebhookPort() {
|
|
75
|
-
const server = (0, node_http.createServer)();
|
|
76
|
-
server.listen(0, "127.0.0.1");
|
|
77
|
-
await (0, node_events.once)(server, "listening");
|
|
78
|
-
const { port } = server.address();
|
|
79
|
-
server.close();
|
|
80
|
-
await (0, node_events.once)(server, "close");
|
|
81
|
-
return port;
|
|
82
|
-
}
|
|
83
74
|
//#endregion
|
|
84
75
|
//#region extensions/msteams/src/qa/adapter.runtime.ts
|
|
85
76
|
const SERVICE_URL = "https://smba.trafficmanager.net/qa";
|
|
@@ -143,7 +134,7 @@ async function waitForMSTeamsChannelReady(gateway, timeoutMs = 6e4, pollInterval
|
|
|
143
134
|
}
|
|
144
135
|
async function createMSTeamsQaTransportAdapter(context) {
|
|
145
136
|
const accountId = context.adapterOptions?.sutAccountId?.trim() || DEFAULT_ACCOUNT_ID;
|
|
146
|
-
|
|
137
|
+
let webhookUrl;
|
|
147
138
|
const nonce = (0, node_crypto.randomUUID)();
|
|
148
139
|
const botToken = createMSTeamsQaBotToken();
|
|
149
140
|
const bootstrapPath = node_path.default.join(context.outputDir, ".msteams-private-qa-bootstrap.mjs");
|
|
@@ -233,13 +224,13 @@ async function createMSTeamsQaTransportAdapter(context) {
|
|
|
233
224
|
channel: { id: conversationId }
|
|
234
225
|
}
|
|
235
226
|
};
|
|
236
|
-
|
|
227
|
+
if (!webhookUrl) throw new Error("Microsoft Teams QA Gateway URL has not been configured");
|
|
237
228
|
const { response, release } = await (0, openclaw_plugin_sdk_ssrf_runtime.fetchWithSsrFGuard)({
|
|
238
229
|
url: webhookUrl,
|
|
239
230
|
init: {
|
|
240
231
|
method: "POST",
|
|
241
232
|
headers: {
|
|
242
|
-
authorization:
|
|
233
|
+
authorization: `Bearer ${botToken}`,
|
|
243
234
|
"content-type": "application/json"
|
|
244
235
|
},
|
|
245
236
|
body: JSON.stringify(activity)
|
|
@@ -269,21 +260,22 @@ async function createMSTeamsQaTransportAdapter(context) {
|
|
|
269
260
|
conversationKindByNativeId.clear();
|
|
270
261
|
logicalConversationByNativeId.clear();
|
|
271
262
|
},
|
|
272
|
-
createGatewayConfig: (
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
path: "/api/messages"
|
|
285
|
-
|
|
286
|
-
|
|
263
|
+
createGatewayConfig: ({ baseUrl }) => {
|
|
264
|
+
webhookUrl = new URL("/api/messages", baseUrl).toString();
|
|
265
|
+
return { channels: { msteams: {
|
|
266
|
+
enabled: true,
|
|
267
|
+
appId: APP_ID,
|
|
268
|
+
appPassword: "private-qa-secret",
|
|
269
|
+
tenantId: TENANT_ID,
|
|
270
|
+
dmPolicy: "allowlist",
|
|
271
|
+
allowFrom: [DRIVER_AAD_OBJECT_ID],
|
|
272
|
+
groupPolicy: "open",
|
|
273
|
+
requireMention: requireGroupMention,
|
|
274
|
+
replyStyle: "thread",
|
|
275
|
+
webhook: { path: "/api/messages" },
|
|
276
|
+
legacyWebhook: false
|
|
277
|
+
} } };
|
|
278
|
+
},
|
|
287
279
|
createRuntimeEnvPatch: () => ({
|
|
288
280
|
OPENCLAW_BUILD_PRIVATE_QA: "1",
|
|
289
281
|
NODE_OPTIONS: [process.env.NODE_OPTIONS?.trim(), `--import=${bootstrapUrl}`].filter(Boolean).join(" ")
|
|
@@ -11,6 +11,9 @@ function readMSTeamsApprovalActionToken(value) {
|
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region extensions/msteams/src/approval-card.ts
|
|
14
|
+
function formatMSTeamsApprovalKind(kind) {
|
|
15
|
+
return kind === "plugin" ? "Plugin" : kind === "system-agent" ? "OpenClaw Change" : "Exec";
|
|
16
|
+
}
|
|
14
17
|
function buildCardHeading(title, subtitle) {
|
|
15
18
|
return [{
|
|
16
19
|
type: "TextBlock",
|
|
@@ -103,7 +106,7 @@ function buildAdaptiveCard(body, actions) {
|
|
|
103
106
|
}
|
|
104
107
|
function buildMSTeamsPendingApprovalCard(params) {
|
|
105
108
|
const { view, nowMs } = params;
|
|
106
|
-
const kindLabel = view.approvalKind
|
|
109
|
+
const kindLabel = formatMSTeamsApprovalKind(view.approvalKind);
|
|
107
110
|
const actionTokens = [];
|
|
108
111
|
const actions = view.actions.map(({ decision, label }) => {
|
|
109
112
|
const token = msTeamsApprovalControls.createToken();
|
|
@@ -136,7 +139,7 @@ function buildMSTeamsPendingApprovalCard(params) {
|
|
|
136
139
|
};
|
|
137
140
|
}
|
|
138
141
|
function buildMSTeamsResolvedApprovalCard(view) {
|
|
139
|
-
const kindLabel = view.approvalKind
|
|
142
|
+
const kindLabel = formatMSTeamsApprovalKind(view.approvalKind);
|
|
140
143
|
const resolvedBy = (0, openclaw_plugin_sdk_string_coerce_runtime.normalizeOptionalString)(view.resolvedBy);
|
|
141
144
|
return buildAdaptiveCard([
|
|
142
145
|
...buildCardHeading(`${kindLabel} Approval: ${(0, openclaw_plugin_sdk_approval_runtime.formatChannelApprovalResolvedLabel)(view)}`, resolvedBy ? `Resolved by ${resolvedBy}` : "Resolved"),
|
|
@@ -146,7 +149,7 @@ function buildMSTeamsResolvedApprovalCard(view) {
|
|
|
146
149
|
}
|
|
147
150
|
function buildMSTeamsExpiredApprovalCard(view) {
|
|
148
151
|
return buildAdaptiveCard([
|
|
149
|
-
...buildCardHeading(`${view.approvalKind
|
|
152
|
+
...buildCardHeading(`${formatMSTeamsApprovalKind(view.approvalKind)} Approval Expired`, "This approval request expired before it was resolved."),
|
|
150
153
|
...buildApprovalSubject(view),
|
|
151
154
|
buildApprovalMetadata(view.approvalId, view.metadata)
|
|
152
155
|
]);
|
package/dist/.setup/{approval-handler.runtime-CUnanUdR.cjs → approval-handler.runtime-D1s7UR3U.cjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
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-Pl_NQFYH.cjs");
|
|
2
|
+
const require_channel = require("./channel-ByzS7QJ0.cjs");
|
|
3
|
+
const require_approval_card = require("./approval-card-DWPDItvq.cjs");
|
|
4
|
+
const require_send = require("./send-VUM7Sryb.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");
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
let openclaw_plugin_sdk_ssrf_policy = require("openclaw/plugin-sdk/ssrf-policy");
|
|
2
|
+
//#region extensions/msteams/src/bot-framework-service-url.ts
|
|
3
|
+
const BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST = (0, openclaw_plugin_sdk_ssrf_policy.normalizeHostnameSuffixAllowlist)([
|
|
4
|
+
"smba.trafficmanager.net",
|
|
5
|
+
"smba.infra.gcc.teams.microsoft.com",
|
|
6
|
+
"smba.infra.gov.teams.microsoft.us",
|
|
7
|
+
"smba.infra.dod.teams.microsoft.us",
|
|
8
|
+
"botframework.azure.cn"
|
|
9
|
+
]);
|
|
10
|
+
function describeBotFrameworkServiceUrlHost(serviceUrl) {
|
|
11
|
+
try {
|
|
12
|
+
return new URL(serviceUrl.trim()).hostname || "invalid-url";
|
|
13
|
+
} catch {
|
|
14
|
+
return "invalid-url";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isAllowedBotFrameworkServiceUrl(serviceUrl) {
|
|
18
|
+
if (typeof serviceUrl !== "string") return false;
|
|
19
|
+
const trimmed = serviceUrl.trim();
|
|
20
|
+
return Boolean(trimmed && (0, openclaw_plugin_sdk_ssrf_policy.isHttpsUrlAllowedByHostnameSuffixAllowlist)(trimmed, BOT_FRAMEWORK_SERVICE_URL_HOST_ALLOWLIST));
|
|
21
|
+
}
|
|
22
|
+
function tryNormalizeBotFrameworkServiceUrl(serviceUrl) {
|
|
23
|
+
if (!isAllowedBotFrameworkServiceUrl(serviceUrl)) return;
|
|
24
|
+
return serviceUrl.trim().replace(/\/+$/, "");
|
|
25
|
+
}
|
|
26
|
+
function normalizeBotFrameworkServiceUrl(serviceUrl) {
|
|
27
|
+
const normalized = tryNormalizeBotFrameworkServiceUrl(serviceUrl);
|
|
28
|
+
if (normalized) return normalized;
|
|
29
|
+
throw new Error(`Blocked Microsoft Teams serviceUrl host: ${describeBotFrameworkServiceUrlHost(serviceUrl)}`);
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
Object.defineProperty(exports, "describeBotFrameworkServiceUrlHost", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return describeBotFrameworkServiceUrlHost;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "isAllowedBotFrameworkServiceUrl", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function() {
|
|
41
|
+
return isAllowedBotFrameworkServiceUrl;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "normalizeBotFrameworkServiceUrl", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function() {
|
|
47
|
+
return normalizeBotFrameworkServiceUrl;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "tryNormalizeBotFrameworkServiceUrl", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function() {
|
|
53
|
+
return tryNormalizeBotFrameworkServiceUrl;
|
|
54
|
+
}
|
|
55
|
+
});
|