teams_rb 2.0.1 → 2.0.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +48 -1
- data/README.md +94 -434
- data/docs/essentials/app-authentication.md +14 -4
- data/docs/essentials/app-basics.md +2 -2
- data/docs/essentials/on-activity.md +27 -0
- data/docs/essentials/sending-messages.md +1 -0
- data/docs/getting-started/quickstart.md +6 -5
- data/docs/getting-started/running-in-teams.md +37 -14
- data/docs/in-depth-guides/README.md +1 -0
- data/docs/in-depth-guides/adaptive-cards.md +17 -0
- data/docs/in-depth-guides/agent-365.md +46 -0
- data/docs/in-depth-guides/user-authentication.md +1 -1
- data/lib/teams/activity.rb +5 -0
- data/lib/teams/activity_context.rb +17 -31
- data/lib/teams/api/account.rb +38 -0
- data/lib/teams/api/activity_value.rb +92 -0
- data/lib/teams/api/agentic_identity.rb +27 -0
- data/lib/teams/api/app_info.rb +15 -0
- data/lib/teams/api/channel_data.rb +5 -0
- data/lib/teams/api/client.rb +26 -2
- data/lib/teams/api/conversation_client.rb +3 -1
- data/lib/teams/api/message_activity.rb +1 -0
- data/lib/teams/api/search.rb +41 -0
- data/lib/teams/app.rb +184 -21
- data/lib/teams/auth/jwt_validator.rb +173 -68
- data/lib/teams/auth/token_manager.rb +132 -0
- data/lib/teams/cloud_environment.rb +5 -1
- data/lib/teams/http_stream.rb +8 -3
- data/lib/teams/router.rb +71 -0
- data/lib/teams/version.rb +1 -1
- data/lib/teams.rb +3 -0
- metadata +20 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1502c7094dd98f8e69bfc496dbc8887273cda01eefb1729ff20d480f2e490d24
|
|
4
|
+
data.tar.gz: 13bdd7a69d783a0e7421c0ea9a2d1b6e5c364dfd89b1ccdbb38c7afa832008a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cceee102720b9bee0243602582c815ba0deeb3b8b23f7580c324b72b6b1a4431083ec68926677887acd4d3780520d31be30460499d9d2868b1adeb9f60ef671e
|
|
7
|
+
data.tar.gz: 71df520f4b46f72ec60919a9c0cf2403d5a0e7b5e7118503130a3ca9e77cd8d933a5841040078ddde03c8188a06a6db4c8e369e1c7e334237c0e6db432c74433
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,51 @@ All notable changes to this project are documented in this file. The format foll
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.0.3] - 2026-11-05
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `Api::AgenticIdentity` and agentic account fields (`agentic_user_id`, `agentic_app_id`, `agentic_app_blueprint_id`, `callback_uri`, plus an `agentic_identity` helper on `Api::Account`) for Agent 365 activities, matching the TypeScript, Python, and .NET SDKs
|
|
14
|
+
- Inbound activity validation now accepts Entra-issued agent tokens: validated against the token's own tenant (bounded per-tenant JWKS caching) with the same three audience forms; the Bot Framework service-token path and the remote-function validation path are unchanged. Entra inbound tokens carry no `serviceurl` claim, so that check applies only to service tokens
|
|
15
|
+
- `CloudEnvironment#agent_bot_scope` (`https://botapi.skype.com/.default`)
|
|
16
|
+
- `on_agent_lifecycle` plus per-variant routes (`on_agentic_user_identity_created`/`identity_updated`/`manager_updated`/`enabled`/`disabled`/`deleted`/`undeleted`/`workload_onboarding_updated`) for Agent 365 `agentLifecycle` events, discriminated on the activity's `valueType`, with value readers for the lifecycle payload fields
|
|
17
|
+
- Agentic operation (experimental): inbound activities addressed to an agentic user scope the whole turn — context, sends, and streaming — to that identity; `app.agentic_identity` builds identities for proactive work, `post`/`reply`/`update` accept `agentic_identity:`, and `Api::Client#for_agentic_identity` returns an identity-scoped client. Agentic tokens use the three-step Agent 365 exchange (blueprint assertion with `fmi_path`, agentic-app client assertion, user federated-identity grant)
|
|
18
|
+
- GitHub Actions CI runs the test suite and gem build for pull requests and pushes to main ([#11](https://github.com/bavmind/teams_rb/pull/11), thanks [@dblock](https://github.com/dblock))
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Use the `jwt` gem (new runtime dependency, `~> 3.3`) for inbound JWT decoding, JWK import, RS256 verification, and standard claim validation instead of handwritten token parsing and RSA key construction ([#12](https://github.com/bavmind/teams_rb/pull/12), thanks [@dblock](https://github.com/dblock))
|
|
23
|
+
- Match the TypeScript SDK's signing-key cache defaults: cache up to five keys per JWKS endpoint for ten minutes, fetch uncached keys immediately without rate limiting or negative caching, and reject key-fetch failures as authentication errors ([#12](https://github.com/bavmind/teams_rb/pull/12), thanks [@dblock](https://github.com/dblock))
|
|
24
|
+
- Allow five minutes of clock tolerance for inbound JWT expiry and not-before validation, matching the TypeScript, Python, and .NET SDKs ([#12](https://github.com/bavmind/teams_rb/pull/12), thanks [@dblock](https://github.com/dblock))
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Recover from signing-key rotation without restarting the bot instead of caching the first JWKS document indefinitely ([#14](https://github.com/bavmind/teams_rb/issues/14), [#12](https://github.com/bavmind/teams_rb/pull/12), thanks [@dblock](https://github.com/dblock))
|
|
29
|
+
- Avoid blocking cached signing-key validation behind slow JWKS or discovery requests while preserving coordinated successful cache misses ([#12](https://github.com/bavmind/teams_rb/pull/12), thanks [@dblock](https://github.com/dblock))
|
|
30
|
+
- Duplicate `signin/tokenExchange` invokes are deduplicated on the exchange id: each Teams client (desktop, web, mobile) rendering the OAuth card attempts its own silent exchange, and previously each successful one fired `on_sign_in`. Now only the first runs the exchange; duplicates answer 200 without re-emitting, an in-flight duplicate waits for the first result, and failed exchanges are not marked so retries still work. Follows the same fix in the TypeScript SDK (.NET already deduplicated)
|
|
31
|
+
|
|
32
|
+
## [2.0.2] - 2026-08-06
|
|
33
|
+
|
|
34
|
+
### Added
|
|
35
|
+
|
|
36
|
+
- `activity.channel_data.app` exposes the app info Teams delivers on inbound activities (`Teams::Api::AppInfo` with `id` and `version`), matching the `channelData.app` field the TypeScript, Python, and .NET SDKs model
|
|
37
|
+
- `dangerously_allow_unauthenticated_requests:` App option and the `DANGEROUSLY_ALLOW_UNAUTHENTICATED_REQUESTS` environment variable replace `skip_auth:` for disabling inbound validation, following the same rename in the TypeScript, Python, and .NET SDKs
|
|
38
|
+
- `on_card_search` routes `application/search` invokes (Adaptive Card dynamic typeahead `Input.ChoiceSet`), with `Api::SearchResponse`/`Api::SearchInvokeResult` for the response and `query_text`/`query_options`/`kind`/`dataset` readers on the activity value
|
|
39
|
+
- `on_conversation_update` plus named channel/team lifecycle routes (`on_channel_created`/`deleted`/`renamed`/`restored`, `on_team_archived`/`deleted`/`hard_deleted`/`renamed`/`restored`/`unarchived`) matched on `channelData.eventType`, following the route family the TypeScript, Python, and .NET SDKs share
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Replies now POST to the conversation's base activities collection, carrying the reply semantics only in the body's `replyToId`; the redundant activity-id path segment is gone, matching the TypeScript, Python, and .NET clients
|
|
44
|
+
- `ctx.sign_in` in group chats and channels now sends the OAuth card into the conversation as a targeted message visible only to the requesting user, instead of creating a 1:1 chat and posting a notice into the group; channels omit the token exchange resource so the sign-in button renders (silent SSO is not supported in channel scope). Follows the same change in the Python and .NET SDKs
|
|
45
|
+
|
|
46
|
+
### Deprecated
|
|
47
|
+
|
|
48
|
+
- `skip_auth:` still works as an alias for `dangerously_allow_unauthenticated_requests:` but emits a deprecation warning
|
|
49
|
+
|
|
50
|
+
### Fixed
|
|
51
|
+
|
|
52
|
+
- Streamed activities (typing chunks, the final message, and the timed-out in-place update) now carry `replyToId` referencing the inbound activity, threading them under the triggering message like the TypeScript SDK (restores Bot Framework v1 behavior)
|
|
53
|
+
|
|
9
54
|
## [2.0.1] - 2026-07-13
|
|
10
55
|
|
|
11
56
|
### Fixed
|
|
@@ -42,6 +87,8 @@ the Python SDK made when it joined the family.
|
|
|
42
87
|
- Thread-safe token management, storage, and JWKS caching for multi-threaded Rack servers
|
|
43
88
|
- Documentation mirroring the official teams-sdk docs structure (getting started, essentials, in-depth guides)
|
|
44
89
|
|
|
45
|
-
[Unreleased]: https://github.com/bavmind/teams_rb/compare/v2.0.
|
|
90
|
+
[Unreleased]: https://github.com/bavmind/teams_rb/compare/v2.0.3...HEAD
|
|
91
|
+
[2.0.3]: https://github.com/bavmind/teams_rb/compare/v2.0.2...v2.0.3
|
|
92
|
+
[2.0.2]: https://github.com/bavmind/teams_rb/compare/v2.0.1...v2.0.2
|
|
46
93
|
[2.0.1]: https://github.com/bavmind/teams_rb/compare/v2.0.0...v2.0.1
|
|
47
94
|
[2.0.0]: https://github.com/bavmind/teams_rb/releases/tag/v2.0.0
|