Files
openclaw/extensions/msteams/package.json
T
Peter Steinberger 2d1242556e test(msteams): serve JWKS from in-process server in auth coverage (#119354)
* test(msteams): serve JWKS from in-process server in auth coverage

The Entra/service-token validator tests spied JwksClient.prototype on the
jwks-rsa copy the test file imports, but the SDK's internal
require("jwks-rsa") resolves a different physical copy and vitest cannot
intercept a CommonJS require inside node_modules — so the spy missed and
the tests hit the real login.botframework.com / login.microsoftonline.com
JWKS endpoints (JwksError: Bad Request, SigningKeyNotFoundError).

Replace the mock with a real JWKS document served from an in-process
node:http server, pointed at via the SDK's own endpoint overrides
(openIdMetadataUrl cloud override for the service validator, loginEndpoint
for the Entra factory). The v2-issuer acceptance test drives the underlying
JwtValidator with a decoupled jwksUriOptions {type:'uri'} so issuer
validation uses the real login host while keys come from the local server.
Deterministic, no external network, and exercises the real fetch + RS256
verify path.

* test(msteams): fix cloud-environment import and drop unused jwks-rsa

The extensions test-types gate resolves @microsoft/teams.api's dual
.d.ts/.d.mts types strictly and does not see the root re-export of
withOverrides/PUBLIC (TS2305), so import them from the canonical
auth/cloud-environment subpath the SDK itself uses. The JWKS-server rework
also removed the last direct jwks-rsa import, so drop the now-unused
devDependency and refresh the lockfile (knip deadcode).

---------

Co-authored-by: Peter Steinberger <steipete@mac-studio-sf2.local>
2026-08-04 15:34:38 -07:00

84 lines
2.0 KiB
JSON

{
"name": "@openclaw/msteams",
"version": "2026.7.2",
"description": "OpenClaw Microsoft Teams channel plugin for bot conversations.",
"repository": {
"type": "git",
"url": "https://github.com/openclaw/openclaw"
},
"type": "module",
"dependencies": {
"@azure/identity": "4.13.1",
"@microsoft/teams.api": "2.0.14",
"@microsoft/teams.apps": "2.0.14",
"express": "5.2.1",
"typebox": "1.3.6",
"zod": "4.4.3"
},
"devDependencies": {
"@microsoft/teams.common": "2.0.14",
"@openclaw/plugin-sdk": "workspace:*",
"jose": "6.2.4",
"openclaw": "workspace:*"
},
"peerDependencies": {
"openclaw": ">=2026.7.2"
},
"peerDependenciesMeta": {
"openclaw": {
"optional": true
}
},
"openclaw": {
"extensions": [
"./index.ts"
],
"setupEntry": "./setup-entry.ts",
"channel": {
"id": "msteams",
"configuredState": {
"env": {
"anyOf": [
"MSTEAMS_APP_ID",
"MSTEAMS_APP_PASSWORD",
"MSTEAMS_TENANT_ID"
]
}
},
"label": "Microsoft Teams",
"selectionLabel": "Microsoft Teams (Teams SDK)",
"docsPath": "/channels/msteams",
"docsLabel": "msteams",
"blurb": "Teams SDK; enterprise support.",
"aliases": [
"teams"
],
"order": 60,
"doctorCapabilities": {
"dmAllowFromMode": "topOnly",
"groupModel": "hybrid",
"groupAllowFromFallbackToAllowFrom": true,
"warnOnEmptyGroupSenderAllowlist": true
},
"setup": { "fields": [] }
},
"install": {
"npmSpec": "@openclaw/msteams",
"defaultChoice": "npm",
"minHostVersion": ">=2026.4.10"
},
"compat": {
"pluginApi": ">=2026.7.2"
},
"build": {
"openclawVersion": "2026.7.2",
"runtimeFormat": "cjs"
},
"release": {
"bundleRuntimeDependencies": false,
"publishToClawHub": true,
"publishToNpm": true
}
}
}