@arbium/enterprise-agent-connect 0.0.0-stage → 0.1.1

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.
Files changed (137) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +117 -2
  3. package/dist/connectors/dell-techdirect/connector.json +39 -0
  4. package/dist/connectors/dell-techdirect/index.js +7 -0
  5. package/dist/connectors/dell-techdirect/index.js.map +1 -0
  6. package/dist/connectors/dell-techdirect/tools.js +49 -0
  7. package/dist/connectors/dell-techdirect/tools.js.map +1 -0
  8. package/dist/connectors/dell-techdirect/vendor.js +57 -0
  9. package/dist/connectors/dell-techdirect/vendor.js.map +1 -0
  10. package/dist/connectors/entra/connector.json +85 -0
  11. package/dist/connectors/entra/index.js +4 -0
  12. package/dist/connectors/entra/index.js.map +1 -0
  13. package/dist/connectors/entra/tools.js +262 -0
  14. package/dist/connectors/entra/tools.js.map +1 -0
  15. package/dist/connectors/fedex/connector.json +118 -0
  16. package/dist/connectors/fedex/index.js +7 -0
  17. package/dist/connectors/fedex/index.js.map +1 -0
  18. package/dist/connectors/fedex/tools.js +152 -0
  19. package/dist/connectors/fedex/tools.js.map +1 -0
  20. package/dist/connectors/fedex/vendor.js +98 -0
  21. package/dist/connectors/fedex/vendor.js.map +1 -0
  22. package/dist/connectors/http/index.js +235 -0
  23. package/dist/connectors/http/index.js.map +1 -0
  24. package/dist/connectors/intune/connector.json +106 -0
  25. package/dist/connectors/intune/index.js +4 -0
  26. package/dist/connectors/intune/index.js.map +1 -0
  27. package/dist/connectors/intune/tools.js +416 -0
  28. package/dist/connectors/intune/tools.js.map +1 -0
  29. package/dist/connectors/jira/connector.json +129 -0
  30. package/dist/connectors/jira/index.js +7 -0
  31. package/dist/connectors/jira/index.js.map +1 -0
  32. package/dist/connectors/jira/jql.js +67 -0
  33. package/dist/connectors/jira/jql.js.map +1 -0
  34. package/dist/connectors/jira/tools.js +464 -0
  35. package/dist/connectors/jira/tools.js.map +1 -0
  36. package/dist/connectors/jira/vendor.js +94 -0
  37. package/dist/connectors/jira/vendor.js.map +1 -0
  38. package/dist/connectors/microsoft/client.js +434 -0
  39. package/dist/connectors/microsoft/client.js.map +1 -0
  40. package/dist/connectors/microsoft/provider.json +118 -0
  41. package/dist/connectors/outlook-calendar/connector.json +136 -0
  42. package/dist/connectors/outlook-calendar/index.js +4 -0
  43. package/dist/connectors/outlook-calendar/index.js.map +1 -0
  44. package/dist/connectors/outlook-calendar/tools.js +398 -0
  45. package/dist/connectors/outlook-calendar/tools.js.map +1 -0
  46. package/dist/connectors/outlook-mail/connector.json +154 -0
  47. package/dist/connectors/outlook-mail/index.js +4 -0
  48. package/dist/connectors/outlook-mail/index.js.map +1 -0
  49. package/dist/connectors/outlook-mail/tools.js +236 -0
  50. package/dist/connectors/outlook-mail/tools.js.map +1 -0
  51. package/dist/connectors/salesforce/connector.json +122 -0
  52. package/dist/connectors/salesforce/index.js +7 -0
  53. package/dist/connectors/salesforce/index.js.map +1 -0
  54. package/dist/connectors/salesforce/soql.js +60 -0
  55. package/dist/connectors/salesforce/soql.js.map +1 -0
  56. package/dist/connectors/salesforce/tools.js +234 -0
  57. package/dist/connectors/salesforce/tools.js.map +1 -0
  58. package/dist/connectors/salesforce/vendor.js +107 -0
  59. package/dist/connectors/salesforce/vendor.js.map +1 -0
  60. package/dist/connectors/sharepoint-files/connector.json +194 -0
  61. package/dist/connectors/sharepoint-files/excel.js +300 -0
  62. package/dist/connectors/sharepoint-files/excel.js.map +1 -0
  63. package/dist/connectors/sharepoint-files/index.js +12 -0
  64. package/dist/connectors/sharepoint-files/index.js.map +1 -0
  65. package/dist/connectors/sharepoint-files/tools.js +365 -0
  66. package/dist/connectors/sharepoint-files/tools.js.map +1 -0
  67. package/dist/connectors/sharepoint-files/vendor.js +167 -0
  68. package/dist/connectors/sharepoint-files/vendor.js.map +1 -0
  69. package/dist/connectors/teams/connector.json +298 -0
  70. package/dist/connectors/teams/index.js +5 -0
  71. package/dist/connectors/teams/index.js.map +1 -0
  72. package/dist/connectors/teams/tools.js +391 -0
  73. package/dist/connectors/teams/tools.js.map +1 -0
  74. package/dist/packages/connector-kit/src/branding.js +102 -0
  75. package/dist/packages/connector-kit/src/branding.js.map +1 -0
  76. package/dist/packages/connector-kit/src/certificate.js +84 -0
  77. package/dist/packages/connector-kit/src/certificate.js.map +1 -0
  78. package/dist/packages/connector-kit/src/common.js +107 -0
  79. package/dist/packages/connector-kit/src/common.js.map +1 -0
  80. package/dist/packages/connector-kit/src/connector.js +492 -0
  81. package/dist/packages/connector-kit/src/connector.js.map +1 -0
  82. package/dist/packages/connector-kit/src/oauth.js +79 -0
  83. package/dist/packages/connector-kit/src/oauth.js.map +1 -0
  84. package/dist/packages/connector-kit/src/types.js +20 -0
  85. package/dist/packages/connector-kit/src/types.js.map +1 -0
  86. package/dist/packages/server/migrations/0001_tables.sql +268 -0
  87. package/dist/packages/server/migrations/0002_organizations.sql +72 -0
  88. package/dist/packages/server/migrations/0003_drop_unused.sql +3 -0
  89. package/dist/packages/server/migrations/0004_trigger_runners.sql +15 -0
  90. package/dist/packages/server/migrations/0005_run_runner.sql +3 -0
  91. package/dist/packages/server/migrations/0006_approvals.sql +36 -0
  92. package/dist/packages/server/migrations/rollback/to-legacy.sql +87 -0
  93. package/dist/packages/server/src/api.js +684 -0
  94. package/dist/packages/server/src/api.js.map +1 -0
  95. package/dist/packages/server/src/app.js +444 -0
  96. package/dist/packages/server/src/app.js.map +1 -0
  97. package/dist/packages/server/src/builtin.js +24 -0
  98. package/dist/packages/server/src/builtin.js.map +1 -0
  99. package/dist/packages/server/src/consent.js +36 -0
  100. package/dist/packages/server/src/consent.js.map +1 -0
  101. package/dist/packages/server/src/index.js +129 -0
  102. package/dist/packages/server/src/index.js.map +1 -0
  103. package/dist/packages/server/src/migrate.js +134 -0
  104. package/dist/packages/server/src/migrate.js.map +1 -0
  105. package/dist/packages/server/src/openapi.js +101 -0
  106. package/dist/packages/server/src/openapi.js.map +1 -0
  107. package/dist/packages/server/src/secrets.js +76 -0
  108. package/dist/packages/server/src/secrets.js.map +1 -0
  109. package/dist/packages/server/src/server.js +69 -0
  110. package/dist/packages/server/src/server.js.map +1 -0
  111. package/dist/packages/server/src/service.js +908 -0
  112. package/dist/packages/server/src/service.js.map +1 -0
  113. package/dist/packages/server/src/store.js +411 -0
  114. package/dist/packages/server/src/store.js.map +1 -0
  115. package/dist/packages/server/src/teams/activity.js +187 -0
  116. package/dist/packages/server/src/teams/activity.js.map +1 -0
  117. package/dist/packages/server/src/teams/admin.js +699 -0
  118. package/dist/packages/server/src/teams/admin.js.map +1 -0
  119. package/dist/packages/server/src/teams/approval.js +118 -0
  120. package/dist/packages/server/src/teams/approval.js.map +1 -0
  121. package/dist/packages/server/src/teams/bot.js +124 -0
  122. package/dist/packages/server/src/teams/bot.js.map +1 -0
  123. package/dist/packages/server/src/teams/claude.js +165 -0
  124. package/dist/packages/server/src/teams/claude.js.map +1 -0
  125. package/dist/packages/server/src/teams/jwt.js +121 -0
  126. package/dist/packages/server/src/teams/jwt.js.map +1 -0
  127. package/dist/packages/server/src/teams/package.js +319 -0
  128. package/dist/packages/server/src/teams/package.js.map +1 -0
  129. package/dist/packages/server/src/teams/provision.js +505 -0
  130. package/dist/packages/server/src/teams/provision.js.map +1 -0
  131. package/dist/packages/server/src/teams/runner.js +143 -0
  132. package/dist/packages/server/src/teams/runner.js.map +1 -0
  133. package/dist/packages/server/src/teams/runtime.js +701 -0
  134. package/dist/packages/server/src/teams/runtime.js.map +1 -0
  135. package/dist/packages/server/src/teams/store.js +507 -0
  136. package/dist/packages/server/src/teams/store.js.map +1 -0
  137. package/package.json +42 -4
@@ -0,0 +1,298 @@
1
+ {
2
+ "id": "teams",
3
+ "name": "Microsoft Teams",
4
+ "description": "Let each agent take part in Teams as its own bot: read where it is added, post, and answer when someone messages it.",
5
+ "logo": "/brand/microsoft-teams.svg",
6
+ "identity": "Each agent appears in Teams as its own bot, with its own name and picture, signing in with its own app registration in your tenant. A bot sees only the teams and chats it is added to. With Add to Teams, {brand.microsoft.appName} makes and removes the bots and adds them where you choose, and it can add those bots, with access to their messages, to any team or group chat in your organization (and to any person, if you allow that below), so treat its key like an administrator's.",
7
+ "signsInAs": "agentBot",
8
+ "provider": "microsoft",
9
+ "order": 7,
10
+ "accountKey": "tenantId",
11
+ "connectionKind": "guided",
12
+ "scopes": ["Team.ReadBasic.All", "User.ReadBasic.All"],
13
+ "setup": [
14
+ {
15
+ "title": "Add the Microsoft Graph permissions for adding bots",
16
+ "body": "{brand.microsoft.appName} adds each agent's bot to Teams for you: it creates the bot's own app registration (it can change only apps it created), adds the bot where you choose, and lists teams and people for you to pick from. Add exactly these application permissions (with setup scripts only, chosen in step 1, just the two read permissions). Know what the others allow together: {brand.microsoft.appName} can add any bot it made to any team or group chat in your organization (and to any person, if you allowed that in step 1), with consent to read the messages there, and it holds those bots' keys. So whoever holds the {brand.microsoft.appName} key could read a team or chat by adding a bot to it; the only trace is the bot appearing there, and in {brand.productName}'s activity log when {brand.productName} does it. {brand.productName} adds a bot only where you pick. Do not add ChannelMessage.Read.All, Chat.Read.All or similar: they open every conversation at once without adding anything.",
17
+ "click": [
18
+ "In the Microsoft Entra admin center, go to Entra ID, then App registrations, and open {brand.microsoft.appName}.",
19
+ "Select API permissions, then Add a permission, then Microsoft Graph, then Application permissions.",
20
+ "Tick {scopes} and select Add permissions."
21
+ ],
22
+ "copy": [
23
+ "# In Azure Cloud Shell (Bash) you are already signed in.",
24
+ "az ad app permission add --id {clientId} --api 00000003-0000-0000-c000-000000000000 --api-permissions \"$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query \"appRoles[?value=='{scope}'].id\" -o tsv)=Role\""
25
+ ],
26
+ "shell": "bash"
27
+ },
28
+ {
29
+ "title": "Grant admin consent",
30
+ "body": "Still under API permissions, grant admin consent. This needs a Global Administrator or Privileged Role Administrator. Each permission should then show Granted. With Commands, a permission that was granted already is answered with \"Permission being assigned already exists\", which is fine.",
31
+ "click": [
32
+ "Still under API permissions, select Grant admin consent for your organization, then Yes.",
33
+ "Each permission should show Granted under Status."
34
+ ],
35
+ "copy": [
36
+ "SP=$(az ad sp show --id {clientId} --query id -o tsv)",
37
+ "GRAPH=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query id -o tsv)",
38
+ "az rest --method post --url \"https://graph.microsoft.com/v1.0/servicePrincipals/$SP/appRoleAssignments\" --body \"{\\\"principalId\\\": \\\"$SP\\\", \\\"resourceId\\\": \\\"$GRAPH\\\", \\\"appRoleId\\\": \\\"$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query \"appRoles[?value=='{scope}'].id\" -o tsv)\\\"}\""
39
+ ],
40
+ "shell": "bash"
41
+ },
42
+ {
43
+ "title": "Let administrators publish bots to your Teams apps",
44
+ "body": "Microsoft lets an app publish to your organization's Teams apps only on behalf of a signed-in administrator. So when you publish an agent's bot, {brand.productName} sends you to Microsoft's sign-in for {brand.microsoft.appName} and comes back here. Add the delegated permission AppCatalog.ReadWrite.All (with openid, for the sign-in), grant admin consent for it, and add this page's return address to the app. Microsoft still lets only Teams Administrators and Global Administrators publish. If the consent command says a grant already exists, grant consent in the portal instead. The last command adds the return address only if it is not there yet, so running it again changes nothing.",
45
+ "click": [
46
+ "In App registrations, open {brand.microsoft.appName} and select API permissions, then Add a permission, then Microsoft Graph, then Delegated permissions.",
47
+ "Tick openid and AppCatalog.ReadWrite.All, select Add permissions, then Grant admin consent for your organization, then Yes.",
48
+ "Select Authentication, then Add a platform, then Web. Enter {teamsPublishRedirect} as the redirect URI and select Configure. Leave both token options unticked."
49
+ ],
50
+ "copy": [
51
+ "SCOPE=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query \"oauth2PermissionScopes[?value=='AppCatalog.ReadWrite.All'].id\" -o tsv)",
52
+ "OPENID=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query \"oauth2PermissionScopes[?value=='openid'].id\" -o tsv)",
53
+ "az ad app permission add --id {clientId} --api 00000003-0000-0000-c000-000000000000 --api-permissions \"$SCOPE=Scope\" \"$OPENID=Scope\"",
54
+ "SP=$(az ad sp show --id {clientId} --query id -o tsv)",
55
+ "GRAPH=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query id -o tsv)",
56
+ "az rest --method post --url https://graph.microsoft.com/v1.0/oauth2PermissionGrants --body \"{\\\"clientId\\\": \\\"$SP\\\", \\\"consentType\\\": \\\"AllPrincipals\\\", \\\"resourceId\\\": \\\"$GRAPH\\\", \\\"scope\\\": \\\"openid AppCatalog.ReadWrite.All\\\"}\"",
57
+ "az ad app show --id {clientId} --query \"web.redirectUris[]\" -o tsv | grep -qxF '{teamsPublishRedirect}' || az ad app update --id {clientId} --web-redirect-uris $(az ad app show --id {clientId} --query \"web.redirectUris[]\" -o tsv) '{teamsPublishRedirect}'"
58
+ ],
59
+ "shell": "bash",
60
+ "confirm": "teams-publish-sign-in",
61
+ "option": { "field": "add_to_teams", "value": "on" }
62
+ },
63
+ {
64
+ "title": "Choose where the bots' Azure records go",
65
+ "body": "Each agent's bot is an Azure Bot resource on the free F0 tier, which costs nothing. {brand.productName} makes them in one resource group you choose, and needs no other access to your Azure subscription. Create a resource group that holds only these bots, then enter its subscription ID and name here. Do not use a group with other Azure Bots in it: {brand.microsoft.appName} can change or delete any Azure Bot in this group.",
66
+ "link": {
67
+ "label": "Open Resource groups",
68
+ "href": "https://portal.azure.com/#browse/resourcegroups"
69
+ },
70
+ "click": [
71
+ "In the Azure portal, open Resource groups and select Create.",
72
+ "Choose the subscription, name the group {brand.teams.resourceGroup}, pick a region and select Review + create, then Create.",
73
+ "Open the group: its Overview shows the Subscription ID. Enter both below."
74
+ ],
75
+ "copy": [
76
+ "# Replace <region> with your region, e.g. eastus (az account list-locations -o table lists them).",
77
+ "az group create --name '{brand.teams.resourceGroup}' --location <region>",
78
+ "az account show --query id -o tsv"
79
+ ],
80
+ "shell": "bash",
81
+ "settings": [
82
+ {
83
+ "id": "azureSubscriptionId",
84
+ "label": "Subscription ID",
85
+ "placeholder": "00000000-0000-0000-0000-000000000000",
86
+ "help": "The subscription's ID, from the resource group's Overview.",
87
+ "pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
88
+ },
89
+ {
90
+ "id": "azureResourceGroup",
91
+ "label": "Resource group",
92
+ "placeholder": "{brand.teams.resourceGroup}",
93
+ "help": "Letters, digits, dots, dashes, underscores and parentheses, up to 90.",
94
+ "pattern": "[A-Za-z0-9._()-]{1,89}[A-Za-z0-9_()-]"
95
+ }
96
+ ],
97
+ "live": "azure-target",
98
+ "option": { "field": "add_to_teams", "value": "on" }
99
+ },
100
+ {
101
+ "title": "Give {brand.microsoft.appName} a role on that resource group",
102
+ "body": "A custom role that can only create, change and delete Azure Bots and their channels, given to {brand.microsoft.appName} on that one resource group. Creating it needs Owner or User Access Administrator there. A new role can take a few minutes to apply; this step checks it live.",
103
+ "click": [
104
+ "In the Azure portal, open the resource group {azureResourceGroup}, then Access control (IAM), then Add, then Add custom role.",
105
+ "Name it {brand.microsoft.botRole}. Under Permissions, select Add permissions, search Microsoft.BotService, and tick Read, Write and Delete for both Bot Service and Bot Service channels. Under Assignable scopes, keep only this resource group. Select Review + create, then Create.",
106
+ "Back in Access control (IAM), select Add, then Add role assignment. Choose {brand.microsoft.botRole}, then Next. Under Members, select Select members, find {brand.microsoft.appName}, select it, then Review + assign."
107
+ ],
108
+ "copy": [
109
+ "az account set --subscription '{azureSubscriptionId}'",
110
+ "az role definition list --custom-role-only true --name '{brand.microsoft.botRole}' --query '[0].id' -o tsv | grep -q . || az role definition create --role-definition '{\"Name\":\"{brand.microsoft.botRole}\",\"Description\":\"Lets {brand.microsoft.appName} create and remove Azure Bots for its agents in one resource group.\",\"Actions\":[\"Microsoft.BotService/botServices/read\",\"Microsoft.BotService/botServices/write\",\"Microsoft.BotService/botServices/delete\",\"Microsoft.BotService/botServices/channels/read\",\"Microsoft.BotService/botServices/channels/write\",\"Microsoft.BotService/botServices/channels/delete\"],\"AssignableScopes\":[\"/subscriptions/{azureSubscriptionId}/resourceGroups/{azureResourceGroup}\"]}'",
111
+ "# A new role can take a minute to be usable. If this says the role was not found, run it again.",
112
+ "az role assignment create --assignee-object-id {servicePrincipalId} --assignee-principal-type ServicePrincipal --role '{brand.microsoft.botRole}' --scope '/subscriptions/{azureSubscriptionId}/resourceGroups/{azureResourceGroup}'"
113
+ ],
114
+ "shell": "bash",
115
+ "live": "azure-role",
116
+ "option": { "field": "add_to_teams", "value": "on" }
117
+ },
118
+ {
119
+ "title": "Register the Bot Service in the subscription",
120
+ "body": "Azure makes a resource type usable in a subscription only once it is registered there. Do this once per subscription; it needs Contributor on the subscription. {brand.productName} cannot see the subscription itself, so mark this done. If it was missed, Add to Teams says so.",
121
+ "link": {
122
+ "label": "Open Subscriptions",
123
+ "href": "https://portal.azure.com/#view/Microsoft_Azure_Billing/SubscriptionsBladeV2"
124
+ },
125
+ "click": [
126
+ "In the Azure portal, open Subscriptions and choose {azureSubscriptionId}.",
127
+ "Under Settings, open Resource providers, find Microsoft.BotService, and select Register if it is not Registered."
128
+ ],
129
+ "copy": [
130
+ "az provider register --namespace Microsoft.BotService --subscription {azureSubscriptionId} --wait",
131
+ "az provider show --namespace Microsoft.BotService --subscription {azureSubscriptionId} --query registrationState -o tsv"
132
+ ],
133
+ "shell": "bash",
134
+ "confirm": "teams-bot-service",
135
+ "option": { "field": "add_to_teams", "value": "on" }
136
+ }
137
+ ],
138
+ "afterConnect": [
139
+ {
140
+ "title": "Check that your organization allows its own apps",
141
+ "body": "Each agent's bot is an app made for your organization. Who can use it is decided by the app's own status and availability and, in organizations that still use them, app permission policies.",
142
+ "link": {
143
+ "label": "Open Permission policies",
144
+ "href": "https://admin.teams.microsoft.com/policies/app-permission"
145
+ },
146
+ "click": [
147
+ "In the Teams admin center, go to Teams apps. If you see Permission policies there, open Global (Org-wide default).",
148
+ "Under Custom apps, if it says Allow all apps, nothing to do. If it says Allow specific apps, select Allow apps, search for each agent's bot by its name once it is published, select Add, then Save. Choosing Allow all apps instead opens every custom app in your organization, not only the agents' bots.",
149
+ "If there is no Permission policies page, your organization manages access per app instead: nothing to do here."
150
+ ],
151
+ "copy": [
152
+ "# Needs the Microsoft Teams PowerShell module: Install-Module MicrosoftTeams -Scope CurrentUser",
153
+ "Connect-MicrosoftTeams",
154
+ "# Shows the org-wide policy. If this finds none, your organization manages access per app instead: nothing to do here.",
155
+ "Get-CsTeamsAppPermissionPolicy -Identity Global | Select-Object PrivateCatalogAppsType, PrivateCatalogApps",
156
+ "# If PrivateCatalogAppsType is AllowedAppList, add each agent's bot once it is published. Replace <bot name> with the bot's name.",
157
+ "$bot = Get-TeamsApp -DisplayName '<bot name>' -DistributionMethod organization",
158
+ "$policy = Get-CsTeamsAppPermissionPolicy -Identity Global",
159
+ "Set-CsTeamsAppPermissionPolicy -Identity Global -PrivateCatalogAppsType AllowedAppList -PrivateCatalogApps (@($policy.PrivateCatalogApps) + (New-Object -TypeName Microsoft.Teams.Policy.Administration.Cmdlets.Core.PrivateCatalogApp -Property @{Id = $bot.Id}))",
160
+ "# Only if you would rather allow every custom app in your organization, not only these bots:",
161
+ "# Set-CsTeamsAppPermissionPolicy -Identity Global -PrivateCatalogAppsType BlockedAppList -PrivateCatalogApps @()"
162
+ ],
163
+ "shell": "powershell",
164
+ "confirm": "teams-custom-apps"
165
+ },
166
+ {
167
+ "title": "Let teams and chats give a bot their messages",
168
+ "body": "An agent reads earlier messages in a thread, and hears messages that do not mention it, only where the team or chat that adds it may grant that. Microsoft allows it by default (ManagedByMicrosoft). These commands turn it on only if your organization turned it off, and change nothing otherwise. Microsoft offers this setting only in PowerShell.",
169
+ "link": {
170
+ "label": "About these settings",
171
+ "href": "https://learn.microsoft.com/microsoftteams/platform/graph-api/rsc/grant-resource-specific-consent"
172
+ },
173
+ "shell": "powershell",
174
+ "copy": [
175
+ "# Needs the Microsoft.Graph.Beta.Teams module: Install-Module Microsoft.Graph.Beta.Teams -Scope CurrentUser",
176
+ "Connect-MgGraph -Scopes 'TeamworkAppSettings.ReadWrite.All','Policy.ReadWrite.Authorization','Policy.ReadWrite.PermissionGrant','AppCatalog.Read.All'",
177
+ "if ((Get-MgBetaTeamRscConfiguration).State -eq 'DisabledForAllApps') { Set-MgBetaTeamRscConfiguration -State EnabledForAllApps }",
178
+ "if ((Get-MgBetaChatRscConfiguration).State -eq 'DisabledForAllApps') { Set-MgBetaChatRscConfiguration -State EnabledForAllApps }",
179
+ "Get-MgBetaTeamRscConfiguration; Get-MgBetaChatRscConfiguration"
180
+ ],
181
+ "confirm": "teams-rsc",
182
+ "clickUnavailable": true
183
+ }
184
+ ],
185
+ "fields": [
186
+ {
187
+ "id": "add_to_teams",
188
+ "label": "Making and adding bots",
189
+ "secret": false,
190
+ "options": [
191
+ {
192
+ "value": "on",
193
+ "label": "{brand.productName} makes and adds them",
194
+ "description": "Add to Teams makes each agent's bot in your tenant and adds it to the teams and group chats you pick. {brand.microsoft.appName} needs the permissions below for that.",
195
+ "scopes": [
196
+ "Application.ReadWrite.OwnedBy",
197
+ "TeamsAppInstallation.ReadWriteAndConsentForTeam.All",
198
+ "TeamsAppInstallation.ReadWriteAndConsentForChat.All"
199
+ ]
200
+ },
201
+ {
202
+ "value": "off",
203
+ "label": "With each bot's setup script",
204
+ "description": "You run each agent's setup script, and people add the published bot in Teams themselves. {brand.productName} does not make bots or add them anywhere. If you granted {brand.microsoft.appName} Application.ReadWrite.OwnedBy or the TeamsAppInstallation permissions earlier, remove them in Microsoft Entra: until then its key can still do both."
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "id": "person_installs",
210
+ "label": "Adding a bot for one person",
211
+ "secret": false,
212
+ "requires": { "field": "add_to_teams", "value": "on" },
213
+ "options": [
214
+ {
215
+ "value": "off",
216
+ "label": "Teams and group chats only",
217
+ "description": "{brand.productName} can add a bot to a team or a group chat. People can still add a published bot for themselves in Teams."
218
+ },
219
+ {
220
+ "value": "on",
221
+ "label": "Also for one person",
222
+ "description": "{brand.productName} can also add a bot for any one person in your organization, which needs one more permission: {brand.microsoft.appName} could then add its bots for anyone.",
223
+ "scopes": ["TeamsAppInstallation.ReadWriteAndConsentForUser.All"]
224
+ }
225
+ ]
226
+ }
227
+ ],
228
+ "capabilities": [
229
+ {
230
+ "id": "read",
231
+ "label": "Read messages",
232
+ "description": "See the teams, channels and chats the agent's bot was added to, and read their messages. People who message the agent can ask it to read any of these, so turn this on only when the agent needs it.",
233
+ "scopes": [],
234
+ "roles": [],
235
+ "permissions": [],
236
+ "tools": [
237
+ "teams_list_teams",
238
+ "teams_list_channels",
239
+ "teams_read_messages",
240
+ "teams_read_thread"
241
+ ]
242
+ },
243
+ {
244
+ "id": "post",
245
+ "label": "Post messages",
246
+ "description": "Post new messages and replies in the channels and chats the bot was added to.",
247
+ "scopes": [],
248
+ "roles": [],
249
+ "permissions": [],
250
+ "tools": ["teams_post_message"]
251
+ },
252
+ {
253
+ "id": "approve",
254
+ "label": "Ask people to approve or reject",
255
+ "description": "Post a card with Approve and Reject buttons for one named person in the teams, channels and chats the bot was added to, and read their answer. Only that person's click counts. The agent looks the person up by sign-in name in your directory.",
256
+ "scopes": [],
257
+ "roles": [],
258
+ "permissions": [],
259
+ "tools": [
260
+ "teams_request_approval",
261
+ "teams_get_approval"
262
+ ]
263
+ },
264
+ {
265
+ "id": "respond",
266
+ "label": "React in real time",
267
+ "description": "Answer when someone messages the agent in Teams. Each answer uses your organization's Claude API key.",
268
+ "scopes": [],
269
+ "roles": [],
270
+ "permissions": [],
271
+ "tools": ["teams_reply"],
272
+ "claudeKey": true
273
+ }
274
+ ],
275
+ "limits": [
276
+ {
277
+ "id": "teams",
278
+ "label": "Teams",
279
+ "help": "Only these teams (their group ids). Leave empty for every team and chat the bot is added to. When set, chats are left out.",
280
+ "kind": "list",
281
+ "required": false,
282
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
283
+ },
284
+ {
285
+ "id": "channels",
286
+ "label": "Channels",
287
+ "help": "Only these channels. Leave empty for every channel of the allowed teams. When set, chats are left out.",
288
+ "kind": "list",
289
+ "required": false,
290
+ "pattern": "^19:[A-Za-z0-9_.-]+@thread\\.(tacv2|skype)$"
291
+ }
292
+ ],
293
+ "verify": {
294
+ "label": "Microsoft permissions on the app",
295
+ "check": "permissions"
296
+ },
297
+ "revoke": "Remove an agent's bot from its key under API keys: {brand.productName} deletes what it made in your tenant and gives you the commands for anything left. To stop every bot at once, remove the agents' app registrations in the Microsoft Entra admin center."
298
+ }
@@ -0,0 +1,5 @@
1
+ import { microsoftApp } from "../microsoft/client.js";
2
+ import { teamsTools } from "./tools.js";
3
+ // The connection only holds the ceiling; calls go out as each agent's own bot.
4
+ export default microsoftApp("teams", teamsTools);
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../connectors/teams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,+EAA+E;AAC/E,eAAe,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC"}