@alpic-ai/api 0.0.0-staging.g76333f3 → 0.0.0-staging.g8070cca
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 +19 -14
- package/dist/index.mjs +517 -37
- package/package.json +1 -10
package/dist/index.d.mts
CHANGED
|
@@ -212,7 +212,7 @@ declare const contract: {
|
|
|
212
212
|
name: z.ZodString;
|
|
213
213
|
sourceBranch: z.ZodNullable<z.ZodString>;
|
|
214
214
|
mcpServerUrl: z.ZodString;
|
|
215
|
-
domains: z.ZodArray<z.
|
|
215
|
+
domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
|
|
216
216
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
217
217
|
projectId: z.ZodString;
|
|
218
218
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
@@ -831,6 +831,9 @@ declare const contract: {
|
|
|
831
831
|
}, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
|
|
832
832
|
NOT_FOUND: {};
|
|
833
833
|
BAD_REQUEST: {};
|
|
834
|
+
DNS_RESOLUTION_FAILED: {
|
|
835
|
+
status: number;
|
|
836
|
+
};
|
|
834
837
|
}>, Record<never, never>>;
|
|
835
838
|
};
|
|
836
839
|
get: {
|
|
@@ -935,7 +938,22 @@ declare const platformSchema: z.ZodEnum<{
|
|
|
935
938
|
type Platform = z.infer<typeof platformSchema>;
|
|
936
939
|
declare const PLATFORM_LABELS: Record<Platform, string>;
|
|
937
940
|
//#endregion
|
|
941
|
+
//#region ../domains/src/projects/schemas.d.ts
|
|
942
|
+
declare const runtimeSchema: z.ZodEnum<{
|
|
943
|
+
"python3.13": "python3.13";
|
|
944
|
+
"python3.14": "python3.14";
|
|
945
|
+
node22: "node22";
|
|
946
|
+
node24: "node24";
|
|
947
|
+
}>;
|
|
948
|
+
declare const transportSchema: z.ZodEnum<{
|
|
949
|
+
stdio: "stdio";
|
|
950
|
+
sse: "sse";
|
|
951
|
+
streamablehttp: "streamablehttp";
|
|
952
|
+
}>;
|
|
953
|
+
//#endregion
|
|
938
954
|
//#region src/schemas.d.ts
|
|
955
|
+
type Runtime = z.infer<typeof runtimeSchema>;
|
|
956
|
+
type Transport = z.infer<typeof transportSchema>;
|
|
939
957
|
declare const environmentVariableSchema: z.ZodObject<{
|
|
940
958
|
key: z.ZodString;
|
|
941
959
|
value: z.ZodString;
|
|
@@ -957,19 +975,6 @@ declare const buildSettingsSchema: z.ZodObject<{
|
|
|
957
975
|
buildOutputDir: z.ZodOptional<z.ZodString>;
|
|
958
976
|
startCommand: z.ZodOptional<z.ZodString>;
|
|
959
977
|
}, z.core.$strip>;
|
|
960
|
-
declare const runtimeSchema: z.ZodEnum<{
|
|
961
|
-
"python3.13": "python3.13";
|
|
962
|
-
"python3.14": "python3.14";
|
|
963
|
-
node22: "node22";
|
|
964
|
-
node24: "node24";
|
|
965
|
-
}>;
|
|
966
|
-
type Runtime = z.infer<typeof runtimeSchema>;
|
|
967
|
-
declare const transportSchema: z.ZodEnum<{
|
|
968
|
-
stdio: "stdio";
|
|
969
|
-
sse: "sse";
|
|
970
|
-
streamablehttp: "streamablehttp";
|
|
971
|
-
}>;
|
|
972
|
-
type Transport = z.infer<typeof transportSchema>;
|
|
973
978
|
declare const playgroundHeaderSchema: z.ZodObject<{
|
|
974
979
|
name: z.ZodString;
|
|
975
980
|
description: z.ZodString;
|
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(),
|
|
@@ -92,6 +380,86 @@ z.object({
|
|
|
92
380
|
content: z.string(),
|
|
93
381
|
source: z.enum(["model", "user"])
|
|
94
382
|
});
|
|
383
|
+
const intentCategoryColorSchema = z.enum([
|
|
384
|
+
"red",
|
|
385
|
+
"orange",
|
|
386
|
+
"yellow",
|
|
387
|
+
"green",
|
|
388
|
+
"blue",
|
|
389
|
+
"purple",
|
|
390
|
+
"pink",
|
|
391
|
+
"gray"
|
|
392
|
+
]);
|
|
393
|
+
intentCategoryColorSchema.options;
|
|
394
|
+
const intentCategorySchema = z.object({
|
|
395
|
+
id: z.string(),
|
|
396
|
+
createdAt: z.coerce.date(),
|
|
397
|
+
environmentId: z.string(),
|
|
398
|
+
name: z.string(),
|
|
399
|
+
color: intentCategoryColorSchema
|
|
400
|
+
});
|
|
401
|
+
z.object({
|
|
402
|
+
id: z.string(),
|
|
403
|
+
name: z.string(),
|
|
404
|
+
color: intentCategoryColorSchema,
|
|
405
|
+
intentCount: z.number().int().nonnegative()
|
|
406
|
+
});
|
|
407
|
+
z.object({
|
|
408
|
+
id: z.string(),
|
|
409
|
+
createdAt: z.coerce.date(),
|
|
410
|
+
environmentId: z.string(),
|
|
411
|
+
toolName: z.string(),
|
|
412
|
+
message: z.string(),
|
|
413
|
+
categories: z.array(intentCategorySchema)
|
|
414
|
+
});
|
|
415
|
+
const signalCategorySchema = z.object({
|
|
416
|
+
id: z.string(),
|
|
417
|
+
name: z.string(),
|
|
418
|
+
color: intentCategoryColorSchema
|
|
419
|
+
});
|
|
420
|
+
z.discriminatedUnion("kind", [
|
|
421
|
+
z.object({
|
|
422
|
+
kind: z.literal("new"),
|
|
423
|
+
category: signalCategorySchema,
|
|
424
|
+
currentCount: z.number().int().nonnegative(),
|
|
425
|
+
currentShare: z.number()
|
|
426
|
+
}),
|
|
427
|
+
z.object({
|
|
428
|
+
kind: z.literal("resurging"),
|
|
429
|
+
category: signalCategorySchema,
|
|
430
|
+
currentCount: z.number().int().nonnegative(),
|
|
431
|
+
daysQuiet: z.number(),
|
|
432
|
+
currentShare: z.number()
|
|
433
|
+
}),
|
|
434
|
+
z.object({
|
|
435
|
+
kind: z.literal("spike"),
|
|
436
|
+
category: signalCategorySchema,
|
|
437
|
+
currentCount: z.number().int().nonnegative(),
|
|
438
|
+
previousCount: z.number().int().nonnegative(),
|
|
439
|
+
currentShare: z.number(),
|
|
440
|
+
previousShare: z.number(),
|
|
441
|
+
changeRatio: z.number()
|
|
442
|
+
}),
|
|
443
|
+
z.object({
|
|
444
|
+
kind: z.literal("declining"),
|
|
445
|
+
category: signalCategorySchema,
|
|
446
|
+
currentCount: z.number().int().nonnegative(),
|
|
447
|
+
previousCount: z.number().int().nonnegative(),
|
|
448
|
+
currentShare: z.number(),
|
|
449
|
+
previousShare: z.number(),
|
|
450
|
+
changeRatio: z.number()
|
|
451
|
+
})
|
|
452
|
+
]);
|
|
453
|
+
z.discriminatedUnion("kind", [z.object({
|
|
454
|
+
kind: z.literal("existing"),
|
|
455
|
+
categoryId: z.string(),
|
|
456
|
+
categoryName: z.string(),
|
|
457
|
+
intentIds: z.array(z.string())
|
|
458
|
+
}), z.object({
|
|
459
|
+
kind: z.literal("new"),
|
|
460
|
+
categoryName: z.string(),
|
|
461
|
+
intentIds: z.array(z.string())
|
|
462
|
+
})]);
|
|
95
463
|
z.object({
|
|
96
464
|
id: z.string(),
|
|
97
465
|
teamId: z.string(),
|
|
@@ -100,6 +468,93 @@ z.object({
|
|
|
100
468
|
createdAt: z.coerce.date(),
|
|
101
469
|
updatedAt: z.coerce.date()
|
|
102
470
|
});
|
|
471
|
+
z.enum([
|
|
472
|
+
"INFO",
|
|
473
|
+
"WARNING",
|
|
474
|
+
"DEBUG",
|
|
475
|
+
"ERROR"
|
|
476
|
+
]);
|
|
477
|
+
const runtimeSchema = z.enum([
|
|
478
|
+
"python3.13",
|
|
479
|
+
"python3.14",
|
|
480
|
+
"node22",
|
|
481
|
+
"node24"
|
|
482
|
+
]);
|
|
483
|
+
const transportSchema = z.enum([
|
|
484
|
+
"stdio",
|
|
485
|
+
"sse",
|
|
486
|
+
"streamablehttp"
|
|
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
|
+
};
|
|
103
558
|
const toolDefinitionSchema = z.object({
|
|
104
559
|
name: z.string(),
|
|
105
560
|
title: z.string().optional().describe("Human-friendly name for the tool, used in the UI. If not provided, `name` will be used."),
|
|
@@ -117,6 +572,10 @@ const positiveTestCaseSchema = z.object({
|
|
|
117
572
|
toolTriggered: z.string().optional(),
|
|
118
573
|
expectedOutput: z.string().optional()
|
|
119
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.");
|
|
120
579
|
/** Accepts either a valid email or URL. */
|
|
121
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" });
|
|
122
581
|
const chatgptCategorySchema = z.enum([
|
|
@@ -157,7 +616,7 @@ const chatgptTranslationSchema = z.object({
|
|
|
157
616
|
*/
|
|
158
617
|
const chatgptSubmissionFormDataSchema = z.object({
|
|
159
618
|
logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
|
|
160
|
-
logoDark: z.string().describe("
|
|
619
|
+
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."),
|
|
161
620
|
appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
|
|
162
621
|
tagline: z.string().max(30).describe("Plain-language phrase focused on function and user value. 30 chars max."),
|
|
163
622
|
description: z.string().describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
|
|
@@ -175,7 +634,7 @@ const chatgptSubmissionFormDataSchema = z.object({
|
|
|
175
634
|
toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values."),
|
|
176
635
|
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."),
|
|
177
636
|
negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases — prompts where the app should NOT trigger but the model might think it's relevant."),
|
|
178
|
-
screenshots: z.array(
|
|
637
|
+
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."),
|
|
179
638
|
translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
|
|
180
639
|
allowedCountries: chatgptAllowedCountriesSchema.describe("'Allow all' or restrict to a specific list. See OpenAI's supported countries list."),
|
|
181
640
|
releaseNotes: z.string().describe("Publicly displayed on the app details page.")
|
|
@@ -194,7 +653,7 @@ chatgptSubmissionFormDataSchema.pick({
|
|
|
194
653
|
testCases: true,
|
|
195
654
|
negativeTestCases: true,
|
|
196
655
|
toolJustifications: true
|
|
197
|
-
});
|
|
656
|
+
}).extend({ tagline: clampStringField(chatgptSubmissionFormDataSchema.shape.tagline) });
|
|
198
657
|
const claudeCategorySchema = z.enum([
|
|
199
658
|
"Business & Productivity",
|
|
200
659
|
"Communication",
|
|
@@ -206,7 +665,7 @@ const claudeCategorySchema = z.enum([
|
|
|
206
665
|
"Media & Entertainment",
|
|
207
666
|
"Commerce & Shopping"
|
|
208
667
|
]);
|
|
209
|
-
z.enum([
|
|
668
|
+
const claudeAuthenticationSchema = z.enum([
|
|
210
669
|
"No auth needed",
|
|
211
670
|
"OAuth 2.0",
|
|
212
671
|
"Custom URL"
|
|
@@ -214,28 +673,34 @@ z.enum([
|
|
|
214
673
|
const claudeMcpUrlTypeSchema = z.enum(["Universal URL", "Custom MCP URLs"]);
|
|
215
674
|
z.enum(["Static OAuth Client", "Dynamic OAuth Client (DCR / CIMD)"]);
|
|
216
675
|
const claudeReadWriteCapabilitiesSchema = z.enum([
|
|
217
|
-
"Read
|
|
218
|
-
"Write
|
|
219
|
-
"Read +
|
|
676
|
+
"Read Only",
|
|
677
|
+
"Write Only",
|
|
678
|
+
"Read + Write"
|
|
220
679
|
]);
|
|
221
680
|
const claudeTransportSchema = z.enum(["Streamable HTTP", "SSE"]);
|
|
681
|
+
const claudeTestedSurfaceSchema = z.enum([
|
|
682
|
+
"Claude.ai (web)",
|
|
683
|
+
"Claude Desktop",
|
|
684
|
+
"Claude Code",
|
|
685
|
+
"Cowork"
|
|
686
|
+
]);
|
|
222
687
|
const claudeThirdPartySchema = z.enum([
|
|
223
|
-
"Web access
|
|
224
|
-
"Third-party AI model integration",
|
|
225
|
-
"Third-party data retrieval (
|
|
226
|
-
"Third-party data modification (
|
|
688
|
+
"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)",
|
|
689
|
+
"Third-party AI model integration: Sends data to or receives data from a generative AI model other than Claude",
|
|
690
|
+
"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)",
|
|
691
|
+
"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)",
|
|
227
692
|
"N/A"
|
|
228
693
|
]);
|
|
229
694
|
const claudeDataHandlingSchema = z.enum([
|
|
230
695
|
"Server only accesses data explicitly requested by user",
|
|
231
696
|
"No data is stored beyond session requirements",
|
|
232
|
-
"Data transmission is encrypted (HTTPS
|
|
697
|
+
"Data transmission is encrypted (HTTPS/TLS)",
|
|
233
698
|
"GDPR compliant (if applicable)"
|
|
234
699
|
]);
|
|
235
700
|
const claudeSponsoredContentSchema = z.enum([
|
|
236
701
|
"No, there is no sponsored content or advertisements",
|
|
237
702
|
"Yes, there are banner ads or other paid visual elements",
|
|
238
|
-
"Yes, returned content or ranking is impacted by sponsorship or ad placement"
|
|
703
|
+
"Yes, the returned content or ranking of returned content is impacted by sponsorship or ad placement"
|
|
239
704
|
]);
|
|
240
705
|
/**
|
|
241
706
|
* Field order mirrors the Claude (Anthropic) submission spreadsheet, grouped by section.
|
|
@@ -300,7 +765,7 @@ If 'Yes', you will also be required to provide screenshots of your UI (see Promo
|
|
|
300
765
|
Note: These are attestations — you are legally agreeing to these practices by submitting the form.`),
|
|
301
766
|
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.
|
|
302
767
|
Select 'No' for the vast majority of business/productivity/dev tools. When in doubt, select 'No'. This field triggers additional compliance review if 'Yes'.`),
|
|
303
|
-
|
|
768
|
+
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:
|
|
304
769
|
• Business & Productivity — project management, CRM, HR, office tools
|
|
305
770
|
• Communication — email, chat, messaging, notifications
|
|
306
771
|
• Data & Analytics — dashboards, reporting, databases, BI tools
|
|
@@ -310,12 +775,13 @@ Select 'No' for the vast majority of business/productivity/dev tools. When in do
|
|
|
310
775
|
• Health & Life Sciences — clinical, pharma, medical professional tools
|
|
311
776
|
• Media & Entertainment — content, publishing, streaming
|
|
312
777
|
• Commerce & Shopping — e-commerce, inventory, orders
|
|
313
|
-
|
|
778
|
+
Anthropic's submission form only accepts a single category.`),
|
|
314
779
|
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:
|
|
315
780
|
• '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.
|
|
316
781
|
• '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.
|
|
317
782
|
• '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.
|
|
318
783
|
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'.`),
|
|
784
|
+
authentication: claudeAuthenticationSchema.describe("How users authenticate with the server. No auth / OAuth 2.0 / Custom URL (not supported)."),
|
|
319
785
|
transportSupport: z.array(claudeTransportSchema).describe(`Select all transport protocols your server supports:
|
|
320
786
|
• 'Streamable HTTP' — the modern, recommended transport. Anthropic strongly recommends implementing this. This is the future-proof option and should be your default.
|
|
321
787
|
• '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.
|
|
@@ -355,19 +821,21 @@ Reviewers test every single tool you list here — don't list tools that don't w
|
|
|
355
821
|
• 'I've specified user-friendly titles for all tools' — every tool has a 'title' annotation (a human-readable label, different from the tool name).
|
|
356
822
|
• '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).
|
|
357
823
|
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.`),
|
|
358
|
-
|
|
824
|
+
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.`),
|
|
825
|
+
logoLight: z.string().describe(`Your connector's logo for light backgrounds. Requirements:
|
|
359
826
|
• Format: SVG only
|
|
360
827
|
• Aspect ratio: square (1:1)
|
|
361
|
-
• Should work on
|
|
828
|
+
• Should work on a light background
|
|
362
829
|
• Provide via URL (Google Drive link is fine) or upload directly
|
|
363
830
|
Tip: use a simple, recognizable icon — not a full wordmark. The logo appears at small sizes in the directory grid.`),
|
|
364
|
-
|
|
831
|
+
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.`),
|
|
832
|
+
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:
|
|
365
833
|
• 3–5 images is ideal
|
|
366
834
|
• Minimum 1000px width, PNG format preferred
|
|
835
|
+
• Each screenshot is paired with the user prompt that produced it
|
|
367
836
|
• Crop to just the relevant part of the Claude interface (the tool response area)
|
|
368
837
|
• Show your connector doing something impressive and useful — real data, real results
|
|
369
838
|
• If you're an MCP App, include screenshots of your interactive UI elements
|
|
370
|
-
• Videos are also welcome
|
|
371
839
|
These images appear in your directory listing and are a key factor in driving user installs.`)
|
|
372
840
|
});
|
|
373
841
|
claudeSubmissionFormDataSchema.pick({
|
|
@@ -380,14 +848,20 @@ claudeSubmissionFormDataSchema.pick({
|
|
|
380
848
|
isMcpApp: true,
|
|
381
849
|
transportSupport: true,
|
|
382
850
|
primaryContactEmail: true,
|
|
383
|
-
primaryContactName: true
|
|
851
|
+
primaryContactName: true,
|
|
852
|
+
authentication: true,
|
|
853
|
+
personalDataHealthAccess: true,
|
|
854
|
+
testedSurfaces: true
|
|
855
|
+
}).extend({
|
|
856
|
+
connectionRequirements: claudeSubmissionFormDataSchema.shape.connectionRequirements.optional(),
|
|
857
|
+
testingCredentials: claudeSubmissionFormDataSchema.shape.testingCredentials.optional()
|
|
384
858
|
});
|
|
385
859
|
claudeSubmissionFormDataSchema.pick({
|
|
386
860
|
tagline: true,
|
|
387
861
|
description: true,
|
|
388
|
-
|
|
862
|
+
category: true,
|
|
389
863
|
testCases: true
|
|
390
|
-
});
|
|
864
|
+
}).extend({ tagline: clampStringField(claudeSubmissionFormDataSchema.shape.tagline) });
|
|
391
865
|
const submissionMetaFieldsSchema = z.object({
|
|
392
866
|
id: z.string(),
|
|
393
867
|
environmentId: z.string(),
|
|
@@ -410,6 +884,22 @@ const subscriptionPlanSchema = z.enum([
|
|
|
410
884
|
"enterprise"
|
|
411
885
|
]);
|
|
412
886
|
z.object({ plan: subscriptionPlanSchema.nullable() });
|
|
887
|
+
const customerCreditsSchema = z.object({
|
|
888
|
+
balanceInCents: z.number(),
|
|
889
|
+
expiresAt: z.number().nullable(),
|
|
890
|
+
currency: z.string()
|
|
891
|
+
});
|
|
892
|
+
const customerUsageSchema = z.object({
|
|
893
|
+
amountInCents: z.number(),
|
|
894
|
+
currency: z.string(),
|
|
895
|
+
periodEnd: z.number()
|
|
896
|
+
});
|
|
897
|
+
const partnerDiscountSchema = z.object({ endsAt: z.number() });
|
|
898
|
+
z.object({
|
|
899
|
+
customerCredits: customerCreditsSchema.nullable(),
|
|
900
|
+
customerUsage: customerUsageSchema.nullable(),
|
|
901
|
+
partnerDiscount: partnerDiscountSchema.nullable()
|
|
902
|
+
});
|
|
413
903
|
//#endregion
|
|
414
904
|
//#region src/schemas.ts
|
|
415
905
|
const RESERVED_KEYS = [
|
|
@@ -464,17 +954,6 @@ const buildSettingsSchema = z.object({
|
|
|
464
954
|
buildOutputDir: z.string().optional(),
|
|
465
955
|
startCommand: z.string().optional()
|
|
466
956
|
});
|
|
467
|
-
const runtimeSchema = z.enum([
|
|
468
|
-
"python3.13",
|
|
469
|
-
"python3.14",
|
|
470
|
-
"node22",
|
|
471
|
-
"node24"
|
|
472
|
-
]);
|
|
473
|
-
const transportSchema = z.enum([
|
|
474
|
-
"stdio",
|
|
475
|
-
"sse",
|
|
476
|
-
"streamablehttp"
|
|
477
|
-
]);
|
|
478
957
|
const playgroundHeaderSchema = z.object({
|
|
479
958
|
name: z.string().min(1).max(100),
|
|
480
959
|
description: z.string().max(200),
|
|
@@ -577,7 +1056,7 @@ const getEnvironmentContractV1 = oc.route({
|
|
|
577
1056
|
name: z.string(),
|
|
578
1057
|
sourceBranch: z.string().nullable(),
|
|
579
1058
|
mcpServerUrl: z.string(),
|
|
580
|
-
domains: z.array(z.
|
|
1059
|
+
domains: z.array(z.hostname()),
|
|
581
1060
|
createdAt: z.coerce.date(),
|
|
582
1061
|
projectId: z.string()
|
|
583
1062
|
}));
|
|
@@ -1026,7 +1505,7 @@ const upsertPlaygroundContractV1 = oc.route({
|
|
|
1026
1505
|
name: z.string().min(1).max(100).optional(),
|
|
1027
1506
|
description: z.string().min(1).max(500).optional(),
|
|
1028
1507
|
headers: z.array(playgroundHeaderSchema).optional(),
|
|
1029
|
-
examplePrompts: z.array(playgroundExamplePromptSchema).max(
|
|
1508
|
+
examplePrompts: z.array(playgroundExamplePromptSchema).max(5).optional()
|
|
1030
1509
|
})).output(playgroundOutputSchema);
|
|
1031
1510
|
const createBeaconContractV1 = oc.route({
|
|
1032
1511
|
path: "/v1/beacon/audits",
|
|
@@ -1037,7 +1516,8 @@ const createBeaconContractV1 = oc.route({
|
|
|
1037
1516
|
successDescription: "The audit has been created"
|
|
1038
1517
|
}).errors({
|
|
1039
1518
|
NOT_FOUND: {},
|
|
1040
|
-
BAD_REQUEST: {}
|
|
1519
|
+
BAD_REQUEST: {},
|
|
1520
|
+
DNS_RESOLUTION_FAILED: { status: 400 }
|
|
1041
1521
|
}).input(z.object({
|
|
1042
1522
|
targetUrl: z.url().describe("The HTTPS URL of the MCP server to audit"),
|
|
1043
1523
|
teamId: z.string().optional().describe("The team ID to associate the audit with"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/api",
|
|
3
|
-
"version": "0.0.0-staging.
|
|
3
|
+
"version": "0.0.0-staging.g8070cca",
|
|
4
4
|
"description": "Contract for the Alpic API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -14,15 +14,6 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
|
-
"nx": {
|
|
18
|
-
"targets": {
|
|
19
|
-
"build": {
|
|
20
|
-
"dependsOn": [
|
|
21
|
-
"^build"
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
17
|
"author": "Alpic",
|
|
27
18
|
"license": "ISC",
|
|
28
19
|
"dependencies": {
|