@alpic-ai/api 1.127.0 → 1.128.0

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 CHANGED
@@ -927,7 +927,7 @@ declare const contract: {
927
927
  type RouterInput = InferContractRouterInputs<typeof contract>;
928
928
  type RouterOutput = InferContractRouterOutputs<typeof contract>;
929
929
  //#endregion
930
- //#region ../domains/src/beacon/schemas.d.ts
930
+ //#region ../domains/src/platforms/schemas.d.ts
931
931
  declare const platformSchema: z.ZodEnum<{
932
932
  chatgpt: "chatgpt";
933
933
  claudeai: "claudeai";
package/dist/index.mjs CHANGED
@@ -1,18 +1,17 @@
1
1
  import { z } from "zod";
2
2
  import { oc } from "@orpc/contract";
3
3
  import ms from "ms";
4
- //#region ../domains/dist/index.mjs
4
+ const platformSchema = z.enum(["chatgpt", "claudeai"]);
5
+ const PLATFORM_LABELS = {
6
+ chatgpt: "ChatGPT",
7
+ claudeai: "Claude.ai"
8
+ };
5
9
  const auditStatusSchema = z.enum([
6
10
  "pending",
7
11
  "partial",
8
12
  "completed",
9
13
  "failed"
10
14
  ]);
11
- const platformSchema = z.enum(["chatgpt", "claudeai"]);
12
- const PLATFORM_LABELS = {
13
- chatgpt: "ChatGPT",
14
- claudeai: "Claude.ai"
15
- };
16
15
  const checkSeveritySchema = z.enum([
17
16
  "error",
18
17
  "warning",
@@ -72,6 +71,225 @@ const auditReportWithScreenshotsSchema = auditReportSchema.extend({ widgetScreen
72
71
  chatgpt: widgetScreenshotSchema.optional(),
73
72
  claudeai: widgetScreenshotSchema.optional()
74
73
  }) });
74
+ z.object({
75
+ id: z.string(),
76
+ createdAt: z.coerce.date(),
77
+ environmentId: z.string(),
78
+ content: z.string(),
79
+ source: z.enum(["model", "user"])
80
+ });
81
+ z.object({
82
+ content: z.string(),
83
+ source: z.enum(["model", "user"])
84
+ });
85
+ const toolDefinitionSchema = z.object({
86
+ name: z.string(),
87
+ title: z.string().optional(),
88
+ description: z.string().optional(),
89
+ annotations: z.object({
90
+ readOnlyHint: z.boolean().optional(),
91
+ destructiveHint: z.boolean().optional(),
92
+ openWorldHint: z.boolean().optional(),
93
+ idempotentHint: z.boolean().optional()
94
+ }).optional()
95
+ });
96
+ const positiveTestCaseSchema = z.object({
97
+ scenario: z.string(),
98
+ userPrompt: z.string(),
99
+ toolTriggered: z.string().optional(),
100
+ expectedOutput: z.string().optional()
101
+ }).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
102
+ /** Accepts either a valid email or URL. */
103
+ const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
104
+ const chatgptCategorySchema = z.enum([
105
+ "BUSINESS",
106
+ "COLLABORATION",
107
+ "DESIGN",
108
+ "DEVELOPER_TOOLS",
109
+ "EDUCATION",
110
+ "ENTERTAINMENT",
111
+ "FINANCE",
112
+ "FOOD",
113
+ "LIFESTYLE",
114
+ "NEWS",
115
+ "PRODUCTIVITY",
116
+ "SHOPPING",
117
+ "TRAVEL"
118
+ ]);
119
+ const chatgptAuthenticationSchema = z.enum(["No auth needed", "OAuth 2.0"]);
120
+ const chatgptAllowedCountriesSchema = z.enum(["Allow all", "Restrict to specific countries"]);
121
+ const negativeTestCaseSchema = z.object({
122
+ scenario: z.string(),
123
+ userPrompt: z.string()
124
+ }).partial().describe("Each case: Scenario + User prompt (the app should NOT trigger).");
125
+ const chatgptToolJustificationSchema = z.object({
126
+ toolName: z.string(),
127
+ readOnlyJustification: z.string(),
128
+ openWorldJustification: z.string(),
129
+ destructiveJustification: z.string()
130
+ }).describe("Per-tool justification of each MCP annotation value (one sentence per hint).");
131
+ const chatgptTranslationSchema = z.object({
132
+ locale: z.string(),
133
+ tagline: z.string().optional(),
134
+ description: z.string().optional()
135
+ }).describe("Locale-scoped override for tagline + description. English (US) is the default.");
136
+ /**
137
+ * Field order mirrors the ChatGPT (OpenAI) submission spreadsheet, grouped by section.
138
+ * When adding/removing/reordering fields, keep this in sync with the sheet.
139
+ */
140
+ const chatgptSubmissionFormDataSchema = z.object({
141
+ logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
142
+ logoDark: z.string().describe("Logo icon for dark mode. Square PNG. Same specs as the light icon."),
143
+ appName: z.string().describe("The name users will see in ChatGPT and in the Apps Directory."),
144
+ tagline: z.string().max(30).describe("Plain-language phrase focused on function and user value. 30 chars max."),
145
+ description: z.string().describe("Clear, engaging description highlighting what the app does and why people will love it. Appears publicly on the directory page."),
146
+ category: chatgptCategorySchema.describe("Category from the OpenAI taxonomy."),
147
+ developerName: z.string().describe("Developer name shown publicly on the app's directory page."),
148
+ companyUrl: z.url().describe("Your company's main website URL."),
149
+ supportChannel: supportChannelSchema.describe("Customer support URL or email address."),
150
+ privacyPolicyUrl: z.url().describe("URL to your privacy policy."),
151
+ termsOfServiceUrl: z.url().describe("URL to the app's terms of service."),
152
+ demoRecordingUrl: z.url().describe("URL to a video demonstrating the app, recorded via OpenAI Developer Mode. Cover all main use cases on web, iOS, and Android."),
153
+ appCommerceAndPurchasing: z.boolean().describe("Checkbox: 'My app links or directs users out of ChatGPT to make purchases.' Defaults to false. Verify the app does not offer digital goods."),
154
+ serverUrl: z.url().describe("URL of the MCP server."),
155
+ authentication: chatgptAuthenticationSchema.describe("OAuth 2.0 or No auth. OAuth configuration is auto-discovered from the MCP server's metadata."),
156
+ tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
157
+ toolJustifications: z.array(chatgptToolJustificationSchema).describe("Per-tool justification of `readOnlyHint`, `openWorldHint`, and `destructiveHint` annotation values."),
158
+ 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."),
159
+ negativeTestCases: z.array(negativeTestCaseSchema).describe("3 negative test cases — prompts where the app should NOT trigger but the model might think it's relevant."),
160
+ screenshots: z.array(z.url()).describe("URLs of in-app screenshots. Widget apps must show the widget UI; non-widget apps show the model response. Min 1, max 4. First three are public."),
161
+ translations: z.array(chatgptTranslationSchema).describe("Per-locale translation of tagline + description. English (US) is the default."),
162
+ allowedCountries: chatgptAllowedCountriesSchema.describe("'Allow all' or restrict to a specific list. See OpenAI's supported countries list."),
163
+ releaseNotes: z.string().describe("Publicly displayed on the app details page.")
164
+ });
165
+ chatgptSubmissionFormDataSchema.pick({
166
+ appName: true,
167
+ developerName: true,
168
+ serverUrl: true,
169
+ tools: true,
170
+ authentication: true
171
+ }).partial();
172
+ const claudeCategorySchema = z.enum([
173
+ "Business & Productivity",
174
+ "Communication",
175
+ "Data & Analytics",
176
+ "Development tools",
177
+ "Financial Services",
178
+ "Consumer Health",
179
+ "Health & Life Sciences",
180
+ "Media & Entertainment",
181
+ "Commerce & Shopping"
182
+ ]);
183
+ z.enum([
184
+ "No auth needed",
185
+ "OAuth 2.0",
186
+ "Custom URL"
187
+ ]);
188
+ const claudeMcpUrlTypeSchema = z.enum(["Universal URL", "Custom MCP URLs"]);
189
+ z.enum(["Static OAuth Client", "Dynamic OAuth Client (DCR / CIMD)"]);
190
+ const claudeReadWriteCapabilitiesSchema = z.enum([
191
+ "Read only",
192
+ "Write only",
193
+ "Read + write"
194
+ ]);
195
+ const claudeTransportSchema = z.enum(["Streamable HTTP", "SSE"]);
196
+ const claudeThirdPartySchema = z.enum([
197
+ "Web access (open web fetch / scraping / arbitrary URLs)",
198
+ "Third-party AI model integration",
199
+ "Third-party data retrieval (via workflow / aggregator)",
200
+ "Third-party data modification (via workflow / aggregator)",
201
+ "N/A"
202
+ ]);
203
+ const claudeDataHandlingSchema = z.enum([
204
+ "Server only accesses data explicitly requested by user",
205
+ "No data is stored beyond session requirements",
206
+ "Data transmission is encrypted (HTTPS / TLS)",
207
+ "GDPR compliant (if applicable)"
208
+ ]);
209
+ const claudeSponsoredContentSchema = z.enum([
210
+ "No, there is no sponsored content or advertisements",
211
+ "Yes, there are banner ads or other paid visual elements",
212
+ "Yes, returned content or ranking is impacted by sponsorship or ad placement"
213
+ ]);
214
+ /**
215
+ * Field order mirrors the Claude (Anthropic) submission spreadsheet, grouped by section.
216
+ * When adding/removing/reordering fields, keep this in sync with the sheet.
217
+ */
218
+ const claudeSubmissionFormDataSchema = z.object({
219
+ companyName: z.string().describe("Enter your company's legal name or the name under which your product is publicly known. This is used for internal tracking and may appear in directory listings."),
220
+ companyUrl: z.url().describe("Your company's main website URL, e.g. https://mycompany.com. Must be a valid URL with https://. This should be the root domain of the company behind this MCP server."),
221
+ primaryContactName: z.string().describe("Full name of the person Anthropic should contact about this submission. This person will receive review feedback, approval notices, and any follow-up questions."),
222
+ primaryContactEmail: z.email().describe("Business email for the primary contact. Must be a valid email address. Anthropic uses this to communicate about your submission status, required changes, and post-listing issues. Avoid using personal email addresses."),
223
+ primaryContactRole: z.string().optional().describe("The job title or role of the primary contact (e.g. 'CTO', 'Developer Relations Lead', 'Founder'). Optional but helps Anthropic route questions to the right person."),
224
+ anthropicPointOfContact: z.string().optional().describe("If you have a direct contact at Anthropic (e.g. from a partnership or sales conversation), enter their name here. This is optional but can greatly help expedite the review process. Leave blank if you don't have one."),
225
+ appName: z.string().describe(`The public display name for your connector as it will appear in the Connectors Directory.
226
+
227
+ Rules:
228
+ (1) Do NOT include the words 'MCP' or 'Server' — these are auto-rejected.
229
+ (2) Use your brand/product name, e.g. 'Notion', 'Linear', 'Slack'.
230
+ (3) You must own or have the right to use this brand name. For example, don't call it 'Google Drive Helper' if you're not Google.`),
231
+ mcpUrlType: claudeMcpUrlTypeSchema.describe("Universal URL = one URL serves all users. Custom MCP URLs = signup URL + regex matching per-user URLs."),
232
+ serverUrl: z.url().describe("Production MCP server URL (https). Derived from the project's production environment by default."),
233
+ tagline: z.string().max(55).describe("Short blurb shown below the server name. 55 chars max."),
234
+ description: z.string().describe("50–100 words describing what the server does and its key capabilities. Lives on the directory listing."),
235
+ testCases: z.array(positiveTestCaseSchema).describe("At least 3 use cases with example prompts showing the value of the connector."),
236
+ connectionRequirements: z.string().describe(`Prerequisites before connecting:
237
+ • Free/premium account
238
+ • Admin seat
239
+ • Geographic availability
240
+ • Custom instance URL
241
+
242
+ State 'No special requirements.' if none.`),
243
+ readWriteCapabilities: claudeReadWriteCapabilitiesSchema.describe("Inferred from the `readOnlyHint` annotations on the MCP tools."),
244
+ isMcpApp: z.boolean().describe("True if the server exposes interactive UI elements (widgets). Inferred from the MCP connection."),
245
+ thirdPartyConnectionsAndWebAccess: z.array(claudeThirdPartySchema).describe("Multi-select of what the server reaches out to (web, third-party AI, data aggregators)."),
246
+ dataHandling: z.array(claudeDataHandlingSchema).describe("Multi-select of data-handling practices that accurately describe the server. Cannot be inferred — user must self-declare."),
247
+ personalDataHealthAccess: z.boolean().describe("True only if the connector gives users access to their own personal health data (medical records, lab results, health metrics)."),
248
+ categories: z.array(claudeCategorySchema).describe("Multi-select of categories that best describe the server in the directory."),
249
+ sponsoredContentsOrAdvertisement: claudeSponsoredContentSchema.describe("Disclose paid promotion or sponsored content. Cannot be filled by Alpic — user must self-declare."),
250
+ transportSupport: z.array(claudeTransportSchema).describe("Multi-select of transport protocols the server supports. Anthropic recommends Streamable HTTP (SSE may be deprecated later this year)."),
251
+ serverDocumentationLink: z.url().describe("Public docs URL covering what the MCP does, setup, debugging, and self-serve support. The Alpic playground may be used."),
252
+ privacyPolicyUrl: z.url().describe("URL to your privacy policy. Mandatory and displayed alongside the directory listing."),
253
+ supportChannel: supportChannelSchema.describe("Link or email for user support (help center, GitHub issues, docs, support@…). Displayed alongside the directory listing."),
254
+ testingCredentials: z.string().describe("Credentials for reviewers to verify functionality. Required if the server uses OAuth. No 2FA. Use mcp-review@anthropic.com if an accessible email is needed."),
255
+ tools: z.array(toolDefinitionSchema).describe("List of tools exposed by the MCP server (auto-populated from the production server's manifest)."),
256
+ toolTitlesAnnotationsConfirmed: z.boolean().describe("Confirmation that all tools have user-friendly titles and accurate annotations (readOnlyHint, destructiveHint, …)."),
257
+ logoLight: z.string().describe("Server/app logo for light mode. Square 1:1 aspect ratio. SVG preferred for Claude."),
258
+ screenshots: z.array(z.url()).describe("URLs of screenshots of the connector on Claude.ai or promo material. 3–5 ideal. ≥1000px width preferred, PNG, cropped to the app response. Videos welcome.")
259
+ });
260
+ claudeSubmissionFormDataSchema.pick({
261
+ companyName: true,
262
+ appName: true,
263
+ mcpUrlType: true,
264
+ serverUrl: true,
265
+ tools: true,
266
+ readWriteCapabilities: true,
267
+ transportSupport: true,
268
+ primaryContactEmail: true,
269
+ primaryContactName: true
270
+ }).partial();
271
+ const submissionMetaFieldsSchema = z.object({
272
+ id: z.string(),
273
+ environmentId: z.string(),
274
+ createdAt: z.coerce.date(),
275
+ updatedAt: z.coerce.date()
276
+ });
277
+ const claudeSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
278
+ platform: z.literal("claudeai"),
279
+ formData: claudeSubmissionFormDataSchema.partial()
280
+ });
281
+ const chatgptSubmissionSchemaInternal = submissionMetaFieldsSchema.extend({
282
+ platform: z.literal("chatgpt"),
283
+ formData: chatgptSubmissionFormDataSchema.partial()
284
+ });
285
+ z.discriminatedUnion("platform", [claudeSubmissionSchemaInternal, chatgptSubmissionSchemaInternal]);
286
+ z.union([claudeSubmissionFormDataSchema.partial(), chatgptSubmissionFormDataSchema.partial()]);
287
+ const subscriptionPlanSchema = z.enum([
288
+ "pro",
289
+ "business",
290
+ "enterprise"
291
+ ]);
292
+ z.object({ plan: subscriptionPlanSchema.nullable() });
75
293
  //#endregion
76
294
  //#region src/schemas.ts
77
295
  const RESERVED_KEYS = [
@@ -108,7 +326,7 @@ const RESERVED_KEYS = [
108
326
  "BUILD_ARG_START_COMMAND",
109
327
  "ALPIC_HOST",
110
328
  "ALPIC_CUSTOM_DOMAINS",
111
- "ALPIC_PROMPT_META_KEY"
329
+ "ALPIC_INTENT_META_KEY"
112
330
  ];
113
331
  const environmentVariableSchema = z.object({
114
332
  key: z.string().min(2, "Key must be at least 2 characters").regex(/^[a-zA-Z]([a-zA-Z0-9_])+$/, "Key must start with a letter and contain only letters, numbers, and underscores").refine((key) => !RESERVED_KEYS.includes(key), "This key is reserved and cannot be used as an environment variable key"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.127.0",
3
+ "version": "1.128.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",