@mastra/teams 0.1.2-alpha.2 → 0.1.3-alpha.0

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.
package/dist/index.d.cts CHANGED
@@ -3,30 +3,29 @@ import { ChannelsStorage } from "@mastra/core/storage";
3
3
  import { TeamsAdapter, TeamsAdapter as TeamsAdapter$1, TeamsAdapterConfig, createTeamsAdapter } from "@chat-adapter/teams";
4
4
  import { Mastra } from "@mastra/core/mastra";
5
5
  import { ApiRoute } from "@mastra/core/server";
6
- //#region src/types.d.ts
7
6
  /** Microsoft Graph origin used for Entra application provisioning. */
8
- declare const GRAPH_API_BASE_URL = "https://graph.microsoft.com";
7
+ export declare const GRAPH_API_BASE_URL = "https://graph.microsoft.com";
9
8
  /** Teams Developer Portal origin used for Bot Framework registrations. */
10
- declare const DEV_PORTAL_BASE_URL = "https://dev.teams.microsoft.com";
9
+ export declare const DEV_PORTAL_BASE_URL = "https://dev.teams.microsoft.com";
11
10
  /** Microsoft login origin used to validate bot credentials (client-credentials mint). */
12
- declare const LOGIN_BASE_URL = "https://login.microsoftonline.com";
11
+ export declare const LOGIN_BASE_URL = "https://login.microsoftonline.com";
13
12
  /**
14
13
  * OAuth scope for Microsoft Graph control-plane calls (create Entra apps,
15
14
  * mint client secrets). Passed to the delegated {@link TeamsTokenResolver}.
16
15
  */
17
- declare const TEAMS_GRAPH_SCOPE = "https://graph.microsoft.com/.default";
16
+ export declare const TEAMS_GRAPH_SCOPE = "https://graph.microsoft.com/.default";
18
17
  /**
19
18
  * OAuth scope for the Teams Developer Portal API (bot registrations).
20
19
  * Tokens for this audience are distinct from Graph tokens — a single access
21
20
  * token cannot serve both APIs. Passed to the delegated
22
21
  * {@link TeamsTokenResolver}.
23
22
  */
24
- declare const TEAMS_DEV_PORTAL_SCOPE = "https://dev.teams.microsoft.com/AppDefinitions.ReadWrite";
23
+ export declare const TEAMS_DEV_PORTAL_SCOPE = "https://dev.teams.microsoft.com/AppDefinitions.ReadWrite";
25
24
  /**
26
25
  * Teams Developer Portal page where minted bot registrations are managed and
27
26
  * packaged into a Teams app for distribution.
28
27
  */
29
- declare const DEV_PORTAL_BOTS_URL = "https://dev.teams.microsoft.com/bots";
28
+ export declare const DEV_PORTAL_BOTS_URL = "https://dev.teams.microsoft.com/bots";
30
29
  /**
31
30
  * Resolve an access token for a Microsoft OAuth scope on demand.
32
31
  *
@@ -218,13 +217,11 @@ interface TeamsInstallation {
218
217
  /** When the installation was created. */
219
218
  installedAt: Date;
220
219
  }
221
- //#endregion
222
- //#region src/teams-provider.d.ts
223
220
  /**
224
221
  * Resolve the per-adapter streaming/typing config the provider applies to the
225
222
  * Teams entry in `AgentChannels.adapters` — both default on.
226
223
  */
227
- declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'streaming' | 'typingStatus'>): {
224
+ export declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'streaming' | 'typingStatus'>): {
228
225
  streaming: StreamingConfig;
229
226
  typingStatus: boolean;
230
227
  };
@@ -253,7 +250,7 @@ declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'st
253
250
  * await teams.connect('my-agent'); // → { type: 'deep_link', url: 'https://dev.teams.microsoft.com/bots' }
254
251
  * ```
255
252
  */
256
- declare class TeamsProvider implements ChannelProvider {
253
+ export declare class TeamsProvider implements ChannelProvider {
257
254
  #private;
258
255
  readonly id = "teams";
259
256
  constructor(config?: TeamsProviderConfig);
@@ -332,10 +329,8 @@ declare class TeamsProvider implements ChannelProvider {
332
329
  */
333
330
  getAdapter(installationId: string): TeamsAdapter$1 | undefined;
334
331
  }
335
- //#endregion
336
- //#region src/install-store.d.ts
337
332
  /** Platform identifier used for every stored record and route. */
338
- declare const PLATFORM = "teams";
333
+ export declare const PLATFORM = "teams";
339
334
  /**
340
335
  * Persistence for Teams bot installations, layered over the platform-agnostic
341
336
  * `ChannelsStorage` (the same store `@mastra/slack` / `@mastra/telegram` use).
@@ -344,7 +339,7 @@ declare const PLATFORM = "teams";
344
339
  * supplied, `appPassword` (the bot's client secret) is AES-256-GCM encrypted
345
340
  * at rest.
346
341
  */
347
- declare class TeamsInstallStore {
342
+ export declare class TeamsInstallStore {
348
343
  #private;
349
344
  private readonly storage;
350
345
  private readonly encryptionKey?;
@@ -363,9 +358,7 @@ declare class TeamsInstallStore {
363
358
  deleteByAgent(agentId: string): Promise<void>;
364
359
  }
365
360
  /** Project an installation to its public, secret-free info for the editor UI. */
366
- declare function toInstallationInfo(install: TeamsInstallation): ChannelInstallationInfo;
367
- //#endregion
368
- //#region src/microsoft-clients.d.ts
361
+ export declare function toInstallationInfo(install: TeamsInstallation): ChannelInstallationInfo;
369
362
  /** The subset of a Graph `application` resource the provider uses. */
370
363
  interface EntraApplication {
371
364
  /** Directory **object id** — used for subsequent Graph calls (addPassword, delete). */
@@ -377,7 +370,7 @@ interface EntraApplication {
377
370
  * Create an Entra application for a per-agent bot.
378
371
  * @see https://learn.microsoft.com/graph/api/application-post-applications
379
372
  */
380
- declare function createApplication(token: string, options: {
373
+ export declare function createApplication(token: string, options: {
381
374
  displayName: string;
382
375
  signInAudience: 'AzureADMultipleOrgs' | 'AzureADMyOrg';
383
376
  }, graphBaseUrl?: string): Promise<EntraApplication>;
@@ -386,13 +379,13 @@ declare function createApplication(token: string, options: {
386
379
  * returned by this call — it cannot be read back later.
387
380
  * @see https://learn.microsoft.com/graph/api/application-addpassword
388
381
  */
389
- declare function addApplicationPassword(token: string, applicationObjectId: string, displayName: string, graphBaseUrl?: string): Promise<string>;
382
+ export declare function addApplicationPassword(token: string, applicationObjectId: string, displayName: string, graphBaseUrl?: string): Promise<string>;
390
383
  /**
391
384
  * Delete an Entra application. Used to clean up provisioned bots on
392
385
  * disconnect and to roll back a partially provisioned connect.
393
386
  * @see https://learn.microsoft.com/graph/api/application-delete
394
387
  */
395
- declare function deleteApplication(token: string, applicationObjectId: string, graphBaseUrl?: string): Promise<void>;
388
+ export declare function deleteApplication(token: string, applicationObjectId: string, graphBaseUrl?: string): Promise<void>;
396
389
  /**
397
390
  * A Teams Developer Portal bot registration, as accepted by
398
391
  * `POST https://dev.teams.microsoft.com/api/botframework` (the same contract
@@ -414,9 +407,9 @@ interface TeamsBotRegistration {
414
407
  isSingleTenant?: boolean;
415
408
  }
416
409
  /** Register a bot with the Teams Developer Portal. */
417
- declare function createBotRegistration(token: string, registration: TeamsBotRegistration, devPortalBaseUrl?: string): Promise<void>;
410
+ export declare function createBotRegistration(token: string, registration: TeamsBotRegistration, devPortalBaseUrl?: string): Promise<void>;
418
411
  /** Delete a Teams Developer Portal bot registration. */
419
- declare function deleteBotRegistration(token: string, botId: string, devPortalBaseUrl?: string): Promise<void>;
412
+ export declare function deleteBotRegistration(token: string, botId: string, devPortalBaseUrl?: string): Promise<void>;
420
413
  /**
421
414
  * Validate a bot's `appId`/`appPassword` by minting a Bot Framework token via
422
415
  * the OAuth2 client-credentials grant — the same exchange the adapter performs
@@ -427,11 +420,10 @@ declare function deleteBotRegistration(token: string, botId: string, devPortalBa
427
420
  * surfaced as-is (tagged `isTransportError`) so callers can tell connectivity
428
421
  * problems apart from bad credentials.
429
422
  */
430
- declare function validateBotCredentials(options: {
423
+ export declare function validateBotCredentials(options: {
431
424
  appId: string;
432
425
  appPassword: string;
433
426
  appTenantId?: string;
434
427
  }, loginBaseUrl?: string): Promise<void>;
435
- //#endregion
436
- export { DEV_PORTAL_BASE_URL, DEV_PORTAL_BOTS_URL, type EntraApplication, GRAPH_API_BASE_URL, LOGIN_BASE_URL, PLATFORM, TEAMS_DEV_PORTAL_SCOPE, TEAMS_GRAPH_SCOPE, TeamsAdapter, type TeamsBotRegistration, type TeamsConnectOptions, type TeamsCredentialsConfig, type TeamsDelegatedCredentialsConfig, TeamsInstallStore, type TeamsInstallation, TeamsProvider, type TeamsProviderConfig, type TeamsProviderConfigBase, type TeamsSelfManagedCredentialsConfig, type TeamsTokenResolver, addApplicationPassword, createApplication, createBotRegistration, createTeamsAdapter, deleteApplication, deleteBotRegistration, resolveTeamsAdapterConfig, toInstallationInfo, validateBotCredentials };
428
+ export { type EntraApplication, TeamsAdapter, type TeamsBotRegistration, type TeamsConnectOptions, type TeamsCredentialsConfig, type TeamsDelegatedCredentialsConfig, type TeamsInstallation, type TeamsProviderConfig, type TeamsProviderConfigBase, type TeamsSelfManagedCredentialsConfig, type TeamsTokenResolver, createTeamsAdapter };
437
429
  //# sourceMappingURL=index.d.ts.map
package/dist/index.d.ts CHANGED
@@ -3,30 +3,29 @@ import { ChannelsStorage } from "@mastra/core/storage";
3
3
  import { TeamsAdapter, TeamsAdapter as TeamsAdapter$1, TeamsAdapterConfig, createTeamsAdapter } from "@chat-adapter/teams";
4
4
  import { Mastra } from "@mastra/core/mastra";
5
5
  import { ApiRoute } from "@mastra/core/server";
6
- //#region src/types.d.ts
7
6
  /** Microsoft Graph origin used for Entra application provisioning. */
8
- declare const GRAPH_API_BASE_URL = "https://graph.microsoft.com";
7
+ export declare const GRAPH_API_BASE_URL = "https://graph.microsoft.com";
9
8
  /** Teams Developer Portal origin used for Bot Framework registrations. */
10
- declare const DEV_PORTAL_BASE_URL = "https://dev.teams.microsoft.com";
9
+ export declare const DEV_PORTAL_BASE_URL = "https://dev.teams.microsoft.com";
11
10
  /** Microsoft login origin used to validate bot credentials (client-credentials mint). */
12
- declare const LOGIN_BASE_URL = "https://login.microsoftonline.com";
11
+ export declare const LOGIN_BASE_URL = "https://login.microsoftonline.com";
13
12
  /**
14
13
  * OAuth scope for Microsoft Graph control-plane calls (create Entra apps,
15
14
  * mint client secrets). Passed to the delegated {@link TeamsTokenResolver}.
16
15
  */
17
- declare const TEAMS_GRAPH_SCOPE = "https://graph.microsoft.com/.default";
16
+ export declare const TEAMS_GRAPH_SCOPE = "https://graph.microsoft.com/.default";
18
17
  /**
19
18
  * OAuth scope for the Teams Developer Portal API (bot registrations).
20
19
  * Tokens for this audience are distinct from Graph tokens — a single access
21
20
  * token cannot serve both APIs. Passed to the delegated
22
21
  * {@link TeamsTokenResolver}.
23
22
  */
24
- declare const TEAMS_DEV_PORTAL_SCOPE = "https://dev.teams.microsoft.com/AppDefinitions.ReadWrite";
23
+ export declare const TEAMS_DEV_PORTAL_SCOPE = "https://dev.teams.microsoft.com/AppDefinitions.ReadWrite";
25
24
  /**
26
25
  * Teams Developer Portal page where minted bot registrations are managed and
27
26
  * packaged into a Teams app for distribution.
28
27
  */
29
- declare const DEV_PORTAL_BOTS_URL = "https://dev.teams.microsoft.com/bots";
28
+ export declare const DEV_PORTAL_BOTS_URL = "https://dev.teams.microsoft.com/bots";
30
29
  /**
31
30
  * Resolve an access token for a Microsoft OAuth scope on demand.
32
31
  *
@@ -218,13 +217,11 @@ interface TeamsInstallation {
218
217
  /** When the installation was created. */
219
218
  installedAt: Date;
220
219
  }
221
- //#endregion
222
- //#region src/teams-provider.d.ts
223
220
  /**
224
221
  * Resolve the per-adapter streaming/typing config the provider applies to the
225
222
  * Teams entry in `AgentChannels.adapters` — both default on.
226
223
  */
227
- declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'streaming' | 'typingStatus'>): {
224
+ export declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'streaming' | 'typingStatus'>): {
228
225
  streaming: StreamingConfig;
229
226
  typingStatus: boolean;
230
227
  };
@@ -253,7 +250,7 @@ declare function resolveTeamsAdapterConfig(config: Pick<TeamsProviderConfig, 'st
253
250
  * await teams.connect('my-agent'); // → { type: 'deep_link', url: 'https://dev.teams.microsoft.com/bots' }
254
251
  * ```
255
252
  */
256
- declare class TeamsProvider implements ChannelProvider {
253
+ export declare class TeamsProvider implements ChannelProvider {
257
254
  #private;
258
255
  readonly id = "teams";
259
256
  constructor(config?: TeamsProviderConfig);
@@ -332,10 +329,8 @@ declare class TeamsProvider implements ChannelProvider {
332
329
  */
333
330
  getAdapter(installationId: string): TeamsAdapter$1 | undefined;
334
331
  }
335
- //#endregion
336
- //#region src/install-store.d.ts
337
332
  /** Platform identifier used for every stored record and route. */
338
- declare const PLATFORM = "teams";
333
+ export declare const PLATFORM = "teams";
339
334
  /**
340
335
  * Persistence for Teams bot installations, layered over the platform-agnostic
341
336
  * `ChannelsStorage` (the same store `@mastra/slack` / `@mastra/telegram` use).
@@ -344,7 +339,7 @@ declare const PLATFORM = "teams";
344
339
  * supplied, `appPassword` (the bot's client secret) is AES-256-GCM encrypted
345
340
  * at rest.
346
341
  */
347
- declare class TeamsInstallStore {
342
+ export declare class TeamsInstallStore {
348
343
  #private;
349
344
  private readonly storage;
350
345
  private readonly encryptionKey?;
@@ -363,9 +358,7 @@ declare class TeamsInstallStore {
363
358
  deleteByAgent(agentId: string): Promise<void>;
364
359
  }
365
360
  /** Project an installation to its public, secret-free info for the editor UI. */
366
- declare function toInstallationInfo(install: TeamsInstallation): ChannelInstallationInfo;
367
- //#endregion
368
- //#region src/microsoft-clients.d.ts
361
+ export declare function toInstallationInfo(install: TeamsInstallation): ChannelInstallationInfo;
369
362
  /** The subset of a Graph `application` resource the provider uses. */
370
363
  interface EntraApplication {
371
364
  /** Directory **object id** — used for subsequent Graph calls (addPassword, delete). */
@@ -377,7 +370,7 @@ interface EntraApplication {
377
370
  * Create an Entra application for a per-agent bot.
378
371
  * @see https://learn.microsoft.com/graph/api/application-post-applications
379
372
  */
380
- declare function createApplication(token: string, options: {
373
+ export declare function createApplication(token: string, options: {
381
374
  displayName: string;
382
375
  signInAudience: 'AzureADMultipleOrgs' | 'AzureADMyOrg';
383
376
  }, graphBaseUrl?: string): Promise<EntraApplication>;
@@ -386,13 +379,13 @@ declare function createApplication(token: string, options: {
386
379
  * returned by this call — it cannot be read back later.
387
380
  * @see https://learn.microsoft.com/graph/api/application-addpassword
388
381
  */
389
- declare function addApplicationPassword(token: string, applicationObjectId: string, displayName: string, graphBaseUrl?: string): Promise<string>;
382
+ export declare function addApplicationPassword(token: string, applicationObjectId: string, displayName: string, graphBaseUrl?: string): Promise<string>;
390
383
  /**
391
384
  * Delete an Entra application. Used to clean up provisioned bots on
392
385
  * disconnect and to roll back a partially provisioned connect.
393
386
  * @see https://learn.microsoft.com/graph/api/application-delete
394
387
  */
395
- declare function deleteApplication(token: string, applicationObjectId: string, graphBaseUrl?: string): Promise<void>;
388
+ export declare function deleteApplication(token: string, applicationObjectId: string, graphBaseUrl?: string): Promise<void>;
396
389
  /**
397
390
  * A Teams Developer Portal bot registration, as accepted by
398
391
  * `POST https://dev.teams.microsoft.com/api/botframework` (the same contract
@@ -414,9 +407,9 @@ interface TeamsBotRegistration {
414
407
  isSingleTenant?: boolean;
415
408
  }
416
409
  /** Register a bot with the Teams Developer Portal. */
417
- declare function createBotRegistration(token: string, registration: TeamsBotRegistration, devPortalBaseUrl?: string): Promise<void>;
410
+ export declare function createBotRegistration(token: string, registration: TeamsBotRegistration, devPortalBaseUrl?: string): Promise<void>;
418
411
  /** Delete a Teams Developer Portal bot registration. */
419
- declare function deleteBotRegistration(token: string, botId: string, devPortalBaseUrl?: string): Promise<void>;
412
+ export declare function deleteBotRegistration(token: string, botId: string, devPortalBaseUrl?: string): Promise<void>;
420
413
  /**
421
414
  * Validate a bot's `appId`/`appPassword` by minting a Bot Framework token via
422
415
  * the OAuth2 client-credentials grant — the same exchange the adapter performs
@@ -427,11 +420,10 @@ declare function deleteBotRegistration(token: string, botId: string, devPortalBa
427
420
  * surfaced as-is (tagged `isTransportError`) so callers can tell connectivity
428
421
  * problems apart from bad credentials.
429
422
  */
430
- declare function validateBotCredentials(options: {
423
+ export declare function validateBotCredentials(options: {
431
424
  appId: string;
432
425
  appPassword: string;
433
426
  appTenantId?: string;
434
427
  }, loginBaseUrl?: string): Promise<void>;
435
- //#endregion
436
- export { DEV_PORTAL_BASE_URL, DEV_PORTAL_BOTS_URL, type EntraApplication, GRAPH_API_BASE_URL, LOGIN_BASE_URL, PLATFORM, TEAMS_DEV_PORTAL_SCOPE, TEAMS_GRAPH_SCOPE, TeamsAdapter, type TeamsBotRegistration, type TeamsConnectOptions, type TeamsCredentialsConfig, type TeamsDelegatedCredentialsConfig, TeamsInstallStore, type TeamsInstallation, TeamsProvider, type TeamsProviderConfig, type TeamsProviderConfigBase, type TeamsSelfManagedCredentialsConfig, type TeamsTokenResolver, addApplicationPassword, createApplication, createBotRegistration, createTeamsAdapter, deleteApplication, deleteBotRegistration, resolveTeamsAdapterConfig, toInstallationInfo, validateBotCredentials };
428
+ export { type EntraApplication, TeamsAdapter, type TeamsBotRegistration, type TeamsConnectOptions, type TeamsCredentialsConfig, type TeamsDelegatedCredentialsConfig, type TeamsInstallation, type TeamsProviderConfig, type TeamsProviderConfigBase, type TeamsSelfManagedCredentialsConfig, type TeamsTokenResolver, createTeamsAdapter };
437
429
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/teams-provider.ts","../src/install-store.ts","../src/microsoft-clients.ts"],"mappings":";;;;;;;cAWa;;cAGA;;cAGA;;;;;cAMA;;;;;;;cAQA;;;;;cAMA;;;;;;;;;;;KAYD,sBAAsB,0BAA0B,sBAAsB;;;;;;;UAQjE;;EAEf;;EAEA;EACA;;;;;;;;;;;;;;;;UAiBe;;EAEf,eAAe;EACf;EACA;;;;;;;KAQU,yBAAyB,oCAAoC;;;;UAKxD;;;;;;EAMf;;;;;EAKA,UAAU;;;;;EAKV;;EAEA;;;;;;;;;EASA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA,YAAY;;;;;;EAMZ,YAAY;;;;;EAKZ;;EASA,WAAW;;EAEX,cAAc;;EAEd,cAAc;;EAEd,QAAQ;;EAER,gBAAgB;;EAEhB,cAAc;;EAEd,oBAAoB;;EAEpB,mBAAmB;;EAEnB,OAAO;;EAEP,cAAc;;EAEd,cAAc;;EAEd,QAAQ;;EAER,SAAS;;EAET,aAAa,cAAc,6BAA6B;;;KAI9C,sBAAsB,0BAA0B;;UAG3C;;EAEf;;;;;;EAMA;;EAEA;;EAEA;;;;;;UAOe;;EAEf;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,aAAa;;;;;;;;iBChNC,0BAA0B,QAAQ,KAAK;EACrD,WAAW;EACX;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCW,yBAAyB;;WAC3B;EAWT,YAAY,SAAQ;;;;;EAQpB,SAAS,QAAQ;;;;;;;EAgBjB,aAAa;;EAoBb,WAAW;;;;;;;EAqCL,cAAc;;;;;;;;EA+Bd,UACJ;IACE;IACA;IACA;IACA;IACA;aAED;;;;;;;;;;;;;;;;;EAyCG,QAAQ,iBAAiB,UAAS,sBAA2B,QAAQ;;;;;;;EAiOrE,WAAW,kBAAkB;;EA4B7B,qBAAqB,QAAQ;;;;;;EAW7B,gBAAgB,kBAAkB,QAAQ;;EAMhD;;;;;EAQA,WAAW,yBAAyB;;;;;cClgBzB;;;;;;;;;cAqBA;;mBAIQ;mBACA;EAFnB,YACmB,SAAS,iBACT;;MAIf;;EAKE,WAAW,kBAAkB,QAAQ;;EAMrC,eAAe,oBAAoB,QAAQ;;EAM3C,KAAK,cAAc,oBAAoB;;EAKvC,QAAQ,QAAQ;;EAMhB,cAAc,kBAAkB;;;iBAuExB,mBAAmB,SAAS,oBAAoB;;;;UCzE/C;;EAEf;;EAEA;;;;;;iBAOoB,kBACpB,eACA;EAAW;EAAqB;GAChC,wBACC,QAAQ;;;;;;iBAsBW,uBACpB,eACA,6BACA,qBACA,wBACC;;;;;;iBAsBmB,kBACpB,eACA,6BACA,wBACC;;;;;;UAiBc;;EAEf;EACA;EACA;EACA;EACA;EACA;;;;;;EAMA;;;iBAIoB,sBACpB,eACA,cAAc,sBACd,4BACC;;iBASmB,sBACpB,eACA,eACA,4BACC;;;;;;;;;;;iBAsBmB,uBACpB;EAAW;EAAe;EAAqB;GAC/C,wBACC"}
1
+ {"version":3,"file":"index.d.ts","names":["TeamsAdapter"],"sources":["../src/types.ts","../src/teams-provider.ts","../src/install-store.ts","../src/microsoft-clients.ts"],"mappings":";;;;;;qBAWa;;qBAGA;;qBAGA;;;;;qBAMA;;;;;;;qBAQA;;;;;qBAMA;;;;;;;;;;;KAYD,sBAAsB,0BAA0B,sBAAsB;;;;;;;UAQjE;;EAEf;;EAEA;EACA;;;;;;;;;;;;;;;;UAiBe;;EAEf,eAAe;EACf;EACA;;;;;;;KAQU,yBAAyB,oCAAoC;;;;UAKxD;;;;;;EAMf;;;;;EAKA,UAAU;;;;;EAKV;;EAEA;;;;;;;;;EASA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;EAKA,YAAY;;;;;;EAMZ,YAAY;;;;;EAKZ;;EASA,WAAW;;EAEX,cAAc;;EAEd,cAAc;;EAEd,QAAQ;;EAER,gBAAgB;;EAEhB,cAAc;;EAEd,oBAAoB;;EAEpB,mBAAmB;;EAEnB,OAAO;;EAEP,cAAc;;EAEd,cAAc;;EAEd,QAAQ;;EAER,SAAS;;EAET,aAAa,cAAc,6BAA6B;;;KAI9C,sBAAsB,0BAA0B;;UAG3C;;EAEf;;;;;;EAMA;;EAEA;;EAEA;;;;;;UAOe;;EAEf;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,aAAa;;;;;;wBChNC,0BAA0B,QAAQ,KAAK;EACrD,WAAW;EACX;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiCW,yBAAyB;;WAC3B;EAWT,YAAY,SAAQ;;;;;EAQpB,SAAS,QAAQ;;;;;;;EAgBjB,aAAa;;EAoBb,WAAW;;;;;;;EAqCL,cAAc;;;;;;;;EA+Bd,UACJ;IACE;IACA;IACA;IACA;IACA;aAED;;;;;;;;;;;;;;;;;EAyCG,QAAQ,iBAAiB,UAAS,sBAA2B,QAAQ;;;;;;;EAiOrE,WAAW,kBAAkB;;EA4B7B,qBAAqB,QAAQ;;;;;;EAW7B,gBAAgB,kBAAkB,QAAQ;;EAMhD;;;;;EAQA,WAAW,yBAAyBA;;;qBClgBzB;;;;;;;;;qBAqBA;;mBAIQ;mBACA;EAFnB,YACmB,SAAS,iBACT;;MAIf;;EAKE,WAAW,kBAAkB,QAAQ;;EAMrC,eAAe,oBAAoB,QAAQ;;EAM3C,KAAK,cAAc,oBAAoB;;EAKvC,QAAQ,QAAQ;;EAMhB,cAAc,kBAAkB;;;wBAuExB,mBAAmB,SAAS,oBAAoB;;UCzE/C;;EAEf;;EAEA;;;;;;wBAOoB,kBACpB,eACA;EAAW;EAAqB;GAChC,wBACC,QAAQ;;;;;;wBAsBW,uBACpB,eACA,6BACA,qBACA,wBACC;;;;;;wBAsBmB,kBACpB,eACA,6BACA,wBACC;;;;;;UAiBc;;EAEf;EACA;EACA;EACA;EACA;EACA;;;;;;EAMA;;;wBAIoB,sBACpB,eACA,cAAc,sBACd,4BACC;;wBASmB,sBACpB,eACA,eACA,4BACC;;;;;;;;;;;wBAsBmB,uBACpB;EAAW;EAAe;EAAqB;GAC/C,wBACC"}
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { createCipheriv, createDecipheriv, hkdfSync, randomBytes, randomUUID } f
2
2
  import { AgentChannels, resolveWaitUntil } from "@mastra/core/channels";
3
3
  import { InMemoryChannelsStorage } from "@mastra/core/storage";
4
4
  import { TeamsAdapter, createTeamsAdapter, createTeamsAdapter as createTeamsAdapter$1 } from "@chat-adapter/teams";
5
- //#region src/types.ts
5
+ // src/types.ts
6
6
  /** Microsoft Graph origin used for Entra application provisioning. */
7
7
  const GRAPH_API_BASE_URL = "https://graph.microsoft.com";
8
8
  /** Teams Developer Portal origin used for Bot Framework registrations. */
@@ -26,8 +26,7 @@ const TEAMS_DEV_PORTAL_SCOPE = "https://dev.teams.microsoft.com/AppDefinitions.R
26
26
  * packaged into a Teams app for distribution.
27
27
  */
28
28
  const DEV_PORTAL_BOTS_URL = "https://dev.teams.microsoft.com/bots";
29
- //#endregion
30
- //#region src/microsoft-clients.ts
29
+ // src/microsoft-clients.ts
31
30
  /**
32
31
  * Thin fetch wrappers for the two Microsoft control planes the provider
33
32
  * provisions through — Microsoft Graph (Entra applications) and the Teams
@@ -172,8 +171,7 @@ async function validateBotCredentials(options, loginBaseUrl = LOGIN_BASE_URL) {
172
171
  throw new Error(`Microsoft rejected the bot credentials: ${detail?.error_description ?? detail?.error ?? `HTTP ${response.status}`}`);
173
172
  }
174
173
  }
175
- //#endregion
176
- //#region src/crypto.ts
174
+ // src/crypto.ts
177
175
  /**
178
176
  * Opt-in AES-256-GCM encryption for installation secrets at rest, with
179
177
  * HKDF-SHA256 key derivation (mirrors `@mastra/slack`'s `crypto.ts`). Each value
@@ -211,8 +209,7 @@ function decrypt(value, passphrase) {
211
209
  decipher.setAuthTag(Buffer.from(tagB64, "base64"));
212
210
  return Buffer.concat([decipher.update(Buffer.from(ctB64, "base64")), decipher.final()]).toString("utf8");
213
211
  }
214
- //#endregion
215
- //#region src/install-store.ts
212
+ // src/install-store.ts
216
213
  /** Platform identifier used for every stored record and route. */
217
214
  const PLATFORM = "teams";
218
215
  /**
@@ -323,8 +320,7 @@ function toInstallationInfo(install) {
323
320
  installedAt: install.installedAt
324
321
  };
325
322
  }
326
- //#endregion
327
- //#region src/teams-provider.ts
323
+ // src/teams-provider.ts
328
324
  /**
329
325
  * Resolve the per-adapter streaming/typing config the provider applies to the
330
326
  * Teams entry in `AgentChannels.adapters` — both default on.
@@ -834,7 +830,6 @@ var TeamsProvider = class {
834
830
  function stripTrailingSlash(url) {
835
831
  return url.endsWith("/") ? url.slice(0, -1) : url;
836
832
  }
837
- //#endregion
838
833
  export { DEV_PORTAL_BASE_URL, DEV_PORTAL_BOTS_URL, GRAPH_API_BASE_URL, LOGIN_BASE_URL, PLATFORM, TEAMS_DEV_PORTAL_SCOPE, TEAMS_GRAPH_SCOPE, TeamsAdapter, TeamsInstallStore, TeamsProvider, addApplicationPassword, createApplication, createBotRegistration, createTeamsAdapter, deleteApplication, deleteBotRegistration, resolveTeamsAdapterConfig, toInstallationInfo, validateBotCredentials };
839
834
 
840
835
  //# sourceMappingURL=index.js.map