@openclaw/teams-meetings 2026.11.3 → 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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"entries":[{"output":"cli-metadata.js","source":"extensions/teams-meetings/cli-metadata.ts"},{"output":"index.js","source":"extensions/teams-meetings/index.ts"}],"chunks":[{"output":"cli-metadata.js","sha256":"bcc59db9e6b72351285e7fc72db1982046a7bb08dd0f981b7e9186a37d4a4db7","facadeSource":"extensions/teams-meetings/cli-metadata.ts","sources":["extensions/teams-meetings/cli-metadata.ts"]},{"output":"index.js","sha256":"ba4c8dc83e315b7bbf8516409c0cd7fc876990504b63bcbf88164b233d3d751c","facadeSource":"extensions/teams-meetings/index.ts","sources":["extensions/teams-meetings/index.ts","extensions/teams-meetings/src/transports/teams-meetings-page-scripts.ts","extensions/teams-meetings/src/transports/teams-meetings-platform-adapter.ts","extensions/teams-meetings/src/transports/teams-meetings-selectors.ts","extensions/teams-meetings/src/transports/teams-meetings-status-prejoin-source.ts","extensions/teams-meetings/src/transports/teams-meetings-urls.ts"]}],"unrenderedSources":[]}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,6 @@ import { addTimerTimeoutGraceMs } from "openclaw/plugin-sdk/number-runtime";
|
|
|
4
4
|
import { REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME } from "openclaw/plugin-sdk/realtime-voice";
|
|
5
5
|
import { normalizeAgentId } from "openclaw/plugin-sdk/routing";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
|
-
//#region extensions/teams-meetings/src/errors.ts
|
|
8
|
-
var TeamsMeetingsInvalidRequestError = class extends Error {};
|
|
9
|
-
//#endregion
|
|
10
7
|
//#region extensions/teams-meetings/src/transports/teams-meetings-selectors.ts
|
|
11
8
|
const TEAMS_MEETING_SELECTORS = {
|
|
12
9
|
continueInBrowser: [
|
|
@@ -96,34 +93,6 @@ const TEAMS_MEETING_SELECTORS = {
|
|
|
96
93
|
captionText: ["[data-tid=\"closed-caption-text\"]"]
|
|
97
94
|
};
|
|
98
95
|
//#endregion
|
|
99
|
-
//#region extensions/teams-meetings/src/transports/teams-meetings-status-call-source.ts
|
|
100
|
-
const teamsMeetingStatusCall = { captionEnableSource: `if (!captionsFinalized && canMutateSession && inCall && !captionsEnabledNow) {
|
|
101
|
-
let captionButton = first(selectors.captions);
|
|
102
|
-
if (!captionButton) {
|
|
103
|
-
first(selectors.moreActions)?.click?.();
|
|
104
|
-
await waitForUi();
|
|
105
|
-
captionButton = first(selectors.captions);
|
|
106
|
-
}
|
|
107
|
-
if (captionButton) {
|
|
108
|
-
const captionLabel = label(captionButton);
|
|
109
|
-
const alreadyEnabled = captionButton.getAttribute?.("aria-checked") === "true" ||
|
|
110
|
-
/hide live captions|turn off captions/i.test(captionLabel) ||
|
|
111
|
-
Boolean(firstRaw(selectors.captionsOff));
|
|
112
|
-
if (!alreadyEnabled) {
|
|
113
|
-
captionButton.click();
|
|
114
|
-
await waitForUi();
|
|
115
|
-
}
|
|
116
|
-
const currentLabel = label(captionButton);
|
|
117
|
-
captionsEnabledNow = captionButton.getAttribute?.("aria-checked") === "true" ||
|
|
118
|
-
/hide live captions|turn off captions/i.test(currentLabel) ||
|
|
119
|
-
Boolean(firstRaw(selectors.captionRenderer)) ||
|
|
120
|
-
Boolean(firstRaw(selectors.captionsOff));
|
|
121
|
-
if (captionsEnabledNow && !alreadyEnabled) {
|
|
122
|
-
notes.push("Enabled Teams live captions for transcript capture.");
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}` };
|
|
126
|
-
//#endregion
|
|
127
96
|
//#region extensions/teams-meetings/src/transports/teams-meetings-status-prejoin-source.ts
|
|
128
97
|
const teamsMeetingStatusPrelude = {
|
|
129
98
|
controlLookupSource: `const buttons = [...document.querySelectorAll("button")];
|
|
@@ -304,12 +273,10 @@ function normalizeTeamsMeetingUrlForReuse(url) {
|
|
|
304
273
|
if (hostname === "teams.live.com") {
|
|
305
274
|
const launcherMatch = (parsed.pathname.toLowerCase() === "/dl/launcher/launcher.html" ? parsed.searchParams.get("url") : void 0)?.match(/^\/_#\/meet\/([^/?#]+)(?:\?(.+))?$/i);
|
|
306
275
|
let lightMeeting;
|
|
307
|
-
if (parsed.pathname.toLowerCase() === "/light-meetings/launch")
|
|
276
|
+
if (parsed.pathname.toLowerCase() === "/light-meetings/launch") {
|
|
308
277
|
const coordinates = parsed.searchParams.get("coords");
|
|
309
278
|
const decoded = coordinates && coordinates.length <= 16384 ? JSON.parse(Buffer.from(coordinates, "base64").toString("utf8")) : void 0;
|
|
310
279
|
if (decoded && typeof decoded === "object") lightMeeting = decoded;
|
|
311
|
-
} catch {
|
|
312
|
-
return;
|
|
313
280
|
}
|
|
314
281
|
const match = parsed.pathname.match(/^\/meet\/([^/]+)\/?$/i) ?? launcherMatch ?? (typeof lightMeeting?.meetingCode === "string" ? [void 0, lightMeeting.meetingCode] : void 0);
|
|
315
282
|
if (!match?.[1]) return;
|
|
@@ -343,8 +310,20 @@ function isRecoverableTeamsMeetingTab(tab, url) {
|
|
|
343
310
|
}
|
|
344
311
|
//#endregion
|
|
345
312
|
//#region extensions/teams-meetings/src/transports/teams-meetings-page-scripts.ts
|
|
346
|
-
|
|
347
|
-
|
|
313
|
+
const teamsMeetingPageScripts = MeetingPlatformAdapter.createPageScripts({
|
|
314
|
+
platform: {
|
|
315
|
+
audioOutputElementIdPrefix: "openclaw-teams-audio-output-",
|
|
316
|
+
manualActionReasonPrefix: "teams",
|
|
317
|
+
displayName: "Teams",
|
|
318
|
+
globals: {
|
|
319
|
+
audioOutputs: "__openclawTeamsAudioOutputs",
|
|
320
|
+
captionArchive: "__openclawTeamsCaptionArchive",
|
|
321
|
+
captions: "__openclawTeamsCaptions",
|
|
322
|
+
meeting: "__openclawTeamsMeeting"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
normalizeUrl: normalizeTeamsMeetingUrlForReuse,
|
|
326
|
+
pageIdentitySource: () => `const meetingIdentity = (rawUrl) => {
|
|
348
327
|
try {
|
|
349
328
|
const parsed = new URL(rawUrl);
|
|
350
329
|
const host = parsed.hostname.toLowerCase();
|
|
@@ -370,7 +349,7 @@ function pageIdentityFunctionSource() {
|
|
|
370
349
|
? JSON.parse(atob(coordinates))
|
|
371
350
|
: undefined;
|
|
372
351
|
if (decoded && typeof decoded === "object") lightMeeting = decoded;
|
|
373
|
-
} catch {}
|
|
352
|
+
} catch { /* Invalid external coordinates do not identify a meeting. */ }
|
|
374
353
|
}
|
|
375
354
|
const match = parsed.pathname.match(/^\\/meet\\/([^/]+)\\/?$/i) || launcherMatch ||
|
|
376
355
|
(typeof lightMeeting?.meetingCode === "string"
|
|
@@ -387,12 +366,11 @@ function pageIdentityFunctionSource() {
|
|
|
387
366
|
? "teams-consumer:" + code.toLowerCase() + ":p:" + encodeURIComponent(passcode || "")
|
|
388
367
|
: undefined;
|
|
389
368
|
}
|
|
390
|
-
} catch {}
|
|
369
|
+
} catch { /* Invalid external URLs do not identify a meeting. */ }
|
|
391
370
|
return undefined;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
return `(input) => {
|
|
371
|
+
};`,
|
|
372
|
+
selectors: TEAMS_MEETING_SELECTORS,
|
|
373
|
+
toggleStateFunction: () => `(input) => {
|
|
396
374
|
const pressed = String(input?.ariaPressed || "").toLowerCase();
|
|
397
375
|
if (pressed === "true") return "on";
|
|
398
376
|
if (pressed === "false") return "off";
|
|
@@ -413,26 +391,34 @@ function teamsMeetingToggleStateFunctionSource() {
|
|
|
413
391
|
if (/\\b(?:microphone|mic) (?:is |currently )?(?:off|muted|disabled)\\b/.test(value)) return "off";
|
|
414
392
|
if (/\\b(?:microphone|mic) (?:is |currently )?(?:on|unmuted|enabled)\\b/.test(value)) return "on";
|
|
415
393
|
return undefined;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
const teamsMeetingPageScripts = MeetingPlatformAdapter.createPageScripts({
|
|
419
|
-
platform: {
|
|
420
|
-
audioOutputElementIdPrefix: "openclaw-teams-audio-output-",
|
|
421
|
-
manualActionReasonPrefix: "teams",
|
|
422
|
-
displayName: "Teams",
|
|
423
|
-
globals: {
|
|
424
|
-
audioOutputs: "__openclawTeamsAudioOutputs",
|
|
425
|
-
captionArchive: "__openclawTeamsCaptionArchive",
|
|
426
|
-
captions: "__openclawTeamsCaptions",
|
|
427
|
-
meeting: "__openclawTeamsMeeting"
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
|
-
normalizeUrl: normalizeTeamsMeetingUrlForReuse,
|
|
431
|
-
pageIdentitySource: pageIdentityFunctionSource,
|
|
432
|
-
selectors: TEAMS_MEETING_SELECTORS,
|
|
433
|
-
toggleStateFunction: teamsMeetingToggleStateFunctionSource,
|
|
394
|
+
}`,
|
|
434
395
|
statusPrelude: teamsMeetingStatusPrelude,
|
|
435
|
-
statusCall:
|
|
396
|
+
statusCall: { captionEnableSource: `if (!captionsFinalized && canMutateSession && inCall && !captionsEnabledNow) {
|
|
397
|
+
let captionButton = first(selectors.captions);
|
|
398
|
+
if (!captionButton) {
|
|
399
|
+
first(selectors.moreActions)?.click?.();
|
|
400
|
+
await waitForUi();
|
|
401
|
+
captionButton = first(selectors.captions);
|
|
402
|
+
}
|
|
403
|
+
if (captionButton) {
|
|
404
|
+
const captionLabel = label(captionButton);
|
|
405
|
+
const alreadyEnabled = captionButton.getAttribute?.("aria-checked") === "true" ||
|
|
406
|
+
/hide live captions|turn off captions/i.test(captionLabel) ||
|
|
407
|
+
Boolean(firstRaw(selectors.captionsOff));
|
|
408
|
+
if (!alreadyEnabled) {
|
|
409
|
+
captionButton.click();
|
|
410
|
+
await waitForUi();
|
|
411
|
+
}
|
|
412
|
+
const currentLabel = label(captionButton);
|
|
413
|
+
captionsEnabledNow = captionButton.getAttribute?.("aria-checked") === "true" ||
|
|
414
|
+
/hide live captions|turn off captions/i.test(currentLabel) ||
|
|
415
|
+
Boolean(firstRaw(selectors.captionRenderer)) ||
|
|
416
|
+
Boolean(firstRaw(selectors.captionsOff));
|
|
417
|
+
if (captionsEnabledNow && !alreadyEnabled) {
|
|
418
|
+
notes.push("Enabled Teams live captions for transcript capture.");
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}` },
|
|
436
422
|
leave: {
|
|
437
423
|
controlSource: `const first = (list) => {
|
|
438
424
|
for (const selector of list) {
|
|
@@ -452,14 +438,6 @@ const teamsMeetingPageScripts = MeetingPlatformAdapter.createPageScripts({
|
|
|
452
438
|
});
|
|
453
439
|
//#endregion
|
|
454
440
|
//#region extensions/teams-meetings/src/transports/teams-meetings-platform-adapter.ts
|
|
455
|
-
function teamsMeetingOrigin(meetingUrl) {
|
|
456
|
-
try {
|
|
457
|
-
const origin = new URL(meetingUrl).origin;
|
|
458
|
-
return origin === "https://teams.microsoft.com" || origin === "https://teams.live.com" ? origin : void 0;
|
|
459
|
-
} catch {
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
441
|
const TEAMS_MEETINGS_PLATFORM_ADAPTER = MeetingPlatformAdapter.create({
|
|
464
442
|
id: "teams-meetings",
|
|
465
443
|
displayName: "Microsoft Teams meetings",
|
|
@@ -501,7 +479,14 @@ const TEAMS_MEETINGS_PLATFORM_ADAPTER = MeetingPlatformAdapter.create({
|
|
|
501
479
|
manualActionReasonPrefix: "teams",
|
|
502
480
|
retryCaptions: true,
|
|
503
481
|
unavailableMessage: "Open the OpenClaw browser profile, finish the Teams sign-in, admission, or permission prompt, then retry.",
|
|
504
|
-
origin:
|
|
482
|
+
origin: (meetingUrl) => {
|
|
483
|
+
try {
|
|
484
|
+
const origin = new URL(meetingUrl).origin;
|
|
485
|
+
return origin === "https://teams.microsoft.com" || origin === "https://teams.live.com" ? origin : void 0;
|
|
486
|
+
} catch {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
},
|
|
505
490
|
scripts: teamsMeetingPageScripts
|
|
506
491
|
})
|
|
507
492
|
});
|
|
@@ -521,7 +506,7 @@ const teamsMeetingsPlugin = MeetingPlatformAdapter.defineBrowserMeetingPlugin({
|
|
|
521
506
|
defaultRealtimeInstructions: `You are joining a private Microsoft Teams meeting as an OpenClaw voice transport. Keep spoken replies brief and natural. In agent mode, wait for OpenClaw consult results and speak them exactly. In bidi mode, answer directly and call ${REALTIME_VOICE_AGENT_CONSULT_TOOL_NAME} for deeper reasoning, current information, or tools.`,
|
|
522
507
|
resolveGatewayOperationTimeoutMs: (config) => Math.max(6e4, addTimerTimeoutGraceMs(config.chrome.joinTimeoutMs, 3e4) ?? 1)
|
|
523
508
|
},
|
|
524
|
-
InvalidRequestError: TeamsMeetingsInvalidRequestError,
|
|
509
|
+
InvalidRequestError: class TeamsMeetingsInvalidRequestError extends Error {},
|
|
525
510
|
toolUrlDescription: "Microsoft Teams meeting URL",
|
|
526
511
|
transcriptSource: {
|
|
527
512
|
id: "teams",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/teams-meetings",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.5-beta.2",
|
|
4
4
|
"description": "OpenClaw Microsoft Teams browser meeting participant plugin.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"openclaw": ">=2026.11.
|
|
11
|
+
"openclaw": ">=2026.11.5-beta.2"
|
|
12
12
|
},
|
|
13
13
|
"peerDependenciesMeta": {
|
|
14
14
|
"openclaw": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"minHostVersion": ">=2026.9.8"
|
|
27
27
|
},
|
|
28
28
|
"compat": {
|
|
29
|
-
"pluginApi": ">=2026.11.
|
|
29
|
+
"pluginApi": ">=2026.11.5-beta.2"
|
|
30
30
|
},
|
|
31
31
|
"build": {
|
|
32
|
-
"openclawVersion": "2026.11.
|
|
32
|
+
"openclawVersion": "2026.11.5-beta.2",
|
|
33
33
|
"bundledDist": false
|
|
34
34
|
},
|
|
35
35
|
"release": {
|