@alpic-ai/api 0.0.0-staging.g8f6540a → 0.0.0-staging.g907874f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +14 -5
- package/dist/index.mjs +729 -34
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -29,7 +29,7 @@ declare const createEnvironmentContractV1: _$_orpc_contract0.ContractProcedureBu
|
|
|
29
29
|
id: z.ZodString;
|
|
30
30
|
name: z.ZodString;
|
|
31
31
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
32
|
-
urls: z.ZodArray<z.
|
|
32
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
33
33
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
34
34
|
projectId: z.ZodString;
|
|
35
35
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
@@ -165,7 +165,10 @@ declare const contract: {
|
|
|
165
165
|
uploadUrl: z.ZodURL;
|
|
166
166
|
token: z.ZodString;
|
|
167
167
|
expiresAt: z.ZodCoercedDate<unknown>;
|
|
168
|
-
}, z.core.$strip>, Record<never, never>,
|
|
168
|
+
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
169
|
+
NOT_FOUND: {};
|
|
170
|
+
BAD_REQUEST: {};
|
|
171
|
+
}>, Record<never, never>>;
|
|
169
172
|
};
|
|
170
173
|
getLogs: {
|
|
171
174
|
v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -196,7 +199,7 @@ declare const contract: {
|
|
|
196
199
|
id: z.ZodString;
|
|
197
200
|
name: z.ZodString;
|
|
198
201
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
199
|
-
urls: z.ZodArray<z.
|
|
202
|
+
urls: z.ZodArray<z.ZodURL>;
|
|
200
203
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
201
204
|
projectId: z.ZodString;
|
|
202
205
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
@@ -365,6 +368,7 @@ declare const contract: {
|
|
|
365
368
|
success: z.ZodLiteral<true>;
|
|
366
369
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
367
370
|
NOT_FOUND: {};
|
|
371
|
+
BAD_REQUEST: {};
|
|
368
372
|
}>, Record<never, never>>;
|
|
369
373
|
};
|
|
370
374
|
};
|
|
@@ -593,7 +597,10 @@ declare const contract: {
|
|
|
593
597
|
completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
594
598
|
}, z.core.$strip>>;
|
|
595
599
|
}, z.core.$strip>>;
|
|
596
|
-
}, z.core.$strip>>, Record<never, never>,
|
|
600
|
+
}, z.core.$strip>>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
601
|
+
NOT_FOUND: {};
|
|
602
|
+
BAD_REQUEST: {};
|
|
603
|
+
}>, Record<never, never>>;
|
|
597
604
|
};
|
|
598
605
|
create: {
|
|
599
606
|
v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -737,7 +744,9 @@ declare const contract: {
|
|
|
737
744
|
subdomain: z.ZodString;
|
|
738
745
|
ticket: z.ZodString;
|
|
739
746
|
tunnelHost: z.ZodString;
|
|
740
|
-
}, z.core.$strip>, Record<never, never>,
|
|
747
|
+
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
748
|
+
FORBIDDEN: {};
|
|
749
|
+
}>, Record<never, never>>;
|
|
741
750
|
};
|
|
742
751
|
};
|
|
743
752
|
distribution: {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,174 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import * as z$1 from "zod/v4";
|
|
2
3
|
import { oc } from "@orpc/contract";
|
|
3
4
|
import ms from "ms";
|
|
5
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_@cfworker+json-schema@4.1.1_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
6
|
+
/**
|
|
7
|
+
* Reusable URL validation that disallows javascript: scheme
|
|
8
|
+
*/
|
|
9
|
+
const SafeUrlSchema = z$1.url().superRefine((val, ctx) => {
|
|
10
|
+
if (!URL.canParse(val)) {
|
|
11
|
+
ctx.addIssue({
|
|
12
|
+
code: z$1.ZodIssueCode.custom,
|
|
13
|
+
message: "URL must be parseable",
|
|
14
|
+
fatal: true
|
|
15
|
+
});
|
|
16
|
+
return z$1.NEVER;
|
|
17
|
+
}
|
|
18
|
+
}).refine((url) => {
|
|
19
|
+
const u = new URL(url);
|
|
20
|
+
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
21
|
+
}, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
|
|
22
|
+
/**
|
|
23
|
+
* RFC 9728 OAuth Protected Resource Metadata
|
|
24
|
+
*/
|
|
25
|
+
const OAuthProtectedResourceMetadataSchema = z$1.looseObject({
|
|
26
|
+
resource: z$1.string().url(),
|
|
27
|
+
authorization_servers: z$1.array(SafeUrlSchema).optional(),
|
|
28
|
+
jwks_uri: z$1.string().url().optional(),
|
|
29
|
+
scopes_supported: z$1.array(z$1.string()).optional(),
|
|
30
|
+
bearer_methods_supported: z$1.array(z$1.string()).optional(),
|
|
31
|
+
resource_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
32
|
+
resource_name: z$1.string().optional(),
|
|
33
|
+
resource_documentation: z$1.string().optional(),
|
|
34
|
+
resource_policy_uri: z$1.string().url().optional(),
|
|
35
|
+
resource_tos_uri: z$1.string().url().optional(),
|
|
36
|
+
tls_client_certificate_bound_access_tokens: z$1.boolean().optional(),
|
|
37
|
+
authorization_details_types_supported: z$1.array(z$1.string()).optional(),
|
|
38
|
+
dpop_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
39
|
+
dpop_bound_access_tokens_required: z$1.boolean().optional()
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* RFC 8414 OAuth 2.0 Authorization Server Metadata
|
|
43
|
+
*/
|
|
44
|
+
const OAuthMetadataSchema = z$1.looseObject({
|
|
45
|
+
issuer: z$1.string(),
|
|
46
|
+
authorization_endpoint: SafeUrlSchema,
|
|
47
|
+
token_endpoint: SafeUrlSchema,
|
|
48
|
+
registration_endpoint: SafeUrlSchema.optional(),
|
|
49
|
+
scopes_supported: z$1.array(z$1.string()).optional(),
|
|
50
|
+
response_types_supported: z$1.array(z$1.string()),
|
|
51
|
+
response_modes_supported: z$1.array(z$1.string()).optional(),
|
|
52
|
+
grant_types_supported: z$1.array(z$1.string()).optional(),
|
|
53
|
+
token_endpoint_auth_methods_supported: z$1.array(z$1.string()).optional(),
|
|
54
|
+
token_endpoint_auth_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
55
|
+
service_documentation: SafeUrlSchema.optional(),
|
|
56
|
+
revocation_endpoint: SafeUrlSchema.optional(),
|
|
57
|
+
revocation_endpoint_auth_methods_supported: z$1.array(z$1.string()).optional(),
|
|
58
|
+
revocation_endpoint_auth_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
59
|
+
introspection_endpoint: z$1.string().optional(),
|
|
60
|
+
introspection_endpoint_auth_methods_supported: z$1.array(z$1.string()).optional(),
|
|
61
|
+
introspection_endpoint_auth_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
62
|
+
code_challenge_methods_supported: z$1.array(z$1.string()).optional(),
|
|
63
|
+
client_id_metadata_document_supported: z$1.boolean().optional()
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* OpenID Connect Discovery 1.0 Provider Metadata
|
|
67
|
+
* see: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata
|
|
68
|
+
*/
|
|
69
|
+
const OpenIdProviderMetadataSchema = z$1.looseObject({
|
|
70
|
+
issuer: z$1.string(),
|
|
71
|
+
authorization_endpoint: SafeUrlSchema,
|
|
72
|
+
token_endpoint: SafeUrlSchema,
|
|
73
|
+
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
74
|
+
jwks_uri: SafeUrlSchema,
|
|
75
|
+
registration_endpoint: SafeUrlSchema.optional(),
|
|
76
|
+
scopes_supported: z$1.array(z$1.string()).optional(),
|
|
77
|
+
response_types_supported: z$1.array(z$1.string()),
|
|
78
|
+
response_modes_supported: z$1.array(z$1.string()).optional(),
|
|
79
|
+
grant_types_supported: z$1.array(z$1.string()).optional(),
|
|
80
|
+
acr_values_supported: z$1.array(z$1.string()).optional(),
|
|
81
|
+
subject_types_supported: z$1.array(z$1.string()),
|
|
82
|
+
id_token_signing_alg_values_supported: z$1.array(z$1.string()),
|
|
83
|
+
id_token_encryption_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
84
|
+
id_token_encryption_enc_values_supported: z$1.array(z$1.string()).optional(),
|
|
85
|
+
userinfo_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
86
|
+
userinfo_encryption_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
87
|
+
userinfo_encryption_enc_values_supported: z$1.array(z$1.string()).optional(),
|
|
88
|
+
request_object_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
89
|
+
request_object_encryption_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
90
|
+
request_object_encryption_enc_values_supported: z$1.array(z$1.string()).optional(),
|
|
91
|
+
token_endpoint_auth_methods_supported: z$1.array(z$1.string()).optional(),
|
|
92
|
+
token_endpoint_auth_signing_alg_values_supported: z$1.array(z$1.string()).optional(),
|
|
93
|
+
display_values_supported: z$1.array(z$1.string()).optional(),
|
|
94
|
+
claim_types_supported: z$1.array(z$1.string()).optional(),
|
|
95
|
+
claims_supported: z$1.array(z$1.string()).optional(),
|
|
96
|
+
service_documentation: z$1.string().optional(),
|
|
97
|
+
claims_locales_supported: z$1.array(z$1.string()).optional(),
|
|
98
|
+
ui_locales_supported: z$1.array(z$1.string()).optional(),
|
|
99
|
+
claims_parameter_supported: z$1.boolean().optional(),
|
|
100
|
+
request_parameter_supported: z$1.boolean().optional(),
|
|
101
|
+
request_uri_parameter_supported: z$1.boolean().optional(),
|
|
102
|
+
require_request_uri_registration: z$1.boolean().optional(),
|
|
103
|
+
op_policy_uri: SafeUrlSchema.optional(),
|
|
104
|
+
op_tos_uri: SafeUrlSchema.optional(),
|
|
105
|
+
client_id_metadata_document_supported: z$1.boolean().optional()
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* OpenID Connect Discovery metadata that may include OAuth 2.0 fields
|
|
109
|
+
* This schema represents the real-world scenario where OIDC providers
|
|
110
|
+
* return a mix of OpenID Connect and OAuth 2.0 metadata fields
|
|
111
|
+
*/
|
|
112
|
+
const OpenIdProviderDiscoveryMetadataSchema = z$1.object({
|
|
113
|
+
...OpenIdProviderMetadataSchema.shape,
|
|
114
|
+
...OAuthMetadataSchema.pick({ code_challenge_methods_supported: true }).shape
|
|
115
|
+
});
|
|
116
|
+
z$1.object({
|
|
117
|
+
access_token: z$1.string(),
|
|
118
|
+
id_token: z$1.string().optional(),
|
|
119
|
+
token_type: z$1.string(),
|
|
120
|
+
expires_in: z$1.coerce.number().optional(),
|
|
121
|
+
scope: z$1.string().optional(),
|
|
122
|
+
refresh_token: z$1.string().optional()
|
|
123
|
+
}).strip();
|
|
124
|
+
z$1.object({
|
|
125
|
+
error: z$1.string(),
|
|
126
|
+
error_description: z$1.string().optional(),
|
|
127
|
+
error_uri: z$1.string().optional()
|
|
128
|
+
});
|
|
129
|
+
/**
|
|
130
|
+
* Optional version of SafeUrlSchema that allows empty string for retrocompatibility on tos_uri and logo_uri
|
|
131
|
+
*/
|
|
132
|
+
const OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z$1.literal("").transform(() => void 0));
|
|
133
|
+
/**
|
|
134
|
+
* RFC 7591 OAuth 2.0 Dynamic Client Registration metadata
|
|
135
|
+
*/
|
|
136
|
+
const OAuthClientMetadataSchema = z$1.object({
|
|
137
|
+
redirect_uris: z$1.array(SafeUrlSchema),
|
|
138
|
+
token_endpoint_auth_method: z$1.string().optional(),
|
|
139
|
+
grant_types: z$1.array(z$1.string()).optional(),
|
|
140
|
+
response_types: z$1.array(z$1.string()).optional(),
|
|
141
|
+
client_name: z$1.string().optional(),
|
|
142
|
+
client_uri: SafeUrlSchema.optional(),
|
|
143
|
+
logo_uri: OptionalSafeUrlSchema,
|
|
144
|
+
scope: z$1.string().optional(),
|
|
145
|
+
contacts: z$1.array(z$1.string()).optional(),
|
|
146
|
+
tos_uri: OptionalSafeUrlSchema,
|
|
147
|
+
policy_uri: z$1.string().optional(),
|
|
148
|
+
jwks_uri: SafeUrlSchema.optional(),
|
|
149
|
+
jwks: z$1.any().optional(),
|
|
150
|
+
software_id: z$1.string().optional(),
|
|
151
|
+
software_version: z$1.string().optional(),
|
|
152
|
+
software_statement: z$1.string().optional()
|
|
153
|
+
}).strip();
|
|
154
|
+
/**
|
|
155
|
+
* RFC 7591 OAuth 2.0 Dynamic Client Registration client information
|
|
156
|
+
*/
|
|
157
|
+
const OAuthClientInformationSchema = z$1.object({
|
|
158
|
+
client_id: z$1.string(),
|
|
159
|
+
client_secret: z$1.string().optional(),
|
|
160
|
+
client_id_issued_at: z$1.number().optional(),
|
|
161
|
+
client_secret_expires_at: z$1.number().optional()
|
|
162
|
+
}).strip();
|
|
163
|
+
OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
164
|
+
z$1.object({
|
|
165
|
+
error: z$1.string(),
|
|
166
|
+
error_description: z$1.string().optional()
|
|
167
|
+
}).strip();
|
|
168
|
+
z$1.object({
|
|
169
|
+
token: z$1.string(),
|
|
170
|
+
token_type_hint: z$1.string().optional()
|
|
171
|
+
}).strip();
|
|
4
172
|
const platformSchema = z.enum(["chatgpt", "claudeai"]);
|
|
5
173
|
const PLATFORM_LABELS = {
|
|
6
174
|
chatgpt: "ChatGPT",
|
|
@@ -71,7 +239,14 @@ const auditReportWithScreenshotsSchema = auditReportSchema.extend({ widgetScreen
|
|
|
71
239
|
chatgpt: widgetScreenshotSchema.optional(),
|
|
72
240
|
claudeai: widgetScreenshotSchema.optional()
|
|
73
241
|
}) });
|
|
74
|
-
z.
|
|
242
|
+
z.object({
|
|
243
|
+
id: z.string(),
|
|
244
|
+
environmentId: z.string(),
|
|
245
|
+
clientId: z.string(),
|
|
246
|
+
clientSecret: z.string(),
|
|
247
|
+
clientScopes: z.array(z.string())
|
|
248
|
+
});
|
|
249
|
+
const deploymentStatusSchema$1 = z.enum([
|
|
75
250
|
"ongoing",
|
|
76
251
|
"deployed",
|
|
77
252
|
"failed",
|
|
@@ -81,6 +256,119 @@ z.object({
|
|
|
81
256
|
timestamp: z.coerce.date().optional(),
|
|
82
257
|
content: z.string().optional()
|
|
83
258
|
});
|
|
259
|
+
const deploymentSummarySchema = z.object({
|
|
260
|
+
id: z.string(),
|
|
261
|
+
status: deploymentStatusSchema$1,
|
|
262
|
+
sourceBucket: z.string().nullable(),
|
|
263
|
+
sourceObjectKey: z.string().nullable(),
|
|
264
|
+
sourceRef: z.string().nullable(),
|
|
265
|
+
sourceCommitId: z.string().nullable(),
|
|
266
|
+
sourceCommitMessage: z.string().nullable(),
|
|
267
|
+
environmentId: z.string(),
|
|
268
|
+
authorUsername: z.string().nullable(),
|
|
269
|
+
authorAvatarUrl: z.string().nullable(),
|
|
270
|
+
startedAt: z.coerce.date().nullable(),
|
|
271
|
+
completedAt: z.coerce.date().nullable(),
|
|
272
|
+
isCurrent: z.boolean().optional(),
|
|
273
|
+
createdAt: z.coerce.date(),
|
|
274
|
+
updatedAt: z.coerce.date()
|
|
275
|
+
});
|
|
276
|
+
/**
|
|
277
|
+
* Public environment
|
|
278
|
+
*
|
|
279
|
+
* No OAuth metadata exposed.
|
|
280
|
+
*/
|
|
281
|
+
const publicEnvironmentSchema = z.object({
|
|
282
|
+
isPublic: z.literal(true),
|
|
283
|
+
oAuthMetadata: z.undefined().optional()
|
|
284
|
+
});
|
|
285
|
+
/**
|
|
286
|
+
* Protected environment with an external resource metadata URL
|
|
287
|
+
*
|
|
288
|
+
* An external resource metadata URL is returned in the WWW-Authenticate header during the first 401 response.
|
|
289
|
+
* Everything that follows is handled outside of the MCP server scope.
|
|
290
|
+
*/
|
|
291
|
+
const externalResourceMetadataEnvironmentSchema = z.object({
|
|
292
|
+
isPublic: z.literal(false),
|
|
293
|
+
oAuthMetadata: z.object({ externalResourceMetadataUrl: z.url() }),
|
|
294
|
+
scope: z.string().optional()
|
|
295
|
+
});
|
|
296
|
+
/**
|
|
297
|
+
* Protected environment with an external authorization server URL
|
|
298
|
+
*
|
|
299
|
+
* The server itself exposes the /.well-known/oauth-protected-resource endpoint.
|
|
300
|
+
* An external authorization server URL is returned when requesting the endpoint.
|
|
301
|
+
* Everything that follows is handled outside of the MCP server scope.
|
|
302
|
+
*/
|
|
303
|
+
const externalAuthorizationServerEnvironmentSchema = z.object({
|
|
304
|
+
isPublic: z.literal(false),
|
|
305
|
+
oAuthMetadata: z.object({
|
|
306
|
+
externalAuthorizationServerUrl: z.url(),
|
|
307
|
+
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
308
|
+
}),
|
|
309
|
+
scope: z.string().optional()
|
|
310
|
+
});
|
|
311
|
+
/**
|
|
312
|
+
* Standalone protected environment
|
|
313
|
+
*
|
|
314
|
+
* The server itself exposes the /.well-known/oauth-protected-resource endpoint.
|
|
315
|
+
* The server itself exposes the /.well-known/oauth-authorization-server endpoint.
|
|
316
|
+
*/
|
|
317
|
+
const standaloneEnvironmentSchema = z.object({
|
|
318
|
+
isPublic: z.literal(false),
|
|
319
|
+
oAuthMetadata: z.object({
|
|
320
|
+
authorizationServerMetadata: z.union([OAuthMetadataSchema, OpenIdProviderDiscoveryMetadataSchema]),
|
|
321
|
+
resourceMetadata: OAuthProtectedResourceMetadataSchema.optional()
|
|
322
|
+
}),
|
|
323
|
+
scope: z.string().optional()
|
|
324
|
+
});
|
|
325
|
+
/**
|
|
326
|
+
* Protected environment without OAuth discovery
|
|
327
|
+
*
|
|
328
|
+
* The server enforces authentication but exposes no OAuth discovery metadata.
|
|
329
|
+
* Neither /.well-known/oauth-protected-resource nor /.well-known/oauth-authorization-server
|
|
330
|
+
* are advertised. Clients must obtain credentials out-of-band.
|
|
331
|
+
*/
|
|
332
|
+
const protectedWithoutDiscoveryEnvironmentSchema = z.object({
|
|
333
|
+
isPublic: z.literal(false),
|
|
334
|
+
oAuthMetadata: z.strictObject({}),
|
|
335
|
+
scope: z.string().optional()
|
|
336
|
+
});
|
|
337
|
+
z.union([
|
|
338
|
+
publicEnvironmentSchema,
|
|
339
|
+
externalResourceMetadataEnvironmentSchema,
|
|
340
|
+
externalAuthorizationServerEnvironmentSchema,
|
|
341
|
+
standaloneEnvironmentSchema,
|
|
342
|
+
protectedWithoutDiscoveryEnvironmentSchema
|
|
343
|
+
]);
|
|
344
|
+
const allowedPlatformSchema = platformSchema;
|
|
345
|
+
const environmentDomainSchema = z.object({
|
|
346
|
+
domain: z.string(),
|
|
347
|
+
status: z.enum([
|
|
348
|
+
"ongoing",
|
|
349
|
+
"deployed",
|
|
350
|
+
"failed"
|
|
351
|
+
]),
|
|
352
|
+
createdAt: z.coerce.date(),
|
|
353
|
+
updatedAt: z.coerce.date()
|
|
354
|
+
});
|
|
355
|
+
const environmentSchema$1 = z.object({
|
|
356
|
+
id: z.string(),
|
|
357
|
+
name: z.string(),
|
|
358
|
+
sourceBranch: z.string().nullable(),
|
|
359
|
+
mcpServerUrl: z.string(),
|
|
360
|
+
activeDeployment: deploymentSummarySchema.optional(),
|
|
361
|
+
latestDeployment: deploymentSummarySchema.optional(),
|
|
362
|
+
openaiAppsChallenge: z.string().nullable().optional(),
|
|
363
|
+
isPlaygroundEnabled: z.boolean(),
|
|
364
|
+
isIpWhitelistEnabled: z.boolean(),
|
|
365
|
+
ipAllowlist: z.array(z.string()).nullable(),
|
|
366
|
+
allowedPlatforms: z.array(allowedPlatformSchema),
|
|
367
|
+
projectId: z.string(),
|
|
368
|
+
createdAt: z.coerce.date(),
|
|
369
|
+
updatedAt: z.coerce.date()
|
|
370
|
+
});
|
|
371
|
+
const environmentWithDomainsSchema = environmentSchema$1.extend({ domains: z.array(environmentDomainSchema) });
|
|
84
372
|
z.object({
|
|
85
373
|
id: z.string(),
|
|
86
374
|
createdAt: z.coerce.date(),
|
|
@@ -197,6 +485,76 @@ const transportSchema = z.enum([
|
|
|
197
485
|
"sse",
|
|
198
486
|
"streamablehttp"
|
|
199
487
|
]);
|
|
488
|
+
z.object({
|
|
489
|
+
id: z.string(),
|
|
490
|
+
name: z.string(),
|
|
491
|
+
teamId: z.string(),
|
|
492
|
+
sourceRepository: z.string().nullable(),
|
|
493
|
+
createdAt: z.coerce.date().optional(),
|
|
494
|
+
runtime: runtimeSchema,
|
|
495
|
+
transport: transportSchema.nullable(),
|
|
496
|
+
rootDirectory: z.string().nullable(),
|
|
497
|
+
installCommand: z.string().nullable(),
|
|
498
|
+
buildCommand: z.string().nullable(),
|
|
499
|
+
buildOutputDir: z.string().nullable(),
|
|
500
|
+
startCommand: z.string().nullable(),
|
|
501
|
+
fixedOutboundIp: z.boolean(),
|
|
502
|
+
environments: z.array(environmentWithDomainsSchema),
|
|
503
|
+
productionEnvironment: environmentWithDomainsSchema.nullable()
|
|
504
|
+
});
|
|
505
|
+
z.object({
|
|
506
|
+
domain: z.string(),
|
|
507
|
+
createdAt: z.coerce.date(),
|
|
508
|
+
status: z.enum([
|
|
509
|
+
"ongoing",
|
|
510
|
+
"deployed",
|
|
511
|
+
"failed"
|
|
512
|
+
]),
|
|
513
|
+
environment: environmentSchema$1
|
|
514
|
+
});
|
|
515
|
+
const serverFieldsSchema$1 = z.object({
|
|
516
|
+
$schema: z.string(),
|
|
517
|
+
name: z.string(),
|
|
518
|
+
description: z.string(),
|
|
519
|
+
version: z.string().optional(),
|
|
520
|
+
title: z.string().optional(),
|
|
521
|
+
websiteUrl: z.string().optional(),
|
|
522
|
+
icons: z.array(z.object({
|
|
523
|
+
src: z.string(),
|
|
524
|
+
mimeType: z.string().optional(),
|
|
525
|
+
sizes: z.array(z.string()).optional()
|
|
526
|
+
})).optional(),
|
|
527
|
+
remotes: z.array(z.object({
|
|
528
|
+
type: z.string(),
|
|
529
|
+
url: z.string().optional(),
|
|
530
|
+
headers: z.array(z.object({
|
|
531
|
+
name: z.string(),
|
|
532
|
+
description: z.string(),
|
|
533
|
+
isRequired: z.boolean().optional(),
|
|
534
|
+
isSecret: z.boolean().optional()
|
|
535
|
+
})).optional()
|
|
536
|
+
})).optional()
|
|
537
|
+
}).catchall(z.unknown());
|
|
538
|
+
z.object({
|
|
539
|
+
serverFields: serverFieldsSchema$1,
|
|
540
|
+
source: z.enum(["registry", "defaults"])
|
|
541
|
+
});
|
|
542
|
+
/**
|
|
543
|
+
* Returns a variant of a `maxLength`-constrained string that clamps (truncates) instead of
|
|
544
|
+
* rejecting on overflow — used for AI-generated copy where the model routinely overshoots.
|
|
545
|
+
*
|
|
546
|
+
* NOTE: this rebuilds the schema from scratch, carrying over only `maxLength` (as a clamp),
|
|
547
|
+
* `minLength`, and the description. Any other validators on the source field (`.regex()`,
|
|
548
|
+
* `.email()`, custom refinements) are intentionally dropped — this helper is meant for plain
|
|
549
|
+
* free-text length caps only. A field with `null` `maxLength` is returned unchanged.
|
|
550
|
+
*/
|
|
551
|
+
const clampStringField = (field) => {
|
|
552
|
+
const max = field.maxLength;
|
|
553
|
+
if (max === null) return field;
|
|
554
|
+
const clamped = z.string().overwrite((value) => value.slice(0, max)).max(max);
|
|
555
|
+
const withMin = field.minLength === null ? clamped : clamped.min(field.minLength);
|
|
556
|
+
return field.description ? withMin.describe(field.description) : withMin;
|
|
557
|
+
};
|
|
200
558
|
const toolDefinitionSchema = z.object({
|
|
201
559
|
name: z.string(),
|
|
202
560
|
title: z.string().optional().describe("Human-friendly name for the tool, used in the UI. If not provided, `name` will be used."),
|
|
@@ -214,6 +572,10 @@ const positiveTestCaseSchema = z.object({
|
|
|
214
572
|
toolTriggered: z.string().optional(),
|
|
215
573
|
expectedOutput: z.string().optional()
|
|
216
574
|
}).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
|
|
575
|
+
const screenshotEntrySchema = z.object({
|
|
576
|
+
prompt: z.string(),
|
|
577
|
+
url: z.url().or(z.literal(""))
|
|
578
|
+
}).describe("Each screenshot: the user prompt that produced it + the image URL.");
|
|
217
579
|
/** Accepts either a valid email or URL. */
|
|
218
580
|
const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
|
|
219
581
|
const chatgptCategorySchema = z.enum([
|
|
@@ -232,7 +594,292 @@ const chatgptCategorySchema = z.enum([
|
|
|
232
594
|
"TRAVEL"
|
|
233
595
|
]);
|
|
234
596
|
const chatgptAuthenticationSchema = z.enum(["No auth needed", "OAuth 2.0"]);
|
|
235
|
-
const
|
|
597
|
+
const chatgptCountryCodeSchema = z.enum([
|
|
598
|
+
"AD",
|
|
599
|
+
"AE",
|
|
600
|
+
"AF",
|
|
601
|
+
"AG",
|
|
602
|
+
"AL",
|
|
603
|
+
"AM",
|
|
604
|
+
"AO",
|
|
605
|
+
"AR",
|
|
606
|
+
"AT",
|
|
607
|
+
"AU",
|
|
608
|
+
"AW",
|
|
609
|
+
"AX",
|
|
610
|
+
"AZ",
|
|
611
|
+
"BA",
|
|
612
|
+
"BB",
|
|
613
|
+
"BD",
|
|
614
|
+
"BE",
|
|
615
|
+
"BF",
|
|
616
|
+
"BG",
|
|
617
|
+
"BH",
|
|
618
|
+
"BI",
|
|
619
|
+
"BJ",
|
|
620
|
+
"BL",
|
|
621
|
+
"BM",
|
|
622
|
+
"BN",
|
|
623
|
+
"BO",
|
|
624
|
+
"BR",
|
|
625
|
+
"BS",
|
|
626
|
+
"BT",
|
|
627
|
+
"BW",
|
|
628
|
+
"BZ",
|
|
629
|
+
"CA",
|
|
630
|
+
"CD",
|
|
631
|
+
"CF",
|
|
632
|
+
"CG",
|
|
633
|
+
"CH",
|
|
634
|
+
"CI",
|
|
635
|
+
"CL",
|
|
636
|
+
"CM",
|
|
637
|
+
"CO",
|
|
638
|
+
"CR",
|
|
639
|
+
"CV",
|
|
640
|
+
"CY",
|
|
641
|
+
"CZ",
|
|
642
|
+
"DE",
|
|
643
|
+
"DJ",
|
|
644
|
+
"DK",
|
|
645
|
+
"DM",
|
|
646
|
+
"DO",
|
|
647
|
+
"DZ",
|
|
648
|
+
"EC",
|
|
649
|
+
"EE",
|
|
650
|
+
"EG",
|
|
651
|
+
"ER",
|
|
652
|
+
"ES",
|
|
653
|
+
"ET",
|
|
654
|
+
"FI",
|
|
655
|
+
"FJ",
|
|
656
|
+
"FM",
|
|
657
|
+
"FO",
|
|
658
|
+
"FR",
|
|
659
|
+
"GA",
|
|
660
|
+
"GB",
|
|
661
|
+
"GD",
|
|
662
|
+
"GE",
|
|
663
|
+
"GF",
|
|
664
|
+
"GH",
|
|
665
|
+
"GL",
|
|
666
|
+
"GM",
|
|
667
|
+
"GN",
|
|
668
|
+
"GP",
|
|
669
|
+
"GQ",
|
|
670
|
+
"GR",
|
|
671
|
+
"GT",
|
|
672
|
+
"GW",
|
|
673
|
+
"GY",
|
|
674
|
+
"HN",
|
|
675
|
+
"HR",
|
|
676
|
+
"HT",
|
|
677
|
+
"HU",
|
|
678
|
+
"ID",
|
|
679
|
+
"IE",
|
|
680
|
+
"IL",
|
|
681
|
+
"IN",
|
|
682
|
+
"IQ",
|
|
683
|
+
"IS",
|
|
684
|
+
"IT",
|
|
685
|
+
"JM",
|
|
686
|
+
"JO",
|
|
687
|
+
"JP",
|
|
688
|
+
"KE",
|
|
689
|
+
"KG",
|
|
690
|
+
"KH",
|
|
691
|
+
"KI",
|
|
692
|
+
"KM",
|
|
693
|
+
"KN",
|
|
694
|
+
"KR",
|
|
695
|
+
"KW",
|
|
696
|
+
"KY",
|
|
697
|
+
"KZ",
|
|
698
|
+
"LA",
|
|
699
|
+
"LB",
|
|
700
|
+
"LC",
|
|
701
|
+
"LI",
|
|
702
|
+
"LK",
|
|
703
|
+
"LR",
|
|
704
|
+
"LS",
|
|
705
|
+
"LT",
|
|
706
|
+
"LU",
|
|
707
|
+
"LV",
|
|
708
|
+
"LY",
|
|
709
|
+
"MA",
|
|
710
|
+
"MC",
|
|
711
|
+
"MD",
|
|
712
|
+
"ME",
|
|
713
|
+
"MF",
|
|
714
|
+
"MG",
|
|
715
|
+
"MH",
|
|
716
|
+
"MK",
|
|
717
|
+
"ML",
|
|
718
|
+
"MM",
|
|
719
|
+
"MN",
|
|
720
|
+
"MQ",
|
|
721
|
+
"MR",
|
|
722
|
+
"MT",
|
|
723
|
+
"MU",
|
|
724
|
+
"MV",
|
|
725
|
+
"MW",
|
|
726
|
+
"MX",
|
|
727
|
+
"MY",
|
|
728
|
+
"MZ",
|
|
729
|
+
"NA",
|
|
730
|
+
"NC",
|
|
731
|
+
"NE",
|
|
732
|
+
"NG",
|
|
733
|
+
"NI",
|
|
734
|
+
"NL",
|
|
735
|
+
"NO",
|
|
736
|
+
"NP",
|
|
737
|
+
"NR",
|
|
738
|
+
"NZ",
|
|
739
|
+
"OM",
|
|
740
|
+
"PA",
|
|
741
|
+
"PE",
|
|
742
|
+
"PF",
|
|
743
|
+
"PG",
|
|
744
|
+
"PH",
|
|
745
|
+
"PK",
|
|
746
|
+
"PL",
|
|
747
|
+
"PM",
|
|
748
|
+
"PS",
|
|
749
|
+
"PT",
|
|
750
|
+
"PW",
|
|
751
|
+
"PY",
|
|
752
|
+
"QA",
|
|
753
|
+
"RE",
|
|
754
|
+
"RO",
|
|
755
|
+
"RS",
|
|
756
|
+
"RW",
|
|
757
|
+
"SA",
|
|
758
|
+
"SB",
|
|
759
|
+
"SC",
|
|
760
|
+
"SD",
|
|
761
|
+
"SE",
|
|
762
|
+
"SG",
|
|
763
|
+
"SH",
|
|
764
|
+
"SI",
|
|
765
|
+
"SJ",
|
|
766
|
+
"SK",
|
|
767
|
+
"SL",
|
|
768
|
+
"SM",
|
|
769
|
+
"SN",
|
|
770
|
+
"SO",
|
|
771
|
+
"SR",
|
|
772
|
+
"SS",
|
|
773
|
+
"ST",
|
|
774
|
+
"SV",
|
|
775
|
+
"SZ",
|
|
776
|
+
"TD",
|
|
777
|
+
"TF",
|
|
778
|
+
"TG",
|
|
779
|
+
"TH",
|
|
780
|
+
"TJ",
|
|
781
|
+
"TL",
|
|
782
|
+
"TM",
|
|
783
|
+
"TN",
|
|
784
|
+
"TO",
|
|
785
|
+
"TR",
|
|
786
|
+
"TT",
|
|
787
|
+
"TV",
|
|
788
|
+
"TW",
|
|
789
|
+
"TZ",
|
|
790
|
+
"UA",
|
|
791
|
+
"UG",
|
|
792
|
+
"US",
|
|
793
|
+
"UY",
|
|
794
|
+
"UZ",
|
|
795
|
+
"VA",
|
|
796
|
+
"VC",
|
|
797
|
+
"VN",
|
|
798
|
+
"VU",
|
|
799
|
+
"WF",
|
|
800
|
+
"WS",
|
|
801
|
+
"YE",
|
|
802
|
+
"YT",
|
|
803
|
+
"ZA",
|
|
804
|
+
"ZM",
|
|
805
|
+
"ZW"
|
|
806
|
+
]);
|
|
807
|
+
const chatgptAllowedCountriesSchema = z.discriminatedUnion("mode", [
|
|
808
|
+
z.object({ mode: z.literal("all") }),
|
|
809
|
+
z.object({
|
|
810
|
+
mode: z.literal("allow"),
|
|
811
|
+
countries: z.array(chatgptCountryCodeSchema)
|
|
812
|
+
}),
|
|
813
|
+
z.object({
|
|
814
|
+
mode: z.literal("block"),
|
|
815
|
+
countries: z.array(chatgptCountryCodeSchema)
|
|
816
|
+
})
|
|
817
|
+
]);
|
|
818
|
+
const chatgptTranslationLocaleSchema = z.enum([
|
|
819
|
+
"am",
|
|
820
|
+
"ar",
|
|
821
|
+
"bg-BG",
|
|
822
|
+
"bn-BD",
|
|
823
|
+
"bs-BA",
|
|
824
|
+
"ca-ES",
|
|
825
|
+
"cs-CZ",
|
|
826
|
+
"da-DK",
|
|
827
|
+
"de-DE",
|
|
828
|
+
"el-GR",
|
|
829
|
+
"es-419",
|
|
830
|
+
"es-ES",
|
|
831
|
+
"et-EE",
|
|
832
|
+
"fi-FI",
|
|
833
|
+
"fr-CA",
|
|
834
|
+
"fr-FR",
|
|
835
|
+
"gu-IN",
|
|
836
|
+
"hi-IN",
|
|
837
|
+
"hr-HR",
|
|
838
|
+
"hu-HU",
|
|
839
|
+
"hy-AM",
|
|
840
|
+
"id-ID",
|
|
841
|
+
"is-IS",
|
|
842
|
+
"it-IT",
|
|
843
|
+
"ja-JP",
|
|
844
|
+
"ka-GE",
|
|
845
|
+
"kk",
|
|
846
|
+
"kn-IN",
|
|
847
|
+
"ko-KR",
|
|
848
|
+
"lt",
|
|
849
|
+
"lv-LV",
|
|
850
|
+
"mk-MK",
|
|
851
|
+
"ml",
|
|
852
|
+
"mn",
|
|
853
|
+
"mr-IN",
|
|
854
|
+
"ms-MY",
|
|
855
|
+
"my-MM",
|
|
856
|
+
"nb-NO",
|
|
857
|
+
"nl-NL",
|
|
858
|
+
"pa",
|
|
859
|
+
"pl-PL",
|
|
860
|
+
"pt-BR",
|
|
861
|
+
"pt-PT",
|
|
862
|
+
"ro-RO",
|
|
863
|
+
"ru-RU",
|
|
864
|
+
"sk-SK",
|
|
865
|
+
"sl-SI",
|
|
866
|
+
"so-SO",
|
|
867
|
+
"sq-AL",
|
|
868
|
+
"sr-RS",
|
|
869
|
+
"sv-SE",
|
|
870
|
+
"sw-TZ",
|
|
871
|
+
"ta-IN",
|
|
872
|
+
"te-IN",
|
|
873
|
+
"th-TH",
|
|
874
|
+
"tl",
|
|
875
|
+
"tr-TR",
|
|
876
|
+
"uk-UA",
|
|
877
|
+
"ur",
|
|
878
|
+
"vi-VN",
|
|
879
|
+
"zh-CN",
|
|
880
|
+
"zh-HK",
|
|
881
|
+
"zh-TW"
|
|
882
|
+
]);
|
|
236
883
|
const negativeTestCaseSchema = z.object({
|
|
237
884
|
scenario: z.string(),
|
|
238
885
|
userPrompt: z.string()
|
|
@@ -243,21 +890,29 @@ const chatgptToolJustificationSchema = z.object({
|
|
|
243
890
|
openWorldJustification: z.string(),
|
|
244
891
|
destructiveJustification: z.string()
|
|
245
892
|
}).describe("Per-tool justification of each MCP annotation value (one sentence per hint).");
|
|
893
|
+
/**
|
|
894
|
+
* Base copy fields, defined once and reused by both the submission form and per-locale
|
|
895
|
+
* translations so the constraints (tagline ≤ 30 chars) never drift. The translation generation
|
|
896
|
+
* path wraps these in {@link clampStringField} since the LLM tends to overshoot the limit.
|
|
897
|
+
*/
|
|
898
|
+
const chatgptTaglineSchema = z.string().max(30);
|
|
899
|
+
const chatgptDescriptionSchema = z.string();
|
|
246
900
|
const chatgptTranslationSchema = z.object({
|
|
247
|
-
locale:
|
|
248
|
-
tagline:
|
|
249
|
-
description:
|
|
901
|
+
locale: chatgptTranslationLocaleSchema,
|
|
902
|
+
tagline: chatgptTaglineSchema,
|
|
903
|
+
description: chatgptDescriptionSchema
|
|
250
904
|
}).describe("Locale-scoped override for tagline + description. English (US) is the default.");
|
|
905
|
+
chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema) });
|
|
251
906
|
/**
|
|
252
907
|
* Field order mirrors the ChatGPT (OpenAI) submission spreadsheet, grouped by section.
|
|
253
908
|
* When adding/removing/reordering fields, keep this in sync with the sheet.
|
|
254
909
|
*/
|
|
255
910
|
const chatgptSubmissionFormDataSchema = z.object({
|
|
256
911
|
logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
|
|
257
|
-
logoDark: z.string().describe("
|
|
912
|
+
logoDark: z.string().optional().describe("Optional dark-mode logo icon. Square PNG, same specs as the light icon. Leave empty if the light icon also works on dark backgrounds."),
|
|
258
913
|
appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
|
|
259
|
-
tagline:
|
|
260
|
-
description:
|
|
914
|
+
tagline: chatgptTaglineSchema.describe("Plain-language phrase focused on function and user value. 30 chars max."),
|
|
915
|
+
description: chatgptDescriptionSchema.describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
|
|
261
916
|
category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
|
|
262
917
|
developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
|
|
263
918
|
companyUrl: z.url().describe("Your company's main website URL."),
|
|
@@ -272,9 +927,9 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
272
927
|
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values."),
|
|
273
928
|
testCases: z.array(positiveTestCaseSchema).describe("At least 5 positive test cases. Each: Scenario, User prompt, Tool triggered, Expected output. Coverage over all major use cases."),
|
|
274
929
|
negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases — prompts where the app should NOT trigger but the model might think it's relevant."),
|
|
275
|
-
screenshots: z.array(
|
|
930
|
+
screenshots: z.array(screenshotEntrySchema).describe("In-app screenshots paired with the user prompt that produced them. Widget apps must show the widget UI; non-widget apps show the model response. Min 1, max 4 entries. First three are public. Images: 706px wide, 400–860px tall, PNG."),
|
|
276
931
|
translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
|
|
277
|
-
allowedCountries: chatgptAllowedCountriesSchema.describe("
|
|
932
|
+
allowedCountries: chatgptAllowedCountriesSchema.describe("Availability: all supported countries, or an allow-list / block-list of specific ones (ISO alpha-2)."),
|
|
278
933
|
releaseNotes: z.string().describe("Publicly displayed on the app details page.")
|
|
279
934
|
});
|
|
280
935
|
chatgptSubmissionFormDataSchema.pick({
|
|
@@ -291,7 +946,7 @@ chatgptSubmissionFormDataSchema.pick({
|
|
|
291
946
|
testCases: true,
|
|
292
947
|
negativeTestCases: true,
|
|
293
948
|
toolJustifications: true
|
|
294
|
-
});
|
|
949
|
+
}).extend({ tagline: clampStringField(chatgptSubmissionFormDataSchema.shape.tagline) });
|
|
295
950
|
const claudeCategorySchema = z.enum([
|
|
296
951
|
"Business & Productivity",
|
|
297
952
|
"Communication",
|
|
@@ -303,7 +958,7 @@ const claudeCategorySchema = z.enum([
|
|
|
303
958
|
"Media & Entertainment",
|
|
304
959
|
"Commerce & Shopping"
|
|
305
960
|
]);
|
|
306
|
-
z.enum([
|
|
961
|
+
const claudeAuthenticationSchema = z.enum([
|
|
307
962
|
"No auth needed",
|
|
308
963
|
"OAuth 2.0",
|
|
309
964
|
"Custom URL"
|
|
@@ -311,28 +966,34 @@ z.enum([
|
|
|
311
966
|
const claudeMcpUrlTypeSchema = z.enum(["Universal URL", "Custom MCP URLs"]);
|
|
312
967
|
z.enum(["Static OAuth Client", "Dynamic OAuth Client (DCR / CIMD)"]);
|
|
313
968
|
const claudeReadWriteCapabilitiesSchema = z.enum([
|
|
314
|
-
"Read
|
|
315
|
-
"Write
|
|
316
|
-
"Read +
|
|
969
|
+
"Read Only",
|
|
970
|
+
"Write Only",
|
|
971
|
+
"Read + Write"
|
|
317
972
|
]);
|
|
318
973
|
const claudeTransportSchema = z.enum(["Streamable HTTP", "SSE"]);
|
|
974
|
+
const claudeTestedSurfaceSchema = z.enum([
|
|
975
|
+
"Claude.ai (web)",
|
|
976
|
+
"Claude Desktop",
|
|
977
|
+
"Claude Code",
|
|
978
|
+
"Cowork"
|
|
979
|
+
]);
|
|
319
980
|
const claudeThirdPartySchema = z.enum([
|
|
320
|
-
"Web access
|
|
321
|
-
"Third-party AI model integration",
|
|
322
|
-
"Third-party data retrieval (
|
|
323
|
-
"Third-party data modification (
|
|
981
|
+
"Web access: Fetches information from the open web (e.g., web scraping, search engines, or browsing arbitrary URLs, not just connecting to a specific API)",
|
|
982
|
+
"Third-party AI model integration: Sends data to or receives data from a generative AI model other than Claude",
|
|
983
|
+
"Third-party data retrieval: Connects to external services that themselves retrieve data from other sources (e.g., workflow automation platforms or other services that aggregate or relay data from multiple third-party sources)",
|
|
984
|
+
"Third-party data modification: Can connect to external services that themselves create, update, or delete data in other sources (e.g., workflow automation platforms or other services that write to multiple third-party sources)",
|
|
324
985
|
"N/A"
|
|
325
986
|
]);
|
|
326
987
|
const claudeDataHandlingSchema = z.enum([
|
|
327
988
|
"Server only accesses data explicitly requested by user",
|
|
328
989
|
"No data is stored beyond session requirements",
|
|
329
|
-
"Data transmission is encrypted (HTTPS
|
|
990
|
+
"Data transmission is encrypted (HTTPS/TLS)",
|
|
330
991
|
"GDPR compliant (if applicable)"
|
|
331
992
|
]);
|
|
332
993
|
const claudeSponsoredContentSchema = z.enum([
|
|
333
994
|
"No, there is no sponsored content or advertisements",
|
|
334
995
|
"Yes, there are banner ads or other paid visual elements",
|
|
335
|
-
"Yes, returned content or ranking is impacted by sponsorship or ad placement"
|
|
996
|
+
"Yes, the returned content or ranking of returned content is impacted by sponsorship or ad placement"
|
|
336
997
|
]);
|
|
337
998
|
/**
|
|
338
999
|
* Field order mirrors the Claude (Anthropic) submission spreadsheet, grouped by section.
|
|
@@ -397,7 +1058,7 @@ If 'Yes', you will also be required to provide screenshots of your UI (see Promo
|
|
|
397
1058
|
Note: These are attestations — you are legally agreeing to these practices by submitting the form.`),
|
|
398
1059
|
personalDataHealthAccess: z.boolean().describe(`Select 'Yes' ONLY if your connector gives users access to their own personal health information — such as medical records, lab results, diagnoses, prescriptions, wearable health metrics (heart rate, sleep data, etc.), or mental health data.
|
|
399
1060
|
Select 'No' for the vast majority of business/productivity/dev tools. When in doubt, select 'No'. This field triggers additional compliance review if 'Yes'.`),
|
|
400
|
-
|
|
1061
|
+
category: claudeCategorySchema.describe(`Select the category that best describes your connector. This determines where it appears in the directory's browse experience. Choose the most specific fit:
|
|
401
1062
|
• Business & Productivity — project management, CRM, HR, office tools
|
|
402
1063
|
• Communication — email, chat, messaging, notifications
|
|
403
1064
|
• Data & Analytics — dashboards, reporting, databases, BI tools
|
|
@@ -407,12 +1068,13 @@ Select 'No' for the vast majority of business/productivity/dev tools. When in do
|
|
|
407
1068
|
• Health & Life Sciences — clinical, pharma, medical professional tools
|
|
408
1069
|
• Media & Entertainment — content, publishing, streaming
|
|
409
1070
|
• Commerce & Shopping — e-commerce, inventory, orders
|
|
410
|
-
|
|
1071
|
+
Anthropic's submission form only accepts a single category.`),
|
|
411
1072
|
sponsoredContentsOrAdvertisement: claudeSponsoredContentSchema.describe(`Be honest here — advertising is not permitted in the Connectors Directory per Anthropic's policy. Select the option that accurately describes your server:
|
|
412
1073
|
• 'No, there is no sponsored content or advertisements' — the results your server returns are not influenced by paid placement or sponsorship. This is what almost all connectors should select.
|
|
413
1074
|
• 'Yes, there are banner ads or other paid visual elements' — your UI includes visual ads. NOTE: this will likely lead to rejection, as Anthropic prohibits advertising in Claude.
|
|
414
1075
|
• 'Yes, the returned content or ranking of returned content is impacted by sponsorship or ad placement' — paid results affect what you return. NOTE: this also likely leads to rejection.
|
|
415
1076
|
If your server returns organic results from a platform that has ads in its own UI (but your API results are not affected by ads), select 'No'.`),
|
|
1077
|
+
authentication: claudeAuthenticationSchema.describe("How users authenticate with the server. No auth / OAuth 2.0 / Custom URL (not supported)."),
|
|
416
1078
|
transportSupport: z.array(claudeTransportSchema).describe(`Select all transport protocols your server supports:
|
|
417
1079
|
• 'Streamable HTTP' — the modern, recommended transport. Anthropic strongly recommends implementing this. This is the future-proof option and should be your default.
|
|
418
1080
|
• 'SSE (Server-Sent Events)' — the older transport. SSE may be deprecated by Anthropic later in 2025/2026. If you currently only support SSE, you should plan to migrate to Streamable HTTP.
|
|
@@ -452,19 +1114,21 @@ Reviewers test every single tool you list here — don't list tools that don't w
|
|
|
452
1114
|
• 'I've specified user-friendly titles for all tools' — every tool has a 'title' annotation (a human-readable label, different from the tool name).
|
|
453
1115
|
• 'I've specified accurate tool annotations for all tools' — every tool has the correct annotation: readOnlyHint: true for read operations (search, get, list, fetch), OR destructiveHint: true for write operations (create, update, delete, send).
|
|
454
1116
|
This is the #1 reason submissions get rejected (30% of all rejections). Do not check these boxes without actually having implemented the annotations. See MCP spec for how to add them.`),
|
|
455
|
-
|
|
1117
|
+
testedSurfaces: z.array(claudeTestedSurfaceSchema).describe(`Confirm testing is complete and your server works as intended in these surfaces. Select every surface you've verified. Claude.ai (web) and Claude Desktop are the usual targets for remote MCP servers; Claude Code and Cowork compatibility is not required. Anthropic requires at least two surfaces.`),
|
|
1118
|
+
logoLight: z.string().describe(`Your connector's logo for light backgrounds. Requirements:
|
|
456
1119
|
• Format: SVG only
|
|
457
1120
|
• Aspect ratio: square (1:1)
|
|
458
|
-
• Should work on
|
|
1121
|
+
• Should work on a light background
|
|
459
1122
|
• Provide via URL (Google Drive link is fine) or upload directly
|
|
460
1123
|
Tip: use a simple, recognizable icon — not a full wordmark. The logo appears at small sizes in the directory grid.`),
|
|
461
|
-
|
|
1124
|
+
logoDark: z.string().optional().describe(`Optional dark-mode variant of the connector logo. Same specs as the light variant (SVG, square 1:1) but designed to read on a dark background. Leave empty if the light logo already works on dark.`),
|
|
1125
|
+
screenshots: z.array(screenshotEntrySchema).describe(`Screenshots or promotional images of your connector in action within Claude. Strongly recommended for all connectors, and required for MCP Apps (interactive UI). Guidelines:
|
|
462
1126
|
• 3–5 images is ideal
|
|
463
1127
|
• Minimum 1000px width, PNG format preferred
|
|
1128
|
+
• Each screenshot is paired with the user prompt that produced it
|
|
464
1129
|
• Crop to just the relevant part of the Claude interface (the tool response area)
|
|
465
1130
|
• Show your connector doing something impressive and useful — real data, real results
|
|
466
1131
|
• If you're an MCP App, include screenshots of your interactive UI elements
|
|
467
|
-
• Videos are also welcome
|
|
468
1132
|
These images appear in your directory listing and are a key factor in driving user installs.`)
|
|
469
1133
|
});
|
|
470
1134
|
claudeSubmissionFormDataSchema.pick({
|
|
@@ -477,14 +1141,20 @@ claudeSubmissionFormDataSchema.pick({
|
|
|
477
1141
|
isMcpApp: true,
|
|
478
1142
|
transportSupport: true,
|
|
479
1143
|
primaryContactEmail: true,
|
|
480
|
-
primaryContactName: true
|
|
1144
|
+
primaryContactName: true,
|
|
1145
|
+
authentication: true,
|
|
1146
|
+
personalDataHealthAccess: true,
|
|
1147
|
+
testedSurfaces: true
|
|
1148
|
+
}).extend({
|
|
1149
|
+
connectionRequirements: claudeSubmissionFormDataSchema.shape.connectionRequirements.optional(),
|
|
1150
|
+
testingCredentials: claudeSubmissionFormDataSchema.shape.testingCredentials.optional()
|
|
481
1151
|
});
|
|
482
1152
|
claudeSubmissionFormDataSchema.pick({
|
|
483
1153
|
tagline: true,
|
|
484
1154
|
description: true,
|
|
485
|
-
|
|
1155
|
+
category: true,
|
|
486
1156
|
testCases: true
|
|
487
|
-
});
|
|
1157
|
+
}).extend({ tagline: clampStringField(claudeSubmissionFormDataSchema.shape.tagline) });
|
|
488
1158
|
const submissionMetaFieldsSchema = z.object({
|
|
489
1159
|
id: z.string(),
|
|
490
1160
|
environmentId: z.string(),
|
|
@@ -507,6 +1177,22 @@ const subscriptionPlanSchema = z.enum([
|
|
|
507
1177
|
"enterprise"
|
|
508
1178
|
]);
|
|
509
1179
|
z.object({ plan: subscriptionPlanSchema.nullable() });
|
|
1180
|
+
const customerCreditsSchema = z.object({
|
|
1181
|
+
balanceInCents: z.number(),
|
|
1182
|
+
expiresAt: z.number().nullable(),
|
|
1183
|
+
currency: z.string()
|
|
1184
|
+
});
|
|
1185
|
+
const customerUsageSchema = z.object({
|
|
1186
|
+
amountInCents: z.number(),
|
|
1187
|
+
currency: z.string(),
|
|
1188
|
+
periodEnd: z.number()
|
|
1189
|
+
});
|
|
1190
|
+
const partnerDiscountSchema = z.object({ endsAt: z.number() });
|
|
1191
|
+
z.object({
|
|
1192
|
+
customerCredits: customerCreditsSchema.nullable(),
|
|
1193
|
+
customerUsage: customerUsageSchema.nullable(),
|
|
1194
|
+
partnerDiscount: partnerDiscountSchema.nullable()
|
|
1195
|
+
});
|
|
510
1196
|
//#endregion
|
|
511
1197
|
//#region src/schemas.ts
|
|
512
1198
|
const RESERVED_KEYS = [
|
|
@@ -647,7 +1333,7 @@ const createEnvironmentContractV1 = oc.route({
|
|
|
647
1333
|
id: z.string(),
|
|
648
1334
|
name: z.string(),
|
|
649
1335
|
sourceBranch: z.string().nullable().describe("The branch used to build the environment"),
|
|
650
|
-
urls: z.array(z.
|
|
1336
|
+
urls: z.array(z.url()).describe("The URLs of the MCP server"),
|
|
651
1337
|
createdAt: z.coerce.date(),
|
|
652
1338
|
projectId: z.string().describe("The ID of the project the environment belongs to")
|
|
653
1339
|
}));
|
|
@@ -723,6 +1409,9 @@ const listProjectsContractV1 = oc.route({
|
|
|
723
1409
|
description: "List all projects for a team",
|
|
724
1410
|
tags: ["projects"],
|
|
725
1411
|
successDescription: "The list of projects"
|
|
1412
|
+
}).errors({
|
|
1413
|
+
NOT_FOUND: {},
|
|
1414
|
+
BAD_REQUEST: {}
|
|
726
1415
|
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
|
|
727
1416
|
const createProjectContractV1 = oc.route({
|
|
728
1417
|
path: "/v1/projects",
|
|
@@ -818,7 +1507,10 @@ const deleteEnvironmentVariableContractV1 = oc.route({
|
|
|
818
1507
|
description: "Delete an environment variable by ID",
|
|
819
1508
|
tags: ["environments"],
|
|
820
1509
|
successDescription: "The environment variable has been deleted successfully"
|
|
821
|
-
}).errors({
|
|
1510
|
+
}).errors({
|
|
1511
|
+
NOT_FOUND: {},
|
|
1512
|
+
BAD_REQUEST: {}
|
|
1513
|
+
}).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
|
|
822
1514
|
const deleteProjectContractV1 = oc.route({
|
|
823
1515
|
path: "/v1/projects/{projectId}",
|
|
824
1516
|
method: "DELETE",
|
|
@@ -863,6 +1555,9 @@ const uploadDeploymentArtifactContractV1 = oc.route({
|
|
|
863
1555
|
description: "Return a presigned S3 URL to upload a deployment artifact",
|
|
864
1556
|
tags: ["deployments"],
|
|
865
1557
|
successDescription: "The presigned upload URL has been generated successfully"
|
|
1558
|
+
}).errors({
|
|
1559
|
+
NOT_FOUND: {},
|
|
1560
|
+
BAD_REQUEST: {}
|
|
866
1561
|
}).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
|
|
867
1562
|
uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
|
|
868
1563
|
token: z.string().describe("Token to identify the source archive"),
|
|
@@ -1036,7 +1731,7 @@ const getTunnelTicketContractV1 = oc.route({
|
|
|
1036
1731
|
description: "Get a signed ticket for establishing a tunnel connection. Requires user authentication (API keys are not supported).",
|
|
1037
1732
|
tags: ["tunnels"],
|
|
1038
1733
|
successDescription: "The tunnel ticket"
|
|
1039
|
-
}).output(z.object({
|
|
1734
|
+
}).errors({ FORBIDDEN: {} }).output(z.object({
|
|
1040
1735
|
subdomain: z.string().describe("The subdomain assigned to the user"),
|
|
1041
1736
|
ticket: z.string().describe("The signed tunnel ticket"),
|
|
1042
1737
|
tunnelHost: z.string().describe("The tunnel host to connect to")
|
|
@@ -1112,7 +1807,7 @@ const upsertPlaygroundContractV1 = oc.route({
|
|
|
1112
1807
|
name: z.string().min(1).max(100).optional(),
|
|
1113
1808
|
description: z.string().min(1).max(500).optional(),
|
|
1114
1809
|
headers: z.array(playgroundHeaderSchema).optional(),
|
|
1115
|
-
examplePrompts: z.array(playgroundExamplePromptSchema).max(
|
|
1810
|
+
examplePrompts: z.array(playgroundExamplePromptSchema).max(5).optional()
|
|
1116
1811
|
})).output(playgroundOutputSchema);
|
|
1117
1812
|
const createBeaconContractV1 = oc.route({
|
|
1118
1813
|
path: "/v1/beacon/audits",
|