@paperclipai/shared 2026.910.0-beta.0 → 2026.910.0-canary.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.
- package/dist/app-definitions/github.json +11 -54
- package/dist/app-definitions/slack.json +2 -45
- package/dist/app-definitions.d.ts.map +1 -1
- package/dist/app-definitions.generated.d.ts.map +1 -1
- package/dist/app-definitions.generated.js +60 -63
- package/dist/app-definitions.generated.js.map +1 -1
- package/dist/app-definitions.js +1 -3
- package/dist/app-definitions.js.map +1 -1
- package/dist/app-definitions.test.js +78 -554
- package/dist/app-definitions.test.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/feature-catalog.d.ts.map +1 -1
- package/dist/feature-catalog.js +0 -7
- package/dist/feature-catalog.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/agent.d.ts +0 -5
- package/dist/types/agent.d.ts.map +1 -1
- package/dist/types/agent.js.map +1 -1
- package/dist/types/app-definition.d.ts +1 -3
- package/dist/types/app-definition.d.ts.map +1 -1
- package/dist/types/heartbeat.d.ts +0 -7
- package/dist/types/heartbeat.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/instance.d.ts +0 -2
- package/dist/types/instance.d.ts.map +1 -1
- package/dist/types/instance.js.map +1 -1
- package/dist/types/issue.d.ts +0 -4
- package/dist/types/issue.d.ts.map +1 -1
- package/dist/types/tool-access.d.ts +2 -3
- package/dist/types/tool-access.d.ts.map +1 -1
- package/dist/types/tool-access.js.map +1 -1
- package/dist/validators/agent.d.ts +0 -1
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +3 -11
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/app-definition.d.ts +0 -36
- package/dist/validators/app-definition.d.ts.map +1 -1
- package/dist/validators/app-definition.js +3 -6
- package/dist/validators/app-definition.js.map +1 -1
- package/dist/validators/index.d.ts +1 -2
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +1 -2
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/instance.d.ts +0 -3
- package/dist/validators/instance.d.ts.map +1 -1
- package/dist/validators/instance.js +0 -1
- package/dist/validators/instance.js.map +1 -1
- package/dist/validators/instance.test.js +0 -9
- package/dist/validators/instance.test.js.map +1 -1
- package/dist/validators/issue.d.ts +0 -2
- package/dist/validators/issue.d.ts.map +1 -1
- package/dist/validators/issue.js +180 -568
- package/dist/validators/issue.js.map +1 -1
- package/dist/validators/issue.test.js +22 -64
- package/dist/validators/issue.test.js.map +1 -1
- package/dist/validators/tool-access.d.ts +0 -18
- package/dist/validators/tool-access.d.ts.map +1 -1
- package/dist/validators/tool-access.js +1 -3
- package/dist/validators/tool-access.js.map +1 -1
- package/package.json +1 -1
- package/dist/app-definitions/discord.json +0 -65
- package/dist/app-definitions/microsoft-teams.json +0 -57
- package/dist/app-definitions/telegram.json +0 -53
|
@@ -3,249 +3,35 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { APP_DEFINITIONS } from "./app-definitions.generated.js";
|
|
6
|
-
import { APP_STORE_DEFINITIONS, APP_STORE_HIDDEN_SLUGS, CONNECTABLE_APP_DEFINITIONS, appSupportsCatalogSetup, getAvailableConnectionMethod, getRecommendedConnectionMethod, recommendedDefaultsForApp, resolveConnectionMethodServerUrl
|
|
7
|
-
import { GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS, GOOGLE_WORKSPACE_CONNECTOR_PROFILES
|
|
8
|
-
import { BLOCKED_MCP_PROVIDERS, SELF_SERVE_MCP_CANDIDATES, SELF_SERVE_MCP_RESEARCH
|
|
6
|
+
import { APP_STORE_DEFINITIONS, APP_STORE_HIDDEN_SLUGS, CONNECTABLE_APP_DEFINITIONS, appSupportsCatalogSetup, getAvailableConnectionMethod, getRecommendedConnectionMethod, recommendedDefaultsForApp, resolveConnectionMethodServerUrl } from "./app-definitions.js";
|
|
7
|
+
import { GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS, GOOGLE_WORKSPACE_CONNECTOR_PROFILES } from "./google-workspace-connectors.js";
|
|
8
|
+
import { BLOCKED_MCP_PROVIDERS, SELF_SERVE_MCP_CANDIDATES, SELF_SERVE_MCP_RESEARCH } from "./self-serve-mcp-research.js";
|
|
9
9
|
import { appDefinitionsSchema } from "./validators/app-definition.js";
|
|
10
10
|
const googleScope = (scope) => `https://www.googleapis.com/auth/${scope}`;
|
|
11
11
|
const GOOGLE_WORKSPACE_PROFILE_EXPECTATIONS = [
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
writeTools: ["create_draft"],
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
profile: "drive.read",
|
|
32
|
-
appSlug: "google-drive",
|
|
33
|
-
serverUrl: "https://drivemcp.googleapis.com/mcp/v1",
|
|
34
|
-
capability: "read",
|
|
35
|
-
riskTier: "S3",
|
|
36
|
-
scopes: [googleScope("drive.readonly")],
|
|
37
|
-
writeTools: [],
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
profile: "drive.write",
|
|
41
|
-
appSlug: "google-drive",
|
|
42
|
-
serverUrl: "https://drivemcp.googleapis.com/mcp/v1",
|
|
43
|
-
capability: "write",
|
|
44
|
-
riskTier: "S4",
|
|
45
|
-
scopes: [googleScope("drive.readonly"), googleScope("drive.file")],
|
|
46
|
-
writeTools: ["copy_file", "create_file"],
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
profile: "docs.read",
|
|
50
|
-
appSlug: "google-docs",
|
|
51
|
-
serverUrl: "https://docsmcp.googleapis.com/mcp/v1",
|
|
52
|
-
capability: "read",
|
|
53
|
-
riskTier: "S3",
|
|
54
|
-
scopes: [googleScope("drive.readonly"), googleScope("documents.readonly")],
|
|
55
|
-
writeTools: [],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
profile: "docs.write",
|
|
59
|
-
appSlug: "google-docs",
|
|
60
|
-
serverUrl: "https://docsmcp.googleapis.com/mcp/v1",
|
|
61
|
-
capability: "write",
|
|
62
|
-
riskTier: "S4",
|
|
63
|
-
scopes: [
|
|
64
|
-
googleScope("drive.readonly"),
|
|
65
|
-
googleScope("drive.file"),
|
|
66
|
-
googleScope("documents"),
|
|
67
|
-
],
|
|
68
|
-
writeTools: ["update_doc"],
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
profile: "sheets.read",
|
|
72
|
-
appSlug: "google-sheets",
|
|
73
|
-
serverUrl: "https://sheetsmcp.googleapis.com/mcp/v1",
|
|
74
|
-
capability: "read",
|
|
75
|
-
riskTier: "S3",
|
|
76
|
-
scopes: [
|
|
77
|
-
googleScope("drive.readonly"),
|
|
78
|
-
googleScope("spreadsheets.readonly"),
|
|
79
|
-
],
|
|
80
|
-
writeTools: [],
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
profile: "sheets.write",
|
|
84
|
-
appSlug: "google-sheets",
|
|
85
|
-
serverUrl: "https://sheetsmcp.googleapis.com/mcp/v1",
|
|
86
|
-
capability: "write",
|
|
87
|
-
riskTier: "S4",
|
|
88
|
-
scopes: [
|
|
89
|
-
googleScope("drive.readonly"),
|
|
90
|
-
googleScope("drive.file"),
|
|
91
|
-
googleScope("spreadsheets"),
|
|
92
|
-
],
|
|
93
|
-
writeTools: [
|
|
94
|
-
"update_spreadsheet",
|
|
95
|
-
"update_values",
|
|
96
|
-
"update_formulas",
|
|
97
|
-
"insert_dimension",
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
profile: "slides.read",
|
|
102
|
-
appSlug: "google-slides",
|
|
103
|
-
serverUrl: "https://slidesmcp.googleapis.com/mcp/v1",
|
|
104
|
-
capability: "read",
|
|
105
|
-
riskTier: "S3",
|
|
106
|
-
scopes: [
|
|
107
|
-
googleScope("drive.readonly"),
|
|
108
|
-
googleScope("presentations.readonly"),
|
|
109
|
-
],
|
|
110
|
-
writeTools: [],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
profile: "slides.write",
|
|
114
|
-
appSlug: "google-slides",
|
|
115
|
-
serverUrl: "https://slidesmcp.googleapis.com/mcp/v1",
|
|
116
|
-
capability: "write",
|
|
117
|
-
riskTier: "S4",
|
|
118
|
-
scopes: [
|
|
119
|
-
googleScope("drive.readonly"),
|
|
120
|
-
googleScope("drive.file"),
|
|
121
|
-
googleScope("presentations"),
|
|
122
|
-
],
|
|
123
|
-
writeTools: ["update_presentation"],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
profile: "calendar.read",
|
|
127
|
-
appSlug: "google-calendar",
|
|
128
|
-
serverUrl: "https://calendarmcp.googleapis.com/mcp/v1",
|
|
129
|
-
capability: "read",
|
|
130
|
-
riskTier: "S3",
|
|
131
|
-
scopes: [
|
|
132
|
-
googleScope("calendar.calendarlist.readonly"),
|
|
133
|
-
googleScope("calendar.events.freebusy"),
|
|
134
|
-
googleScope("calendar.events.readonly"),
|
|
135
|
-
],
|
|
136
|
-
writeTools: [],
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
profile: "calendar.write",
|
|
140
|
-
appSlug: "google-calendar",
|
|
141
|
-
serverUrl: "https://calendarmcp.googleapis.com/mcp/v1",
|
|
142
|
-
capability: "write",
|
|
143
|
-
riskTier: "S4",
|
|
144
|
-
scopes: [
|
|
145
|
-
googleScope("calendar.calendarlist.readonly"),
|
|
146
|
-
googleScope("calendar.events.freebusy"),
|
|
147
|
-
googleScope("calendar.events"),
|
|
148
|
-
],
|
|
149
|
-
writeTools: [
|
|
150
|
-
"create_event",
|
|
151
|
-
"update_event",
|
|
152
|
-
"delete_event",
|
|
153
|
-
"respond_to_event",
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
profile: "chat.read",
|
|
158
|
-
appSlug: "google-chat",
|
|
159
|
-
serverUrl: "https://chatmcp.googleapis.com/mcp/v1",
|
|
160
|
-
capability: "read",
|
|
161
|
-
riskTier: "S3",
|
|
162
|
-
scopes: [
|
|
163
|
-
googleScope("chat.spaces.readonly"),
|
|
164
|
-
googleScope("chat.memberships.readonly"),
|
|
165
|
-
googleScope("chat.messages.readonly"),
|
|
166
|
-
googleScope("chat.users.readstate.readonly"),
|
|
167
|
-
],
|
|
168
|
-
writeTools: [],
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
profile: "chat.write",
|
|
172
|
-
appSlug: "google-chat",
|
|
173
|
-
serverUrl: "https://chatmcp.googleapis.com/mcp/v1",
|
|
174
|
-
capability: "write",
|
|
175
|
-
riskTier: "S4",
|
|
176
|
-
scopes: [
|
|
177
|
-
googleScope("chat.spaces.readonly"),
|
|
178
|
-
googleScope("chat.memberships.readonly"),
|
|
179
|
-
googleScope("chat.messages.readonly"),
|
|
180
|
-
googleScope("chat.users.readstate.readonly"),
|
|
181
|
-
googleScope("chat.messages.create"),
|
|
182
|
-
],
|
|
183
|
-
writeTools: ["send_message"],
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
profile: "people.read",
|
|
187
|
-
appSlug: "google-people",
|
|
188
|
-
serverUrl: "https://people.googleapis.com/mcp/v1",
|
|
189
|
-
capability: "read",
|
|
190
|
-
riskTier: "S3",
|
|
191
|
-
scopes: [
|
|
192
|
-
googleScope("directory.readonly"),
|
|
193
|
-
googleScope("userinfo.profile"),
|
|
194
|
-
googleScope("contacts.readonly"),
|
|
195
|
-
],
|
|
196
|
-
writeTools: [],
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
profile: "workspace-search.read",
|
|
200
|
-
appSlug: "google-workspace-search",
|
|
201
|
-
serverUrl: "https://workspacemcp.googleapis.com/mcp/v1",
|
|
202
|
-
capability: "read",
|
|
203
|
-
riskTier: "S3",
|
|
204
|
-
scopes: [
|
|
205
|
-
googleScope("gmail.readonly"),
|
|
206
|
-
googleScope("drive.readonly"),
|
|
207
|
-
googleScope("calendar.readonly"),
|
|
208
|
-
googleScope("chat.messages.readonly"),
|
|
209
|
-
],
|
|
210
|
-
writeTools: [],
|
|
211
|
-
},
|
|
12
|
+
{ profile: "gmail.read", appSlug: "gmail", serverUrl: "https://gmailmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("gmail.readonly")], writeTools: [] },
|
|
13
|
+
{ profile: "gmail.draft", appSlug: "gmail", serverUrl: "https://gmailmcp.googleapis.com/mcp/v1", capability: "draft", riskTier: "S4", scopes: [googleScope("gmail.readonly"), googleScope("gmail.compose")], writeTools: ["create_draft"] },
|
|
14
|
+
{ profile: "drive.read", appSlug: "google-drive", serverUrl: "https://drivemcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("drive.readonly")], writeTools: [] },
|
|
15
|
+
{ profile: "drive.write", appSlug: "google-drive", serverUrl: "https://drivemcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("drive.readonly"), googleScope("drive.file")], writeTools: ["copy_file", "create_file"] },
|
|
16
|
+
{ profile: "docs.read", appSlug: "google-docs", serverUrl: "https://docsmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("drive.readonly"), googleScope("documents.readonly")], writeTools: [] },
|
|
17
|
+
{ profile: "docs.write", appSlug: "google-docs", serverUrl: "https://docsmcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("drive.readonly"), googleScope("drive.file"), googleScope("documents")], writeTools: ["update_doc"] },
|
|
18
|
+
{ profile: "sheets.read", appSlug: "google-sheets", serverUrl: "https://sheetsmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("drive.readonly"), googleScope("spreadsheets.readonly")], writeTools: [] },
|
|
19
|
+
{ profile: "sheets.write", appSlug: "google-sheets", serverUrl: "https://sheetsmcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("drive.readonly"), googleScope("drive.file"), googleScope("spreadsheets")], writeTools: ["update_spreadsheet", "update_values", "update_formulas", "insert_dimension"] },
|
|
20
|
+
{ profile: "slides.read", appSlug: "google-slides", serverUrl: "https://slidesmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("drive.readonly"), googleScope("presentations.readonly")], writeTools: [] },
|
|
21
|
+
{ profile: "slides.write", appSlug: "google-slides", serverUrl: "https://slidesmcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("drive.readonly"), googleScope("drive.file"), googleScope("presentations")], writeTools: ["update_presentation"] },
|
|
22
|
+
{ profile: "calendar.read", appSlug: "google-calendar", serverUrl: "https://calendarmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("calendar.calendarlist.readonly"), googleScope("calendar.events.freebusy"), googleScope("calendar.events.readonly")], writeTools: [] },
|
|
23
|
+
{ profile: "calendar.write", appSlug: "google-calendar", serverUrl: "https://calendarmcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("calendar.calendarlist.readonly"), googleScope("calendar.events.freebusy"), googleScope("calendar.events")], writeTools: ["create_event", "update_event", "delete_event", "respond_to_event"] },
|
|
24
|
+
{ profile: "chat.read", appSlug: "google-chat", serverUrl: "https://chatmcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("chat.spaces.readonly"), googleScope("chat.memberships.readonly"), googleScope("chat.messages.readonly"), googleScope("chat.users.readstate.readonly")], writeTools: [] },
|
|
25
|
+
{ profile: "chat.write", appSlug: "google-chat", serverUrl: "https://chatmcp.googleapis.com/mcp/v1", capability: "write", riskTier: "S4", scopes: [googleScope("chat.spaces.readonly"), googleScope("chat.memberships.readonly"), googleScope("chat.messages.readonly"), googleScope("chat.users.readstate.readonly"), googleScope("chat.messages.create")], writeTools: ["send_message"] },
|
|
26
|
+
{ profile: "people.read", appSlug: "google-people", serverUrl: "https://people.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("directory.readonly"), googleScope("userinfo.profile"), googleScope("contacts.readonly")], writeTools: [] },
|
|
27
|
+
{ profile: "workspace-search.read", appSlug: "google-workspace-search", serverUrl: "https://workspacemcp.googleapis.com/mcp/v1", capability: "read", riskTier: "S3", scopes: [googleScope("gmail.readonly"), googleScope("drive.readonly"), googleScope("calendar.readonly"), googleScope("chat.messages.readonly")], writeTools: [] },
|
|
212
28
|
];
|
|
213
29
|
describe("AppDefinition catalog", () => {
|
|
214
30
|
it("validates all Wave 1 definitions", () => expect(() => appDefinitionsSchema.parse(APP_DEFINITIONS)).not.toThrow());
|
|
215
31
|
it("contains every established provider plus the reviewed self-serve catalog", () => {
|
|
216
|
-
expect(APP_DEFINITIONS.map((app) => app.slug)).toEqual(expect.arrayContaining([
|
|
217
|
-
"zapier",
|
|
218
|
-
"github",
|
|
219
|
-
"discord",
|
|
220
|
-
"slack",
|
|
221
|
-
"microsoft-teams",
|
|
222
|
-
"telegram",
|
|
223
|
-
"notion",
|
|
224
|
-
"posthog",
|
|
225
|
-
"linear",
|
|
226
|
-
"google-sheets",
|
|
227
|
-
"context7",
|
|
228
|
-
"composio",
|
|
229
|
-
"oauth-generic",
|
|
230
|
-
"api-key-generic",
|
|
231
|
-
"sentry",
|
|
232
|
-
"vercel",
|
|
233
|
-
"anthropic",
|
|
234
|
-
"gmail",
|
|
235
|
-
"google-drive",
|
|
236
|
-
"google-docs",
|
|
237
|
-
"google-slides",
|
|
238
|
-
"google-calendar",
|
|
239
|
-
"google-chat",
|
|
240
|
-
"google-people",
|
|
241
|
-
"google-workspace-search",
|
|
242
|
-
]));
|
|
32
|
+
expect(APP_DEFINITIONS.map((app) => app.slug)).toEqual(expect.arrayContaining(["zapier", "github", "slack", "notion", "posthog", "linear", "google-sheets", "context7", "composio", "oauth-generic", "api-key-generic", "sentry", "vercel", "anthropic", "gmail", "google-drive", "google-docs", "google-slides", "google-calendar", "google-chat", "google-people", "google-workspace-search"]));
|
|
243
33
|
expect(SELF_SERVE_MCP_CANDIDATES).toHaveLength(43);
|
|
244
|
-
expect(BLOCKED_MCP_PROVIDERS.map((entry) => entry.slug)).toEqual([
|
|
245
|
-
"g2",
|
|
246
|
-
"vercel",
|
|
247
|
-
"zomato",
|
|
248
|
-
]);
|
|
34
|
+
expect(BLOCKED_MCP_PROVIDERS.map((entry) => entry.slug)).toEqual(["g2", "vercel", "zomato"]);
|
|
249
35
|
const definitionSlugs = new Set(APP_DEFINITIONS.map((app) => app.slug));
|
|
250
36
|
const connectableSlugs = new Set(CONNECTABLE_APP_DEFINITIONS.map((app) => app.slug));
|
|
251
37
|
expect(SELF_SERVE_MCP_CANDIDATES.filter((entry) => !definitionSlugs.has(entry.slug))).toEqual([]);
|
|
@@ -253,93 +39,6 @@ describe("AppDefinition catalog", () => {
|
|
|
253
39
|
for (const entry of BLOCKED_MCP_PROVIDERS)
|
|
254
40
|
expect(connectableSlugs.has(entry.slug)).toBe(false);
|
|
255
41
|
});
|
|
256
|
-
it("registers the five native chat providers with only required setup credentials", () => {
|
|
257
|
-
const expected = {
|
|
258
|
-
slack: {
|
|
259
|
-
credentials: ["botToken", "signingSecret"],
|
|
260
|
-
publicFields: [],
|
|
261
|
-
resources: ["workspace", "channel"],
|
|
262
|
-
tool: true,
|
|
263
|
-
},
|
|
264
|
-
github: {
|
|
265
|
-
credentials: ["appId", "privateKey"],
|
|
266
|
-
publicFields: ["appId"],
|
|
267
|
-
resources: ["organization", "repository"],
|
|
268
|
-
tool: true,
|
|
269
|
-
},
|
|
270
|
-
discord: {
|
|
271
|
-
credentials: ["botToken", "applicationId", "guildId"],
|
|
272
|
-
publicFields: ["applicationId", "guildId"],
|
|
273
|
-
resources: ["channel"],
|
|
274
|
-
tool: false,
|
|
275
|
-
},
|
|
276
|
-
"microsoft-teams": {
|
|
277
|
-
credentials: ["clientId", "tenantId", "clientSecret"],
|
|
278
|
-
publicFields: ["clientId", "tenantId"],
|
|
279
|
-
resources: ["team", "channel", "chat"],
|
|
280
|
-
tool: false,
|
|
281
|
-
},
|
|
282
|
-
telegram: {
|
|
283
|
-
credentials: ["botToken"],
|
|
284
|
-
publicFields: [],
|
|
285
|
-
resources: ["chat", "group", "topic"],
|
|
286
|
-
tool: false,
|
|
287
|
-
},
|
|
288
|
-
};
|
|
289
|
-
for (const [slug, contract] of Object.entries(expected)) {
|
|
290
|
-
const app = CONNECTABLE_APP_DEFINITIONS.find((candidate) => candidate.slug === slug);
|
|
291
|
-
const channel = app?.methods.find((candidate) => candidate.purpose === "channel");
|
|
292
|
-
expect(app, slug).toBeTruthy();
|
|
293
|
-
expect(channel, slug).toMatchObject({
|
|
294
|
-
key: "chat-agent",
|
|
295
|
-
label: "Chat with an agent",
|
|
296
|
-
purpose: "channel",
|
|
297
|
-
provider: slug,
|
|
298
|
-
transport: "chat_sdk",
|
|
299
|
-
auth: "api_key",
|
|
300
|
-
ownershipModes: ["customer"],
|
|
301
|
-
requiredResourceFilters: contract.resources,
|
|
302
|
-
});
|
|
303
|
-
expect(channel?.credentialFields?.map((field) => field.key), slug).toEqual(contract.credentials);
|
|
304
|
-
expect(channel?.credentialFields?.every((field) => field.required), slug).toBe(true);
|
|
305
|
-
for (const field of channel?.credentialFields ?? []) {
|
|
306
|
-
if (contract.publicFields.includes(field.key))
|
|
307
|
-
expect(field, `${slug}/${field.key}`).toMatchObject({
|
|
308
|
-
type: "text",
|
|
309
|
-
secret: false,
|
|
310
|
-
});
|
|
311
|
-
else
|
|
312
|
-
expect(field.secret, `${slug}/${field.key}`).toBe(true);
|
|
313
|
-
}
|
|
314
|
-
expect(channel?.keyPlacement, slug).toBeUndefined();
|
|
315
|
-
const toolMethods = app?.methods.filter((candidate) => (candidate.purpose ?? "tool") === "tool") ?? [];
|
|
316
|
-
expect(toolMethods.length > 0, `${slug}: tool surface`).toBe(contract.tool);
|
|
317
|
-
if (contract.tool)
|
|
318
|
-
expect(toolMethods.some((candidate) => candidate.label === "Use this connection as an agent tool"), slug).toBe(true);
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
it("documents the minimum provider-owned chat app setup without broader permissions", () => {
|
|
322
|
-
const channel = (slug) => APP_DEFINITIONS.find((app) => app.slug === slug)?.methods.find((method) => method.purpose === "channel");
|
|
323
|
-
expect(channel("github")?.guidanceMd).toContain("issue_comment");
|
|
324
|
-
expect(channel("discord")?.guidanceMd).toContain("Message Content intent");
|
|
325
|
-
expect(channel("discord")?.guidanceMd).toContain("Discord thread");
|
|
326
|
-
expect(channel("github")?.guidanceMd).toContain("pull_request");
|
|
327
|
-
expect(channel("github")?.guidanceMd).toContain("pull_request_review_comment");
|
|
328
|
-
expect(channel("github")?.guidanceMd).toContain("installation_repositories");
|
|
329
|
-
expect(channel("github")?.guidanceMd).toContain("Generate the webhook secret in Paperclip");
|
|
330
|
-
expect(channel("github")?.guidanceMd).toContain("SSL-verified");
|
|
331
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("resource-specific");
|
|
332
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("ChannelMessage.Read.Group");
|
|
333
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("ChatMessage.Read.Chat");
|
|
334
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("work or school organization");
|
|
335
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("teams.live.com");
|
|
336
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("groupChat");
|
|
337
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("receive every message");
|
|
338
|
-
expect(channel("microsoft-teams")?.guidanceMd).toContain("One team install covers its standard channels");
|
|
339
|
-
expect(channel("telegram")?.guidanceMd).toContain("public Paperclip webhook endpoint");
|
|
340
|
-
expect(channel("slack")?.guidanceMd).toContain("reactions");
|
|
341
|
-
expect(channel("slack")?.guidanceMd).toContain("direct messages");
|
|
342
|
-
});
|
|
343
42
|
it("keeps a complete, unique, dated evidence ledger for all 46 researched MCP providers", () => {
|
|
344
43
|
expect(SELF_SERVE_MCP_RESEARCH.verifiedAt).toBe("2026-08-26");
|
|
345
44
|
expect(SELF_SERVE_MCP_RESEARCH.entries).toHaveLength(46);
|
|
@@ -383,84 +82,39 @@ describe("AppDefinition catalog", () => {
|
|
|
383
82
|
expect(method("kernel")?.defaults?.serverUrl).toBe("https://mcp.onkernel.com/mcp");
|
|
384
83
|
expect(method("resend")?.defaults?.serverUrl).toBe("https://mcp.resend.com/mcp");
|
|
385
84
|
expect(method("clickhouse")?.defaults?.serverUrl).toBe("https://mcp.clickhouse.cloud/clickstack");
|
|
386
|
-
expect(method("clickhouse")?.tenantFields?.[0]?.transport).toEqual({
|
|
387
|
-
|
|
388
|
-
name: "x-service-id",
|
|
389
|
-
});
|
|
390
|
-
expect(method("mem0")).toMatchObject({
|
|
391
|
-
auth: "api_key",
|
|
392
|
-
keyPlacement: {
|
|
393
|
-
location: "header",
|
|
394
|
-
name: "Authorization",
|
|
395
|
-
prefix: "Bearer ",
|
|
396
|
-
},
|
|
397
|
-
});
|
|
85
|
+
expect(method("clickhouse")?.tenantFields?.[0]?.transport).toEqual({ location: "header", name: "x-service-id" });
|
|
86
|
+
expect(method("mem0")).toMatchObject({ auth: "api_key", keyPlacement: { location: "header", name: "Authorization", prefix: "Bearer " } });
|
|
398
87
|
expect(method("mem0")?.defaults?.serverUrl).toBe("https://mcp.mem0.ai/mcp/");
|
|
399
88
|
expect(method("xero")?.defaults?.scopesHint).toEqual([
|
|
400
|
-
"openid",
|
|
401
|
-
"profile",
|
|
402
|
-
"email",
|
|
403
|
-
"offline_access",
|
|
404
|
-
"accounting.settings",
|
|
405
|
-
"accounting.invoices.read",
|
|
406
|
-
"accounting.reports.aged.read",
|
|
407
|
-
"accounting.reports.balancesheet.read",
|
|
408
|
-
"accounting.reports.profitandloss.read",
|
|
89
|
+
"openid", "profile", "email", "offline_access", "accounting.settings", "accounting.invoices.read", "accounting.reports.aged.read", "accounting.reports.balancesheet.read", "accounting.reports.profitandloss.read",
|
|
409
90
|
]);
|
|
410
|
-
expect(APP_DEFINITIONS.find((app) => app.slug === "pagerduty")?.methods.map((candidate) => ({
|
|
411
|
-
key: candidate.key,
|
|
412
|
-
serverUrl: candidate.defaults?.serverUrl,
|
|
413
|
-
}))).toEqual([
|
|
91
|
+
expect(APP_DEFINITIONS.find((app) => app.slug === "pagerduty")?.methods.map((candidate) => ({ key: candidate.key, serverUrl: candidate.defaults?.serverUrl }))).toEqual([
|
|
414
92
|
{ key: "mcp-api-key-us", serverUrl: "https://mcp.pagerduty.com/mcp" },
|
|
415
93
|
{ key: "mcp-api-key-eu", serverUrl: "https://mcp.eu.pagerduty.com/mcp" },
|
|
416
94
|
]);
|
|
417
|
-
expect(method("context7")).toMatchObject({
|
|
418
|
-
auth: "none",
|
|
419
|
-
defaults: { serverUrl: "https://mcp.context7.com/mcp" },
|
|
420
|
-
});
|
|
95
|
+
expect(method("context7")).toMatchObject({ auth: "none", defaults: { serverUrl: "https://mcp.context7.com/mcp" } });
|
|
421
96
|
expect(APP_DEFINITIONS.find((app) => app.slug === "planetscale")?.methods.map((candidate) => candidate.key)).toEqual(["mcp-oauth", "mcp-insights-only"]);
|
|
422
97
|
const postman = APP_DEFINITIONS.find((app) => app.slug === "postman");
|
|
423
98
|
expect(postman?.methods.map((candidate) => candidate.key)).toEqual([
|
|
424
|
-
"mcp-oauth-minimal",
|
|
425
|
-
"mcp-oauth-code",
|
|
426
|
-
"mcp-oauth-full",
|
|
427
|
-
"mcp-eu-key-minimal",
|
|
428
|
-
"mcp-eu-key-code",
|
|
429
|
-
"mcp-eu-key-full",
|
|
99
|
+
"mcp-oauth-minimal", "mcp-oauth-code", "mcp-oauth-full", "mcp-eu-key-minimal", "mcp-eu-key-code", "mcp-eu-key-full",
|
|
430
100
|
]);
|
|
431
101
|
expect(getAvailableConnectionMethod(postman)?.key).toBe("mcp-oauth-full");
|
|
432
|
-
expect(postman?.methods
|
|
433
|
-
.filter((candidate) => candidate.auth === "api_key")
|
|
434
|
-
.every((candidate) => candidate.keyPlacement?.name === "Authorization" &&
|
|
435
|
-
candidate.keyPlacement.prefix === "Bearer ")).toBe(true);
|
|
102
|
+
expect(postman?.methods.filter((candidate) => candidate.auth === "api_key").every((candidate) => candidate.keyPlacement?.name === "Authorization" && candidate.keyPlacement.prefix === "Bearer ")).toBe(true);
|
|
436
103
|
expect(method("supabase")?.tenantFields?.find((field) => field.key === "readOnly")?.defaultValue).toBe(false);
|
|
437
104
|
expect(method("asana")?.ownershipModes).toEqual(["customer"]);
|
|
438
|
-
expect(method("zapier")).toMatchObject({
|
|
439
|
-
key: "generated-url",
|
|
440
|
-
auth: "none",
|
|
441
|
-
defaults: {},
|
|
442
|
-
});
|
|
105
|
+
expect(method("zapier")).toMatchObject({ key: "generated-url", auth: "none", defaults: {} });
|
|
443
106
|
expect(method("zapier")?.credentialFields).toBeUndefined();
|
|
444
107
|
});
|
|
445
108
|
it("uses discovery-first Notion MCP OAuth metadata", () => {
|
|
446
109
|
const notion = APP_DEFINITIONS.find((app) => app.slug === "notion");
|
|
447
110
|
expect(notion?.redirectConstraints).toBe("https-or-loopback-http");
|
|
448
|
-
expect(notion?.methods[0]?.defaults).toEqual({
|
|
449
|
-
serverUrl: "https://mcp.notion.com/mcp",
|
|
450
|
-
});
|
|
451
|
-
});
|
|
452
|
-
it("preserves required Linear OAuth scopes", () => expect(APP_DEFINITIONS.find((app) => app.slug === "linear")?.methods[0]?.defaults
|
|
453
|
-
?.scopesHint).toEqual(["read", "write"]));
|
|
454
|
-
it("requests only Hugging Face's MCP read scope", () => expect(APP_DEFINITIONS.find((app) => app.slug === "hugging-face")?.methods[0]
|
|
455
|
-
?.defaults?.scopesHint).toEqual(["read-mcp"]));
|
|
456
|
-
it("defaults every new connection action to allowed", () => {
|
|
457
|
-
for (const app of APP_DEFINITIONS)
|
|
458
|
-
for (const method of app.methods)
|
|
459
|
-
expect(recommendedDefaultsForApp(app, method.key)).toEqual({
|
|
460
|
-
access: "all_agents",
|
|
461
|
-
askFirstRiskLevels: [],
|
|
462
|
-
});
|
|
111
|
+
expect(notion?.methods[0]?.defaults).toEqual({ serverUrl: "https://mcp.notion.com/mcp" });
|
|
463
112
|
});
|
|
113
|
+
it("preserves required Linear OAuth scopes", () => expect(APP_DEFINITIONS.find((app) => app.slug === "linear")?.methods[0]?.defaults?.scopesHint).toEqual(["read", "write"]));
|
|
114
|
+
it("requests only Hugging Face's MCP read scope", () => expect(APP_DEFINITIONS.find((app) => app.slug === "hugging-face")?.methods[0]?.defaults?.scopesHint).toEqual(["read-mcp"]));
|
|
115
|
+
it("defaults every new connection action to allowed", () => { for (const app of APP_DEFINITIONS)
|
|
116
|
+
for (const method of app.methods)
|
|
117
|
+
expect(recommendedDefaultsForApp(app, method.key)).toEqual({ access: "all_agents", askFirstRiskLevels: [] }); });
|
|
464
118
|
it("defaults explicit read/write capability groups to their write-capable method", () => {
|
|
465
119
|
const drive = APP_DEFINITIONS.find((app) => app.slug === "google-drive");
|
|
466
120
|
const gmail = APP_DEFINITIONS.find((app) => app.slug === "gmail");
|
|
@@ -468,26 +122,13 @@ describe("AppDefinition catalog", () => {
|
|
|
468
122
|
expect(getAvailableConnectionMethod(gmail)?.key).toBe("customer-draft-oauth");
|
|
469
123
|
expect(getRecommendedConnectionMethod(drive.methods.filter((candidate) => candidate.ownershipModes.includes("customer")))?.key).toBe("customer-write-oauth");
|
|
470
124
|
expect(getRecommendedConnectionMethod(gmail.methods.filter((candidate) => [
|
|
471
|
-
"paperclip-read",
|
|
472
|
-
"customer-read-oauth",
|
|
473
|
-
"customer-draft-oauth",
|
|
125
|
+
"paperclip-read", "customer-read-oauth", "customer-draft-oauth",
|
|
474
126
|
].includes(candidate.key)))?.key).toBe("paperclip-read");
|
|
475
127
|
expect(getRecommendedConnectionMethod(gmail.methods.filter((candidate) => candidate.capabilityProfile?.key === "draft"))?.key).toBe("paperclip-draft");
|
|
476
|
-
expect(getRecommendedConnectionMethod(gmail.methods.filter((candidate) => candidate.capabilityProfile?.key === "draft" &&
|
|
477
|
-
candidate.ownershipModes.includes("customer")))?.key).toBe("customer-draft-oauth");
|
|
128
|
+
expect(getRecommendedConnectionMethod(gmail.methods.filter((candidate) => candidate.capabilityProfile?.key === "draft" && candidate.ownershipModes.includes("customer")))?.key).toBe("customer-draft-oauth");
|
|
478
129
|
});
|
|
479
130
|
it("explains Google Workspace Developer Preview enrollment before connection", () => {
|
|
480
|
-
const googleWorkspaceMcpSlugs = [
|
|
481
|
-
"gmail",
|
|
482
|
-
"google-drive",
|
|
483
|
-
"google-docs",
|
|
484
|
-
"google-sheets",
|
|
485
|
-
"google-slides",
|
|
486
|
-
"google-calendar",
|
|
487
|
-
"google-chat",
|
|
488
|
-
"google-people",
|
|
489
|
-
"google-workspace-search",
|
|
490
|
-
];
|
|
131
|
+
const googleWorkspaceMcpSlugs = ["gmail", "google-drive", "google-docs", "google-sheets", "google-slides", "google-calendar", "google-chat", "google-people", "google-workspace-search"];
|
|
491
132
|
for (const slug of googleWorkspaceMcpSlugs) {
|
|
492
133
|
const prerequisite = APP_DEFINITIONS.find((app) => app.slug === slug)?.setupPrerequisite;
|
|
493
134
|
expect(prerequisite?.actionUrl, slug).toBe("https://developers.google.com/workspace/preview");
|
|
@@ -497,29 +138,9 @@ describe("AppDefinition catalog", () => {
|
|
|
497
138
|
});
|
|
498
139
|
it("withholds unverified and reserved providers from the app store without deleting their definitions", () => {
|
|
499
140
|
expect([...APP_STORE_HIDDEN_SLUGS].sort()).toEqual([
|
|
500
|
-
"beehiiv",
|
|
501
|
-
"bitly",
|
|
502
|
-
"brex",
|
|
503
|
-
"candid",
|
|
504
|
-
"coda",
|
|
505
|
-
"composio",
|
|
506
|
-
"context7",
|
|
507
|
-
"egnyte",
|
|
508
|
-
"embat",
|
|
509
|
-
"kernel",
|
|
510
|
-
"local-falcon",
|
|
511
|
-
"make",
|
|
512
|
-
"manufact",
|
|
513
|
-
"oreilly",
|
|
514
|
-
"planetscale",
|
|
515
|
-
"razorpay",
|
|
516
|
-
"sanity",
|
|
517
|
-
"similarweb",
|
|
518
|
-
"ticket-tailor",
|
|
519
|
-
"ticktick",
|
|
520
|
-
"xero",
|
|
141
|
+
"beehiiv", "bitly", "brex", "candid", "coda", "composio", "context7", "egnyte", "embat", "kernel", "local-falcon", "make", "manufact", "oreilly", "planetscale", "razorpay", "sanity", "similarweb", "slack", "ticket-tailor", "ticktick", "xero",
|
|
521
142
|
]);
|
|
522
|
-
expect(APP_STORE_DEFINITIONS).toHaveLength(
|
|
143
|
+
expect(APP_STORE_DEFINITIONS).toHaveLength(36);
|
|
523
144
|
const connectableSlugs = new Set(CONNECTABLE_APP_DEFINITIONS.map((entry) => entry.slug));
|
|
524
145
|
const storeSlugs = new Set(APP_STORE_DEFINITIONS.map((entry) => entry.slug));
|
|
525
146
|
for (const slug of APP_STORE_HIDDEN_SLUGS) {
|
|
@@ -527,13 +148,13 @@ describe("AppDefinition catalog", () => {
|
|
|
527
148
|
expect(storeSlugs.has(slug), slug).toBe(false);
|
|
528
149
|
}
|
|
529
150
|
});
|
|
530
|
-
it("ships complete local branding provenance for all
|
|
151
|
+
it("ships complete local branding provenance for all 36 store-visible providers", () => {
|
|
531
152
|
const uiPublic = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../../ui/public");
|
|
532
153
|
const manifest = JSON.parse(fs.readFileSync(path.join(uiPublic, "brands/apps/manifest.json"), "utf8"));
|
|
533
154
|
const visible = manifest.providers.filter((entry) => entry.catalogVisible);
|
|
534
|
-
expect(visible).toHaveLength(
|
|
535
|
-
expect(new Set(visible.map((entry) => entry.slug))).toHaveProperty("size",
|
|
536
|
-
expect(new Set(visible.map((entry) => entry.localAsset))).toHaveProperty("size",
|
|
155
|
+
expect(visible).toHaveLength(36);
|
|
156
|
+
expect(new Set(visible.map((entry) => entry.slug))).toHaveProperty("size", 36);
|
|
157
|
+
expect(new Set(visible.map((entry) => entry.localAsset))).toHaveProperty("size", 36);
|
|
537
158
|
expect(new Set(APP_STORE_DEFINITIONS.map((entry) => entry.slug))).toEqual(new Set(visible.map((entry) => entry.slug)));
|
|
538
159
|
for (const app of APP_STORE_DEFINITIONS) {
|
|
539
160
|
const provenance = visible.find((entry) => entry.slug === app.slug);
|
|
@@ -569,9 +190,7 @@ describe("AppDefinition catalog", () => {
|
|
|
569
190
|
});
|
|
570
191
|
it("keeps all Google Workspace profiles aligned with their app, endpoint, scopes, ownership, risk, and write policy", () => {
|
|
571
192
|
expect(GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS).toEqual(GOOGLE_WORKSPACE_PROFILE_EXPECTATIONS.map((entry) => entry.profile));
|
|
572
|
-
expect(Object.keys(GOOGLE_WORKSPACE_CONNECTOR_PROFILES)).toEqual([
|
|
573
|
-
...GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS,
|
|
574
|
-
]);
|
|
193
|
+
expect(Object.keys(GOOGLE_WORKSPACE_CONNECTOR_PROFILES)).toEqual([...GOOGLE_WORKSPACE_CONNECTOR_PROFILE_IDS]);
|
|
575
194
|
for (const expected of GOOGLE_WORKSPACE_PROFILE_EXPECTATIONS) {
|
|
576
195
|
expect(GOOGLE_WORKSPACE_CONNECTOR_PROFILES[expected.profile], expected.profile).toEqual({
|
|
577
196
|
appSlug: expected.appSlug,
|
|
@@ -588,147 +207,52 @@ describe("AppDefinition catalog", () => {
|
|
|
588
207
|
capabilityProfile: { key: expected.capability },
|
|
589
208
|
grantKinds: ["user", "organization"],
|
|
590
209
|
ownershipModes: ["platform_shared"],
|
|
591
|
-
defaults: {
|
|
592
|
-
serverUrl: expected.serverUrl,
|
|
593
|
-
scopesHint: expected.scopes,
|
|
594
|
-
},
|
|
210
|
+
defaults: { serverUrl: expected.serverUrl, scopesHint: expected.scopes },
|
|
595
211
|
riskTier: expected.riskTier,
|
|
596
212
|
});
|
|
597
213
|
expect(managed?.riskTier, `${expected.profile}:write-risk`).toBe(expected.writeTools.length > 0 ? "S4" : "S3");
|
|
598
|
-
const customer = app?.methods.find((method) => method.auth === "oauth"
|
|
599
|
-
method.oauthStrategy === undefined
|
|
600
|
-
method.capabilityProfile?.key === expected.capability);
|
|
214
|
+
const customer = app?.methods.find((method) => method.auth === "oauth"
|
|
215
|
+
&& method.oauthStrategy === undefined
|
|
216
|
+
&& method.capabilityProfile?.key === expected.capability);
|
|
601
217
|
expect(customer, `${expected.profile}:customer-fallback`).toMatchObject({
|
|
602
218
|
grantKinds: ["user", "organization"],
|
|
603
219
|
ownershipModes: ["customer"],
|
|
604
|
-
defaults: {
|
|
605
|
-
serverUrl: expected.serverUrl,
|
|
606
|
-
scopesHint: expected.scopes,
|
|
607
|
-
},
|
|
220
|
+
defaults: { serverUrl: expected.serverUrl, scopesHint: expected.scopes },
|
|
608
221
|
riskTier: expected.riskTier,
|
|
609
222
|
});
|
|
610
223
|
}
|
|
611
224
|
});
|
|
612
|
-
it("configures Shopify's current UCP and compatibility MCP methods without OAuth", () => {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
expect(
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
"ucp-agent": {
|
|
627
|
-
profile: "https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/valid-with-capabilities.json",
|
|
628
|
-
},
|
|
629
|
-
},
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
tenantFields: [
|
|
633
|
-
expect.objectContaining({ key: "storeDomain", required: true }),
|
|
634
|
-
],
|
|
635
|
-
});
|
|
636
|
-
expect(compatibility).toMatchObject({
|
|
637
|
-
auth: "none",
|
|
638
|
-
defaults: { serverUrlTemplate: "https://{storeDomain}/api/mcp" },
|
|
639
|
-
});
|
|
640
|
-
expect(resolveConnectionMethodServerUrl(ucp, {
|
|
641
|
-
storeDomain: "paperclip-demo.myshopify.com",
|
|
642
|
-
})).toBe("https://paperclip-demo.myshopify.com/api/ucp/mcp");
|
|
643
|
-
expect(resolveConnectionMethodServerUrl(compatibility, {
|
|
644
|
-
storeDomain: "paperclip-demo.myshopify.com",
|
|
645
|
-
})).toBe("https://paperclip-demo.myshopify.com/api/mcp");
|
|
646
|
-
expect(resolveConnectionMethodServerUrl(ucp, {})).toBeNull();
|
|
647
|
-
expect(shopify?.setupPrerequisite).toMatchObject({
|
|
648
|
-
title: "Launch the storefront before connecting",
|
|
649
|
-
actionUrl: "https://admin.shopify.com/",
|
|
650
|
-
});
|
|
651
|
-
expect(shopify?.setupPrerequisite?.steps?.join(" ")).toContain("Storefront visibility to Public");
|
|
652
|
-
});
|
|
653
|
-
it("offers PostHog OAuth and API-key methods with zero-config defaults and advanced narrowing", () => {
|
|
654
|
-
const posthog = APP_DEFINITIONS.find((app) => app.slug === "posthog");
|
|
655
|
-
expect(posthog?.methods.map((method) => method.key)).toEqual([
|
|
656
|
-
"mcp-oauth",
|
|
657
|
-
"mcp-api-key",
|
|
658
|
-
]);
|
|
659
|
-
for (const method of posthog?.methods ?? []) {
|
|
660
|
-
const projectField = method.tenantFields?.find((field) => field.key === "projectId");
|
|
661
|
-
expect(method.riskTier).toBe("S3");
|
|
662
|
-
expect(method.tenantFields?.find((field) => field.key === "readOnly")).toMatchObject({ defaultValue: false, advanced: true });
|
|
663
|
-
expect(projectField).toMatchObject({
|
|
664
|
-
advanced: true,
|
|
665
|
-
transport: { location: "header", name: "x-posthog-project-id" },
|
|
666
|
-
});
|
|
667
|
-
expect(projectField?.required).not.toBe(true);
|
|
668
|
-
expect(method.tenantFields
|
|
669
|
-
?.filter((field) => field.advanced)
|
|
670
|
-
.map((field) => field.key)).toEqual(["projectId", "readOnly", "features", "tools"]);
|
|
671
|
-
expect(method.tenantFields?.find((field) => field.key === "mode")).toMatchObject({
|
|
672
|
-
hidden: true,
|
|
673
|
-
defaultValue: "tools",
|
|
674
|
-
transport: { location: "query", name: "mode" },
|
|
675
|
-
});
|
|
676
|
-
expect(method.configRequirements).toBeUndefined();
|
|
677
|
-
expect(method.requiredResourceFilters).toBeUndefined();
|
|
678
|
-
expect(method.guidanceMd).toContain("optional advanced controls");
|
|
679
|
-
}
|
|
680
|
-
});
|
|
681
|
-
it("requires only reviewed provider or safety-boundary configuration on the default path", () => {
|
|
682
|
-
const required = APP_DEFINITIONS.flatMap((app) => app.methods.flatMap((method) => [...(method.tenantFields ?? []), ...(method.extensionFields ?? [])]
|
|
683
|
-
.filter((field) => field.required && field.advanced !== true && !field.hidden)
|
|
684
|
-
.map((field) => `${app.slug}:${method.key}:${field.key}`))).sort();
|
|
685
|
-
expect(required).toEqual([
|
|
686
|
-
"clickhouse:mcp-oauth:serviceId",
|
|
687
|
-
"shopify:storefront-mcp:storeDomain",
|
|
688
|
-
"shopify:ucp-commerce:storeDomain",
|
|
689
|
-
"supabase:mcp-api-key:projectRef",
|
|
690
|
-
"supabase:mcp-oauth:projectRef",
|
|
691
|
-
]);
|
|
692
|
-
});
|
|
225
|
+
it("configures Shopify's current UCP and compatibility MCP methods without OAuth", () => { const shopify = APP_DEFINITIONS.find((app) => app.slug === "shopify"); expect(shopify?.methods.map((method) => method.key)).toEqual(["ucp-commerce", "storefront-mcp"]); const ucp = shopify?.methods[0]; const compatibility = shopify?.methods[1]; expect(ucp).toMatchObject({ auth: "none", defaults: { serverUrlTemplate: "https://{storeDomain}/api/ucp/mcp", toolArgumentDefaults: { meta: { "ucp-agent": { profile: "https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/valid-with-capabilities.json" } } } }, tenantFields: [expect.objectContaining({ key: "storeDomain", required: true })] }); expect(compatibility).toMatchObject({ auth: "none", defaults: { serverUrlTemplate: "https://{storeDomain}/api/mcp" } }); expect(resolveConnectionMethodServerUrl(ucp, { storeDomain: "paperclip-demo.myshopify.com" })).toBe("https://paperclip-demo.myshopify.com/api/ucp/mcp"); expect(resolveConnectionMethodServerUrl(compatibility, { storeDomain: "paperclip-demo.myshopify.com" })).toBe("https://paperclip-demo.myshopify.com/api/mcp"); expect(resolveConnectionMethodServerUrl(ucp, {})).toBeNull(); expect(shopify?.setupPrerequisite).toMatchObject({ title: "Launch the storefront before connecting", actionUrl: "https://admin.shopify.com/" }); expect(shopify?.setupPrerequisite?.steps?.join(" ")).toContain("Storefront visibility to Public"); });
|
|
226
|
+
it("offers PostHog OAuth and API-key methods with zero-config defaults and advanced narrowing", () => { const posthog = APP_DEFINITIONS.find((app) => app.slug === "posthog"); expect(posthog?.methods.map((method) => method.key)).toEqual(["mcp-oauth", "mcp-api-key"]); for (const method of posthog?.methods ?? []) {
|
|
227
|
+
const projectField = method.tenantFields?.find((field) => field.key === "projectId");
|
|
228
|
+
expect(method.riskTier).toBe("S3");
|
|
229
|
+
expect(method.tenantFields?.find((field) => field.key === "readOnly")).toMatchObject({ defaultValue: false, advanced: true });
|
|
230
|
+
expect(projectField).toMatchObject({ advanced: true, transport: { location: "header", name: "x-posthog-project-id" } });
|
|
231
|
+
expect(projectField?.required).not.toBe(true);
|
|
232
|
+
expect(method.tenantFields?.filter((field) => field.advanced).map((field) => field.key)).toEqual(["projectId", "readOnly", "features", "tools"]);
|
|
233
|
+
expect(method.tenantFields?.find((field) => field.key === "mode")).toMatchObject({ hidden: true, defaultValue: "tools", transport: { location: "query", name: "mode" } });
|
|
234
|
+
expect(method.configRequirements).toBeUndefined();
|
|
235
|
+
expect(method.requiredResourceFilters).toBeUndefined();
|
|
236
|
+
expect(method.guidanceMd).toContain("optional advanced controls");
|
|
237
|
+
} });
|
|
238
|
+
it("requires only reviewed provider or safety-boundary configuration on the default path", () => { const required = APP_DEFINITIONS.flatMap((app) => app.methods.flatMap((method) => [...(method.tenantFields ?? []), ...(method.extensionFields ?? [])].filter((field) => field.required && field.advanced !== true && !field.hidden).map((field) => `${app.slug}:${method.key}:${field.key}`))).sort(); expect(required).toEqual(["clickhouse:mcp-oauth:serviceId", "shopify:storefront-mcp:storeDomain", "shopify:ucp-commerce:storeDomain", "supabase:mcp-api-key:projectRef", "supabase:mcp-oauth:projectRef"]); });
|
|
693
239
|
it("limits Vercel Connect setup to the reviewed pilot methods", () => {
|
|
694
|
-
const reviewed = APP_DEFINITIONS.flatMap((app) => app.methods.flatMap((method) => method.credentialSources?.vercelConnect
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
slug: app.slug,
|
|
698
|
-
key: method.key,
|
|
699
|
-
review: method.credentialSources.vercelConnect,
|
|
700
|
-
},
|
|
701
|
-
]
|
|
702
|
-
: []));
|
|
703
|
-
expect(reviewed.map(({ slug, key }) => `${slug}:${key}`).sort()).toEqual([
|
|
704
|
-
"linear:mcp-oauth",
|
|
705
|
-
"notion:mcp-oauth",
|
|
706
|
-
"posthog:mcp-api-key",
|
|
707
|
-
"posthog:mcp-oauth",
|
|
708
|
-
]);
|
|
709
|
-
expect(reviewed.find(({ slug }) => slug === "linear")?.review).toMatchObject({
|
|
710
|
-
services: ["linear"],
|
|
711
|
-
principalModes: ["user"],
|
|
712
|
-
scopes: ["read", "write"],
|
|
713
|
-
header: { name: "Authorization", prefix: "Bearer " },
|
|
714
|
-
});
|
|
240
|
+
const reviewed = APP_DEFINITIONS.flatMap((app) => app.methods.flatMap((method) => method.credentialSources?.vercelConnect ? [{ slug: app.slug, key: method.key, review: method.credentialSources.vercelConnect }] : []));
|
|
241
|
+
expect(reviewed.map(({ slug, key }) => `${slug}:${key}`).sort()).toEqual(["linear:mcp-oauth", "notion:mcp-oauth", "posthog:mcp-api-key", "posthog:mcp-oauth"]);
|
|
242
|
+
expect(reviewed.find(({ slug }) => slug === "linear")?.review).toMatchObject({ services: ["linear"], principalModes: ["user"], scopes: ["read", "write"], header: { name: "Authorization", prefix: "Bearer " } });
|
|
715
243
|
expect(reviewed.find(({ slug, key }) => slug === "posthog" && key === "mcp-oauth")?.review.services).toEqual(["posthog", "mcp.posthog.com/mcp"]);
|
|
716
244
|
expect(reviewed.find(({ slug, key }) => slug === "posthog" && key === "mcp-api-key")?.review.principalModes).toEqual(["app"]);
|
|
717
|
-
expect(APP_DEFINITIONS.find((app) => app.slug === "vercel")?.availability
|
|
718
|
-
?.available).toBe(false);
|
|
719
|
-
});
|
|
720
|
-
it("enforces method and field invariants", () => {
|
|
721
|
-
for (const app of APP_DEFINITIONS)
|
|
722
|
-
for (const method of app.methods) {
|
|
723
|
-
if (method.auth === "api_key" &&
|
|
724
|
-
(method.purpose ?? "tool") !== "channel")
|
|
725
|
-
expect(method.keyPlacement).toBeTruthy();
|
|
726
|
-
if (method.auth === "oauth")
|
|
727
|
-
expect(method.ownershipModes.length).toBeGreaterThan(0);
|
|
728
|
-
for (const field of method.credentialFields ?? [])
|
|
729
|
-
if (field.required && field.type !== "checkbox")
|
|
730
|
-
expect(field.placeholder).toBeTruthy();
|
|
731
|
-
}
|
|
245
|
+
expect(APP_DEFINITIONS.find((app) => app.slug === "vercel")?.availability?.available).toBe(false);
|
|
732
246
|
});
|
|
247
|
+
it("enforces method and field invariants", () => { for (const app of APP_DEFINITIONS)
|
|
248
|
+
for (const method of app.methods) {
|
|
249
|
+
if (method.auth === "api_key")
|
|
250
|
+
expect(method.keyPlacement).toBeTruthy();
|
|
251
|
+
if (method.auth === "oauth")
|
|
252
|
+
expect(method.ownershipModes.length).toBeGreaterThan(0);
|
|
253
|
+
for (const field of method.credentialFields ?? [])
|
|
254
|
+
if (field.required && field.type !== "checkbox")
|
|
255
|
+
expect(field.placeholder).toBeTruthy();
|
|
256
|
+
} });
|
|
733
257
|
});
|
|
734
258
|
//# sourceMappingURL=app-definitions.test.js.map
|