@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
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,118 @@
1
- # Temporary Holding Version
1
+ # Enterprise Agent Connect
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Connect your company's apps once, then give each AI agent its own key with only the access you
4
+ grant it. Agents reach the apps through one MCP endpoint; every call is checked against the
5
+ agent's grants and written to an audit log. Agents never hold the apps' credentials.
6
+
7
+ - **Built-in apps:** Jira, Microsoft 365 (Outlook mail and calendar, SharePoint files and Excel,
8
+ Teams, Entra ID, Intune), Salesforce, FedEx, Dell TechDirect.
9
+ - **Your own apps without code:** describe an internal REST API in one `connector.json`
10
+ ([docs/http-connector.md](docs/http-connector.md)).
11
+ - **Per-agent access:** tick what each agent can do per app, and limit it to values (mailboxes,
12
+ sites, projects, customers). Anything that deletes needs an explicit confirmation.
13
+ - **Self-hosted:** one Node service and Postgres. No UI ships; the admin API
14
+ (`packages/server/openapi.json`) and the typed client (`packages/client`) are for building
15
+ your own admin pages.
16
+
17
+ How it is secured: [docs/security.md](docs/security.md). Adding apps:
18
+ [docs/connectors.md](docs/connectors.md).
19
+
20
+ ## Quick start (about 10 minutes)
21
+
22
+ Needs Docker with Compose v2, `openssl` and `curl`. This runs the service, Postgres and a small
23
+ example internal app (an orders API), then gives an agent read access to one customer's orders.
24
+
25
+ ```sh
26
+ cd deploy/docker
27
+ cp .env.example .env
28
+ sed -i.bak "s|^CONNECT_ENCRYPTION_KEY=|CONNECT_ENCRYPTION_KEY=$(openssl rand -base64 32)|; \
29
+ s|^AGENT_CONNECT_ADMIN_TOKEN=|AGENT_CONNECT_ADMIN_TOKEN=$(openssl rand -hex 32)|; \
30
+ s|^POSTGRES_PASSWORD=|POSTGRES_PASSWORD=$(openssl rand -hex 24)|" .env && rm .env.bak
31
+ docker compose -f docker-compose.yml -f docker-compose.example.yml up --build --wait
32
+ ```
33
+
34
+ Keep `CONNECT_ENCRYPTION_KEY`: it seals every stored credential, and nothing saved opens without
35
+ it. The service listens on port 3000 of this machine only and applies its database migrations.
36
+
37
+ **1. Make an organization and connect the example app** (its API key is `example-key`):
38
+
39
+ ```sh
40
+ TOKEN=$(grep ^AGENT_CONNECT_ADMIN_TOKEN .env | cut -d= -f2)
41
+ admin() { curl -s -H "Authorization: Bearer $TOKEN" -H 'content-type: application/json' \
42
+ "http://localhost:3000/agent-connect/admin/v1$@"; }
43
+
44
+ ORG=$(admin /orgs -X POST -d '{"name":"Example Org"}' | sed 's/.*"id":"\([^"]*\)".*/\1/')
45
+ admin /orgs/$ORG/connections/orders -X PUT \
46
+ -d '{"capabilities":["read","notes"],"fields":{"api_key":"example-key"},"connectedBy":"Example Admin"}'
47
+ ```
48
+
49
+ `capabilities` is the most any agent may get from this app; connecting runs the app's check.
50
+
51
+ **2. Make an agent and grant it "Read orders" for customer `acme` only.** The key is shown once:
52
+
53
+ ```sh
54
+ NEW=$(admin /orgs/$ORG/agents -X POST -d '{"name":"demo","createdBy":"Example Admin"}')
55
+ KEY=$(echo "$NEW" | sed 's/.*"key":"\([^"]*\)".*/\1/')
56
+ AGENT=$(echo "$NEW" | sed 's/.*"agent":{[^}]*"id":"\([^"]*\)".*/\1/')
57
+ admin /orgs/$ORG/agents/$AGENT/grants/orders -X PUT \
58
+ -d '{"capabilities":["read"],"limits":{"customers":["acme"]},"by":"Example Admin"}'
59
+ ```
60
+
61
+ **3. Use it from Claude Code:**
62
+
63
+ ```sh
64
+ claude mcp add --transport http orders http://localhost:3000/agent-connect/mcp \
65
+ --header "Authorization: Bearer $KEY"
66
+ ```
67
+
68
+ Ask Claude for acme's orders, then for order 1002 (a different customer's): the first works, the
69
+ second is refused, and both are in the audit log (`admin /orgs/$ORG/audit`). Any MCP client works
70
+ the same way, for example `curl`:
71
+
72
+ ```sh
73
+ curl -s http://localhost:3000/agent-connect/mcp -H "Authorization: Bearer $KEY" \
74
+ -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' \
75
+ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"orders_get","arguments":{"id":"1001"}}}'
76
+ ```
77
+
78
+ Stop with `docker compose -f docker-compose.yml -f docker-compose.example.yml down` (add `-v` to
79
+ delete the database too).
80
+
81
+ **Going further:** connect a real app from `GET /agent-connect/admin/v1/connectors` (each one
82
+ lists its setup steps, as click paths and as commands), add your own app
83
+ ([docs/http-connector.md](docs/http-connector.md)), or embed the service in your own Node app
84
+ with `createAgentConnect({...})` from the server package (`npm install
85
+ @arbium/enterprise-agent-connect`; the typed admin client is `@arbium/enterprise-agent-connect-client`).
86
+
87
+ Only `/agent-connect/mcp` and `/agent-connect/teams` may be public. The admin API refuses any
88
+ request that carries `X-Forwarded-For`, so never route it through a public load balancer.
89
+
90
+ ## Kubernetes
91
+
92
+ `deploy/helm/agent-connect` is a small chart: one replica (Teams run limits are counted in one
93
+ process), a Service, and an optional Ingress with only the public paths. It needs the image
94
+ (`image.repository`, `image.tag`; releases are `ghcr.io/try-caret/enterprise-agent-connect:<version>`) and a Secret with `DATABASE_URL`, `CONNECT_ENCRYPTION_KEY`
95
+ and `AGENT_CONNECT_ADMIN_TOKEN` (`existingSecret`).
96
+
97
+ ## Layout
98
+
99
+ - `packages/server`: the service (HTTP, admin API, MCP, Teams, store, migrations) and its tests
100
+ - `packages/connector-kit`: what a connector builds on (schemas, tool helpers, vendor types)
101
+ - `packages/client`: typed admin API client
102
+ - `connectors/<app>`: one folder per app: `connector.json`, `index.ts`, `tools.ts`, `vendor.ts`
103
+ - `connectors/http`: runs any app described only in its `connector.json` (docs/http-connector.md)
104
+ - `examples/internal-app`: a small internal API and its connector, for the quick start
105
+ - `deploy/docker`, `deploy/helm`: image, Compose file and chart
106
+
107
+ ## License
108
+
109
+ [Apache License 2.0](LICENSE).
110
+
111
+ ## Development
112
+
113
+ ```sh
114
+ npm ci
115
+ npm run check
116
+ scripts/test-databases.sh postgres://postgres@localhost:5432 # a scratch Postgres
117
+ TEST_DATABASE_URL=postgres://postgres@localhost:5432/ac_test DATABASE_SSL=disable npm test
118
+ ```
@@ -0,0 +1,39 @@
1
+ {
2
+ "id": "dell-techdirect",
3
+ "name": "Dell TechDirect",
4
+ "description": "Let agents look up warranty coverage for your Dell computers by service tag.",
5
+ "logo": "/brand/registry/dell.svg",
6
+ "identity": "An API key from your company's Dell TechDirect account, approved for the Warranty API.",
7
+ "accountKey": "keyId",
8
+ "connectionKind": "guided",
9
+ "setup": [
10
+ {
11
+ "title": "Request a Warranty API key",
12
+ "body": "Sign in to Dell TechDirect as your company's administrator, open APIs, and request access to the Warranty API. Dell reviews each request, which can take a few days.",
13
+ "link": { "label": "Dell TechDirect", "href": "https://techdirect.dell.com/" }
14
+ },
15
+ {
16
+ "title": "Copy the keys",
17
+ "body": "Once Dell approves the request, open APIs, then API Key Management, and copy the client ID and client secret of the production key."
18
+ }
19
+ ],
20
+ "afterConnect": [],
21
+ "fields": [
22
+ { "id": "client_id", "label": "Client ID", "secret": false },
23
+ { "id": "client_secret", "label": "Client secret", "secret": true }
24
+ ],
25
+ "capabilities": [
26
+ {
27
+ "id": "warranty",
28
+ "label": "Look up warranties",
29
+ "description": "Read the model, ship date and warranty coverage of Dell computers by service tag.",
30
+ "required": true,
31
+ "scopes": ["Warranty API"],
32
+ "permissions": [],
33
+ "tools": ["dell_warranty_lookup"]
34
+ }
35
+ ],
36
+ "limits": [],
37
+ "verify": { "label": "Dell answers", "check": "warranty" },
38
+ "revoke": "In Dell TechDirect, open APIs, then API Key Management, and delete the key."
39
+ }
@@ -0,0 +1,7 @@
1
+ import { dellTools } from "./tools.js";
2
+ import { dellVendor } from "./vendor.js";
3
+ export default {
4
+ id: "dell-techdirect",
5
+ create: () => ({ vendor: dellVendor(), toolset: dellTools }),
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../connectors/dell-techdirect/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAe;IACb,EAAE,EAAE,iBAAiB;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;CACnC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { z } from "zod";
2
+ import { ENTITLEMENTS_PATH } from "./vendor.js";
3
+ import { vendorError } from "../../packages/connector-kit/src/oauth.js";
4
+ import { audited, Denied, json, VendorFailed, } from "../../packages/connector-kit/src/common.js";
5
+ const SERVICE_TAG = /^[A-Za-z0-9]{5,7}$/;
6
+ export const dellTools = {
7
+ names: ["dell_warranty_lookup"],
8
+ register(server, ctx, allowed) {
9
+ if (allowed.has("dell_warranty_lookup"))
10
+ server.registerTool("dell_warranty_lookup", {
11
+ description: "Look up Dell warranty coverage for up to 100 service tags: the model, ship date and each support entitlement with its start and end dates.",
12
+ inputSchema: z.object({ service_tags: z.array(z.string()).min(1).max(100) }),
13
+ annotations: { readOnlyHint: true, openWorldHint: true },
14
+ }, ({ service_tags }) => audited(ctx, "dell_warranty_lookup", service_tags.join(","), async (mark) => {
15
+ const bad = service_tags.find((t) => !SERVICE_TAG.test(t));
16
+ if (bad)
17
+ throw new Denied(`${bad} is not a Dell service tag`);
18
+ const tags = [...new Set(service_tags.map((t) => t.toUpperCase()))];
19
+ const res = await ctx.call({
20
+ method: "GET",
21
+ path: `${ENTITLEMENTS_PATH}?servicetags=${tags.join(",")}`,
22
+ });
23
+ mark(res.status);
24
+ if (res.status < 200 || res.status >= 300) {
25
+ const detail = vendorError(res.data);
26
+ throw new VendorFailed(res.status, `Dell answered ${res.status}${detail ? `: ${detail}` : ""}`);
27
+ }
28
+ if (!Array.isArray(res.data))
29
+ throw new VendorFailed(res.status, "Dell answered without a list of assets");
30
+ const now = Date.now();
31
+ return json(res.data.map((a) => ({
32
+ serviceTag: a.serviceTag,
33
+ found: !a.invalid,
34
+ product: a.productLineDescription ?? null,
35
+ system: a.systemDescription ?? null,
36
+ shipDate: a.shipDate ?? null,
37
+ countryCode: a.countryCode ?? null,
38
+ entitlements: (a.entitlements ?? []).map((e) => ({
39
+ service: e.serviceLevelDescription ?? null,
40
+ type: e.entitlementType ?? null,
41
+ start: e.startDate ?? null,
42
+ end: e.endDate ?? null,
43
+ active: Date.parse(e.startDate ?? "") <= now && now <= Date.parse(e.endDate ?? ""),
44
+ })),
45
+ })));
46
+ }));
47
+ },
48
+ };
49
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../connectors/dell-techdirect/tools.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,57 @@
1
+ import { createHash } from "node:crypto";
2
+ import { clientCredentials, vendorError } from "../../packages/connector-kit/src/oauth.js";
3
+ import { ConnectError, } from "../../packages/connector-kit/src/types.js";
4
+ // Dell TechDirect Warranty API (v5): a client ID and secret Dell issues once it approves the
5
+ // company's API request, OAuth client credentials at apigtwb2c.us.dell.com/auth/oauth/v2/token
6
+ // (form-encoded, tokens last 3600 seconds), then asset-entitlements by service tag. Dell's
7
+ // reference sits behind a TechDirect sign-in; these addresses are the ones Dell's community
8
+ // threads and integrators document (see the connector's notes). Not yet tried with real keys.
9
+ export const DELL_API = "https://apigtwb2c.us.dell.com";
10
+ export const DELL_TOKEN_URL = `${DELL_API}/auth/oauth/v2/token`;
11
+ export const ENTITLEMENTS_PATH = "/PROD/sbil/eapi/v5/asset-entitlements";
12
+ // A tag no machine has: Dell answers it as invalid, which proves the Warranty API is granted
13
+ // without looking up anyone's asset.
14
+ export const PROBE_SERVICE_TAG = "0000000";
15
+ const MISSING_KEYS = "Enter the client ID and client secret from Dell TechDirect (APIs, then API Key Management). Dell issues them only after it approves your Warranty API request, so this app cannot connect until then.";
16
+ export function dellVendor(fetchImpl = fetch) {
17
+ const oauth = clientCredentials("Dell TechDirect", fetchImpl);
18
+ const creds = (c) => {
19
+ if (!c.secret.client_id || !c.secret.client_secret)
20
+ throw new ConnectError(MISSING_KEYS);
21
+ return {
22
+ tokenUrl: DELL_TOKEN_URL,
23
+ clientId: c.secret.client_id,
24
+ clientSecret: c.secret.client_secret,
25
+ };
26
+ };
27
+ const call = (c, request) => oauth.call(creds(c), DELL_API, request);
28
+ return {
29
+ async connect(fields) {
30
+ const clientId = fields.client_id?.trim() ?? "";
31
+ const clientSecret = fields.client_secret?.trim() ?? "";
32
+ const conn = {
33
+ config: {
34
+ keyId: createHash("sha256").update(clientId).digest("hex").slice(0, 12),
35
+ },
36
+ secret: { client_id: clientId, client_secret: clientSecret },
37
+ };
38
+ await oauth.signIn(creds(conn));
39
+ return { ...conn, accountLabel: `Client ID ending ${clientId.slice(-4)}` };
40
+ },
41
+ call,
42
+ checks: {
43
+ async warranty(connection) {
44
+ const res = await call(connection, {
45
+ method: "GET",
46
+ path: `${ENTITLEMENTS_PATH}?servicetags=${PROBE_SERVICE_TAG}`,
47
+ });
48
+ if (res.status === 401 || res.status === 403)
49
+ throw new ConnectError(`Dell TechDirect refused the Warranty API for these keys. Check in TechDirect that the key is approved for the Warranty API. (${vendorError(res.data) || res.status})`);
50
+ if (res.status < 200 || res.status >= 300 || !Array.isArray(res.data))
51
+ throw new ConnectError(`Dell TechDirect Warranty API answered ${res.status}: ${vendorError(res.data) || "an unexpected answer"}`);
52
+ return { values: ["Warranty lookup"] };
53
+ },
54
+ },
55
+ };
56
+ }
57
+ //# sourceMappingURL=vendor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendor.js","sourceRoot":"","sources":["../../../connectors/dell-techdirect/vendor.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,85 @@
1
+ {
2
+ "id": "entra",
3
+ "name": "Microsoft Entra ID",
4
+ "description": "Let agents look up people and groups in your organization: titles, departments, managers, direct reports, group memberships and licenses. Read-only.",
5
+ "logo": "/brand/registry/entra.svg",
6
+ "identity": "Your Microsoft app registration, through the Microsoft connection. It can read your organization's people and groups and change nothing. Each API key can be kept to chosen groups or administrative units.",
7
+ "provider": "microsoft",
8
+ "order": 5,
9
+ "accountKey": "tenantId",
10
+ "connectionKind": "guided",
11
+ "setup": [
12
+ {
13
+ "title": "Add these Microsoft Graph permissions to the app",
14
+ "body": "In the app, open API permissions, select Add a permission, then Microsoft Graph, then Application permissions, and add exactly these. They only read. Do not add User.ReadWrite.All, Group.ReadWrite.All, GroupMember.ReadWrite.All or Directory.ReadWrite.All: they let the app change people and groups.",
15
+ "copy": [
16
+ "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\""
17
+ ],
18
+ "click": [
19
+ "In the Microsoft Entra admin center, go to Entra ID, then App registrations, and open {brand.microsoft.appName}.",
20
+ "Select API permissions, then Add a permission, then Microsoft Graph, then Application permissions.",
21
+ "Tick {scopes} and select Add permissions."
22
+ ],
23
+ "shell": "bash"
24
+ },
25
+ {
26
+ "title": "Grant admin consent",
27
+ "body": "Still under API permissions, select \"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.",
28
+ "click": [
29
+ "Still under API permissions, select Grant admin consent for your organization, then Yes.",
30
+ "Each permission should show Granted under Status."
31
+ ],
32
+ "copy": [
33
+ "SP=$(az ad sp show --id {clientId} --query id -o tsv)",
34
+ "GRAPH=$(az ad sp show --id 00000003-0000-0000-c000-000000000000 --query id -o tsv)",
35
+ "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)\\\"}\""
36
+ ],
37
+ "shell": "bash"
38
+ }
39
+ ],
40
+ "afterConnect": [],
41
+ "fields": [],
42
+ "capabilities": [
43
+ {
44
+ "id": "read",
45
+ "label": "Look up people and groups",
46
+ "description": "Find people and read their name, job title, department, office, manager, direct reports, whether their account is on, their licenses and their groups. Find groups and list their members.",
47
+ "required": true,
48
+ "note": "Reaches everyone in your organization unless you keep a key to chosen groups or administrative units under API keys. Read-only.",
49
+ "scopes": ["User.Read.All", "GroupMember.Read.All", "LicenseAssignment.Read.All"],
50
+ "permissions": [],
51
+ "tools": [
52
+ "entra_get_person",
53
+ "entra_search_people",
54
+ "entra_person_groups",
55
+ "entra_group_members",
56
+ "entra_search_groups"
57
+ ],
58
+ "forbidden": "Microsoft refused this. The app needs {scopes} with admin consent (the Microsoft Entra ID page in {brand.productName} shows how)."
59
+ }
60
+ ],
61
+ "limits": [
62
+ {
63
+ "id": "groups",
64
+ "label": "Groups",
65
+ "help": "Optional: only people in these groups (their object IDs, from Groups in the Microsoft Entra admin center), and only these groups and the groups inside them. Leave empty for everyone, unless administrative units are set.",
66
+ "kind": "list",
67
+ "required": false,
68
+ "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}$"
69
+ },
70
+ {
71
+ "id": "units",
72
+ "label": "Administrative units",
73
+ "help": "Optional: only people and groups in these administrative units (their object IDs). With groups set too, a person or group in either one is allowed. At most 20 groups and units together.",
74
+ "kind": "list",
75
+ "required": false,
76
+ "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}$"
77
+ }
78
+ ],
79
+ "verify": {
80
+ "label": "Microsoft permissions the app has",
81
+ "check": "permissions",
82
+ "ifEmpty": "The app has no Microsoft Graph application permissions yet. Add the permissions above and grant admin consent."
83
+ },
84
+ "revoke": "Remove User.Read.All, GroupMember.Read.All and LicenseAssignment.Read.All from the app under API permissions (unless another app here needs them). To stop every Microsoft app at once, remove the app registration (see the Microsoft connection)."
85
+ }
@@ -0,0 +1,4 @@
1
+ import { microsoftApp } from "../microsoft/client.js";
2
+ import { entraTools } from "./tools.js";
3
+ export default microsoftApp("entra", entraTools);
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../connectors/entra/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,eAAe,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC"}