Files
nanobot/nanobot/channels/msteams/manifest.py
T
chengyongru e8a29a0087 feat(webui): improve setup flows across chat channels (NAN-112) (#5356)
* feat(webui): improve channel setup flows

* fix(webui): refine channel setup interactions (NAN-112)

* fix(webui): keep email setup sections channel-owned

* fix(webui): remove concrete channel details from shared components

* refactor(webui): remove unused channel setup resources

* fix(webui): finish channel-owned setup boundaries

* fix(webui): update channel switches optimistically

* test(channels): remove obsolete absence assertions

* fix(webui): flatten channel instance settings disclosure

* fix(webui): complete channel setup and connection flows

* fix(whatsapp): wait for session database release

* fix(webui): preserve scrolling channel controls

* fix(webui): stage channel connection checks

* fix(channels): align verification actions

* fix(email): expose connection checks

* fix(webui): align channel field actions

* fix(email): verify account credentials

* fix(wecom): bypass system proxy for websocket

* fix(channels): stabilize async connection cleanup

* fix(webui): autosave channel credentials

* fix(email): make provider presets non-destructive

* test(weixin): isolate persisted QR credentials
2026-09-11 15:22:14 +08:00

40 lines
1.3 KiB
Python

"""Microsoft Teams management contract."""
from nanobot.channels._manifest import field, required_fields
from nanobot.channels.contracts import ChannelSetupSpec
from nanobot.channels.plugin import ChannelPlugin
SETUP_SPEC = ChannelSetupSpec(
fields={
"appId": field(),
"appPassword": field("secret"),
"tenantId": field(),
"path": field(default="/api/messages"),
"allowFrom": field("list"),
"host": field(default="0.0.0.0"),
"port": field("int", default=3978),
"replyInThread": field("bool", default=True),
"mentionOnlyResponse": field(default="Hi — what can I help with?"),
"validateInboundAuth": field("bool", default=True),
"refTtlDays": field("int", default=30),
"pruneWebChatRefs": field("bool", default=True),
"pruneNonPersonalRefs": field("bool", default=True),
"refTouchIntervalS": field("int", default=300),
"trustedServiceUrlHosts": field("list"),
},
required=required_fields("appId", "appPassword"),
official_url="https://dev.teams.microsoft.com/apps",
)
PLUGIN = ChannelPlugin(
name="msteams",
display_name="Microsoft Teams",
runtime=f"{__package__}.runtime:MSTeamsChannel",
setup=SETUP_SPEC,
dependencies=(
"PyJWT>=2.0,<3.0",
"cryptography>=41.0",
),
webui="webui/index.ts",
)