@alpic-ai/api 0.0.0-dev.gd514aa3 → 0.0.0-dev.gd6a4621

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +17 -47
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -296,22 +296,6 @@ z.object({
296
296
  serverFields: serverFieldsSchema$1,
297
297
  source: z.enum(["registry", "defaults"])
298
298
  });
299
- /**
300
- * Returns a variant of a `maxLength`-constrained string that clamps (truncates) instead of
301
- * rejecting on overflow — used for AI-generated copy where the model routinely overshoots.
302
- *
303
- * NOTE: this rebuilds the schema from scratch, carrying over only `maxLength` (as a clamp),
304
- * `minLength`, and the description. Any other validators on the source field (`.regex()`,
305
- * `.email()`, custom refinements) are intentionally dropped — this helper is meant for plain
306
- * free-text length caps only. A field with `null` `maxLength` is returned unchanged.
307
- */
308
- const clampStringField = (field) => {
309
- const max = field.maxLength;
310
- if (max === null) return field;
311
- const clamped = z.string().overwrite((value) => value.slice(0, max)).max(max);
312
- const withMin = field.minLength === null ? clamped : clamped.min(field.minLength);
313
- return field.description ? withMin.describe(field.description) : withMin;
314
- };
315
299
  const toolDefinitionSchema = z.object({
316
300
  name: z.string(),
317
301
  title: z.string().optional().describe("Human-friendly name for the tool, used in the UI. If not provided, `name` will be used."),
@@ -331,7 +315,7 @@ const positiveTestCaseSchema = z.object({
331
315
  }).partial().describe("Each case: Scenario, User prompt, Tool triggered, Expected output.");
332
316
  const screenshotEntrySchema = z.object({
333
317
  prompt: z.string(),
334
- url: z.url().or(z.literal(""))
318
+ url: z.url()
335
319
  }).describe("Each screenshot: the user prompt that produced it + the image URL.");
336
320
  /** Accepts either a valid email or URL. */
337
321
  const supportChannelSchema = z.string().refine((value) => z.email().safeParse(value).success || z.url().safeParse(value).success, { error: "Must be a valid email or URL" });
@@ -410,7 +394,7 @@ chatgptSubmissionFormDataSchema.pick({
410
394
  testCases: true,
411
395
  negativeTestCases: true,
412
396
  toolJustifications: true
413
- }).extend({ tagline: clampStringField(chatgptSubmissionFormDataSchema.shape.tagline) });
397
+ });
414
398
  const claudeCategorySchema = z.enum([
415
399
  "Business & Productivity",
416
400
  "Communication",
@@ -422,7 +406,7 @@ const claudeCategorySchema = z.enum([
422
406
  "Media & Entertainment",
423
407
  "Commerce & Shopping"
424
408
  ]);
425
- const claudeAuthenticationSchema = z.enum([
409
+ z.enum([
426
410
  "No auth needed",
427
411
  "OAuth 2.0",
428
412
  "Custom URL"
@@ -430,34 +414,28 @@ const claudeAuthenticationSchema = z.enum([
430
414
  const claudeMcpUrlTypeSchema = z.enum(["Universal URL", "Custom MCP URLs"]);
431
415
  z.enum(["Static OAuth Client", "Dynamic OAuth Client (DCR / CIMD)"]);
432
416
  const claudeReadWriteCapabilitiesSchema = z.enum([
433
- "Read Only",
434
- "Write Only",
435
- "Read + Write"
417
+ "Read only",
418
+ "Write only",
419
+ "Read + write"
436
420
  ]);
437
421
  const claudeTransportSchema = z.enum(["Streamable HTTP", "SSE"]);
438
- const claudeTestedSurfaceSchema = z.enum([
439
- "Claude.ai (web)",
440
- "Claude Desktop",
441
- "Claude Code",
442
- "Cowork"
443
- ]);
444
422
  const claudeThirdPartySchema = z.enum([
445
- "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)",
446
- "Third-party AI model integration: Sends data to or receives data from a generative AI model other than Claude",
447
- "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)",
448
- "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)",
423
+ "Web access (open web fetch / scraping / arbitrary URLs)",
424
+ "Third-party AI model integration",
425
+ "Third-party data retrieval (via workflow / aggregator)",
426
+ "Third-party data modification (via workflow / aggregator)",
449
427
  "N/A"
450
428
  ]);
451
429
  const claudeDataHandlingSchema = z.enum([
452
430
  "Server only accesses data explicitly requested by user",
453
431
  "No data is stored beyond session requirements",
454
- "Data transmission is encrypted (HTTPS/TLS)",
432
+ "Data transmission is encrypted (HTTPS / TLS)",
455
433
  "GDPR compliant (if applicable)"
456
434
  ]);
457
435
  const claudeSponsoredContentSchema = z.enum([
458
436
  "No, there is no sponsored content or advertisements",
459
437
  "Yes, there are banner ads or other paid visual elements",
460
- "Yes, the returned content or ranking of returned content is impacted by sponsorship or ad placement"
438
+ "Yes, returned content or ranking is impacted by sponsorship or ad placement"
461
439
  ]);
462
440
  /**
463
441
  * Field order mirrors the Claude (Anthropic) submission spreadsheet, grouped by section.
@@ -522,7 +500,7 @@ If 'Yes', you will also be required to provide screenshots of your UI (see Promo
522
500
  Note: These are attestations — you are legally agreeing to these practices by submitting the form.`),
523
501
  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.
524
502
  Select 'No' for the vast majority of business/productivity/dev tools. When in doubt, select 'No'. This field triggers additional compliance review if 'Yes'.`),
525
- 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:
503
+ categories: z.array(claudeCategorySchema).describe(`Select the category or categories that best describe your connector. This determines where it appears in the directory's browse experience. Choose the most specific fit:
526
504
  • Business & Productivity — project management, CRM, HR, office tools
527
505
  • Communication — email, chat, messaging, notifications
528
506
  • Data & Analytics — dashboards, reporting, databases, BI tools
@@ -532,13 +510,12 @@ Select 'No' for the vast majority of business/productivity/dev tools. When in do
532
510
  • Health & Life Sciences — clinical, pharma, medical professional tools
533
511
  • Media & Entertainment — content, publishing, streaming
534
512
  • Commerce & Shopping — e-commerce, inventory, orders
535
- Anthropic's submission form only accepts a single category.`),
513
+ Multiple categories are allowed if genuinely applicable.`),
536
514
  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:
537
515
  • '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.
538
516
  • '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.
539
517
  • '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.
540
518
  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'.`),
541
- authentication: claudeAuthenticationSchema.describe("How users authenticate with the server. No auth / OAuth 2.0 / Custom URL (not supported)."),
542
519
  transportSupport: z.array(claudeTransportSchema).describe(`Select all transport protocols your server supports:
543
520
  • 'Streamable HTTP' — the modern, recommended transport. Anthropic strongly recommends implementing this. This is the future-proof option and should be your default.
544
521
  • '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.
@@ -578,7 +555,6 @@ Reviewers test every single tool you list here — don't list tools that don't w
578
555
  • 'I've specified user-friendly titles for all tools' — every tool has a 'title' annotation (a human-readable label, different from the tool name).
579
556
  • '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).
580
557
  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.`),
581
- 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.`),
582
558
  logoLight: z.string().describe(`Your connector's logo for light backgrounds. Requirements:
583
559
  • Format: SVG only
584
560
  • Aspect ratio: square (1:1)
@@ -605,20 +581,14 @@ claudeSubmissionFormDataSchema.pick({
605
581
  isMcpApp: true,
606
582
  transportSupport: true,
607
583
  primaryContactEmail: true,
608
- primaryContactName: true,
609
- authentication: true,
610
- personalDataHealthAccess: true,
611
- testedSurfaces: true
612
- }).extend({
613
- connectionRequirements: claudeSubmissionFormDataSchema.shape.connectionRequirements.optional(),
614
- testingCredentials: claudeSubmissionFormDataSchema.shape.testingCredentials.optional()
584
+ primaryContactName: true
615
585
  });
616
586
  claudeSubmissionFormDataSchema.pick({
617
587
  tagline: true,
618
588
  description: true,
619
- category: true,
589
+ categories: true,
620
590
  testCases: true
621
- }).extend({ tagline: clampStringField(claudeSubmissionFormDataSchema.shape.tagline) });
591
+ });
622
592
  const submissionMetaFieldsSchema = z.object({
623
593
  id: z.string(),
624
594
  environmentId: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-dev.gd514aa3",
3
+ "version": "0.0.0-dev.gd6a4621",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",