Skip to main content

Microsoft/teams

@webframp/microsoft/teamsv2026.10.21.1· Apache-2.0· 5d agoBEHAVIORSREPORTS
01README

Microsoft Teams read-only integration — channels, chats, mentions via Graph API (public client, device code flow)

02Release Notes

2026.10.21.1

Changed: bootstrap no longer tells you to copy the refresh token into a vault by hand. Swamp now stores the token in the repo's default vault under the fixed key TEAMS_REFRESH_TOKEN (previously a generated, per-model key that the docs never mentioned), and the bootstrap data holds only a ${{ vault.get('<vault>', 'TEAMS_REFRESH_TOKEN') }} reference. Running bootstrap requires a vault to exist (repos created with swamp repo init have one named default).

Changed: The refreshToken global argument is now optional, so a model can be created before bootstrap has run. Every method other than bootstrap fails with a missing_refresh_token error until it is set. A literal placeholder token is no longer needed (or accepted by swamp for a sensitive argument).

Changed: README and setup guide store tenantId and clientId with swamp vault put and wire all three global arguments with vault.get expressions.

Fixed: The README and setup guide claimed refresh tokens auto-rotate on each use. The model keeps using the token bootstrap stored and does not save the rotated token Graph returns; the docs now say so and tell you to re-run bootstrap on invalid_grant. Documentation only; token handling is unchanged.

Upgrade note: Existing models keep working unchanged. To move to the vault-managed token, re-run bootstrap, then set refreshToken with swamp model edit to the reference shown in the bootstrap data (for example ${{ vault.get("default", "TEAMS_REFRESH_TOKEN") }} when your default vault is named default). Older bootstrap data versions may still contain a plaintext token; delete them if they must not be retained.

03Behaviors1
@webframp/microsoft/teamsv2026.10.21.1microsoft/teams.ts

Global Arguments

ArgumentTypeDescription
tenantIdstringEntra tenant GUID. Store it in a vault and wire it with
clientIdstringAzure public client app registration ID. Store it in a vault and wire
refreshToken?stringOAuth2 refresh token. Leave unset until bootstrap has run; bootstrap
fn bootstrap()
Authenticate via device code flow. Displays a user code and
fn list_teams()
List Teams the signed-in user is a member of
fn list_channels(teamId: string)
List channels in a team
ArgumentTypeDescription
teamIdstringTeam ID (from list_teams output)
fn channel_messages(teamId: string, channelId: string, limit?: number, includeReplies?: boolean)
Fetch threaded messages from a Teams channel. Returns root messages
ArgumentTypeDescription
teamIdstringTeam ID
channelIdstringChannel ID
limit?numberMaximum root messages to fetch (replies under each are always fetched in full)
includeReplies?booleanFetch and nest replies under each root message
fn list_chats(nameFilter?: string, limit?: number)
List Teams chats (1:1 and group) the signed-in user participates in,
ArgumentTypeDescription
nameFilter?stringFilter to chats where a member name/email contains this substring
limit?numberMaximum chats to return
fn chat_messages(chatId: string, since?: string, limit?: number)
Fetch messages from a specific Teams chat, newest first
ArgumentTypeDescription
chatIdstringChat ID (from list_chats output)
since?stringOnly messages at or after this ISO 8601 timestamp
limit?numberMaximum messages to return
fn attention(since?: string, chatLimit?: number, mode?: enum)
Aggregate things that want your attention: unread chats and @mentions
ArgumentTypeDescription
since?stringLook back to this ISO 8601 timestamp (default: 24h ago)
chatLimit?numberMax chats to scan (most-recent-first)
mode?enumFilter attention items by type

Resources

teams(15m)— Teams the signed-in user is a member of
channels(15m)— Channels in a team
channelMessages(15m)— Threaded messages from a Teams channel (roots with nested replies)
chats(15m)— Teams chats the signed-in user participates in
chatMessages(15m)— Messages from a specific Teams chat
attention(15m)— Aggregated attention items: unread chats and @mentions
bootstrap(infinite)— Device code flow authentication result
04Reports1
@webframp/teams-digest-reportworkflow
teams_digest_report.ts

Surfaces Teams @mentions, active chat threads, and recent channel activity into a digest view for daily review

microsoftteamsdigestmentionsproductivity
05Previous Versions15
2026.10.14.1Apache-2.0(was none)

2026.10.14.1

Added: The manifest now declares license: Apache-2.0 (SPDX). The registry quality rubric scores a declared license separately from the bundled LICENSE.md.

Upgrade note: Metadata only. No code, schema, or behavioral changes.

2026.09.19.1

Fixed: attention and list_chats sent $expand=members,viewpoint to Graph's /me/chats. viewpoint is a per-user computed property, not a navigation property, so Graph rejected the whole request with Parsing OData Select and Expand failed, and both methods failed outright. viewpoint is now requested via $select (alongside every other GraphChat field, since both methods echo raw chat objects into their output resources) while $expand is left to do only what it can: expand members.

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.19.1

2026.09.19.1

Fixed: attention and list_chats sent $expand=members,viewpoint to Graph's /me/chats. viewpoint is a per-user computed property, not a navigation property, so Graph rejected the whole request with Parsing OData Select and Expand failed, and both methods failed outright. viewpoint is now requested via $select (alongside every other GraphChat field, since both methods echo raw chat objects into their output resources) while $expand is left to do only what it can: expand members.

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.18.1

2026.09.18.1

Upgrade note: Normalized npm:zod dependency version to 4.6.5 across the repo. No behavioral changes in this extension.

2026.09.15.1

2026.09.15.1

Changed: Bump zod 4.4.3 → 4.6.5

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.2

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.28.1

2026.08.28.1

Changed: Normalized the extension license to Apache-2.0 and corrected the copyright holder to "Sean Escriva". Extensions that previously shipped an MIT LICENSE.md are now Apache-2.0, consistent with the repository root and every other extension. No code or behavioral changes.

Upgrade note: License text only. No API, schema, or runtime behavior changed.

2026.08.26.2

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.26.2

2026.08.26.2

Fixed: Restored inline npm:zod@4.4.3 import specifiers so the registry quality scorer can resolve dependencies and score the extension. An earlier release used a bare "zod" import-map specifier, which published but scored as unscored.

Changed: Retained explicit compilerOptions.strict in deno.json. No behavioral or schema changes.

2026.08.24.1

2026.08.24.1

Added: Output metadata attributes for observability.

  • durationMs: Method execution duration in milliseconds.
  • collectedBy: Extension name that produced the data.
  • fetchedAt: ISO 8601 timestamp when data was fetched (added to resources that previously lacked it).
2026.08.23.1

2026.08.23.1

Changed: Documentation only — no code changes. Added usage examples for attention with mode=unread_only, list_chats with nameFilter, and chat_messages with since. Added a ## Troubleshooting section covering device-code expiry during bootstrap, invalid_grant as the one recognizable OAuth error code from refreshAccessToken (vs. raw Graph codes otherwise), the two independent sources of a truncated: true flag on channel and chat listings, and Authorization_RequestDenied meaning missing admin consent rather than a stale token.

2026.08.21.2

2026.08.21.2

Changed:

  • list_channels, channel_messages, and chat_messages now reject an empty teamId, channelId, or chatId with a clear validation error before calling the Graph API, instead of sending an empty ID and letting Graph return an opaque 404/400 deep in the call chain.
  • Every Graph API call that lists or fetches teams, channels, chats, and messages (list_teams, list_channels, channel_messages, list_chats, chat_messages, and attention) now reports failures with the operation attempted and the relevant team/channel/chat ID, instead of surfacing only the raw Graph error status/code. The underlying GraphApiError is preserved as the error's cause for callers that need the original status code.
2026.08.21.1

2026.08.21.1

Changed: Added .describe() documentation to every previously undocumented field across all resource schemas (teams, channels, messages, mentions, replies, chats, chat members, viewpoints, and attention items). Tightened tenantId, clientId, and refreshToken in the global arguments to require a non-empty string. No behavioral change — a no-op upgrades entry was added to keep the model's typeVersion tracking in sync with the version bump.

2026.08.20.1

Upgrade note: Bumped zod from 4.3.6 to 4.4.3. No behavioral changes — dependency version alignment only.

2026.08.20.1

2026.08.20.1

Upgrade note: Bumped zod from 4.3.6 to 4.4.3. No behavioral changes — dependency version alignment only.

2026.07.18.2

2026.07.18.2

Added: An upgrades array entry (no-op) to teams.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.18.1

Changed: Pinned the zod import specifier to npm:zod@4.4.3 (was npm:zod@4) for hermetic dependency resolution. No runtime behavior change.

2026.07.13.1

Changed: Upgraded the test-only dev dependency @systeminit/swamp-testing to 0.20260504.10, matching the rest of the repo. This is a test-harness change only — the published extension bundle is unchanged and no runtime behavior is affected.

2026.07.18.1

2026.07.18.1

Changed: Pinned the zod import specifier to npm:zod@4.4.3 (was npm:zod@4) for hermetic dependency resolution. No runtime behavior change.

2026.07.13.1

Changed: Upgraded the test-only dev dependency @systeminit/swamp-testing to 0.20260504.10, matching the rest of the repo. This is a test-harness change only — the published extension bundle is unchanged and no runtime behavior is affected.

2026.07.13.1

2026.07.13.1

Changed: Upgraded the test-only dev dependency @systeminit/swamp-testing to 0.20260504.10, matching the rest of the repo. This is a test-harness change only — the published extension bundle is unchanged and no runtime behavior is affected.

2026.06.30.1
06Stats
A
100 / 100
Downloads
77
Archive size
27.2 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
07Platforms
08Labels