@alpic-ai/api 1.161.0 → 1.162.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.
Files changed (2) hide show
  1. package/dist/index.mjs +11 -61
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import * as z$1 from "zod/v4";
3
3
  import { oc } from "@orpc/contract";
4
4
  import ms from "ms";
5
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
5
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
6
6
  /**
7
7
  * Reusable URL validation that disallows javascript: scheme
8
8
  */
@@ -283,33 +283,18 @@ const deploymentSummarySchema = z.object({
283
283
  createdAt: z.coerce.date(),
284
284
  updatedAt: z.coerce.date()
285
285
  });
286
- /**
287
- * Public environment
288
- *
289
- * Answers anonymously and exposes no OAuth metadata.
290
- */
286
+ /** Public environment: answers anonymously and exposes no OAuth metadata. */
291
287
  const publicEnvironmentSchema = z.object({
292
288
  allowsAnonymous: z.literal(true),
293
289
  oAuthMetadata: z.strictObject({})
294
290
  });
295
- /**
296
- * Protected environment with an external resource metadata URL
297
- *
298
- * An external resource metadata URL is returned in the WWW-Authenticate header during the first 401 response.
299
- * Everything that follows is handled outside of the MCP server scope.
300
- */
291
+ /** Protected environment whose external resource metadata URL is returned in the WWW-Authenticate header on the first 401; everything after is handled outside the MCP server scope. */
301
292
  const externalResourceMetadataEnvironmentSchema = z.object({
302
293
  allowsAnonymous: z.boolean(),
303
294
  oAuthMetadata: z.object({ externalResourceMetadataUrl: z.url() }),
304
295
  scope: z.string().optional()
305
296
  });
306
- /**
307
- * Protected environment with an external authorization server URL
308
- *
309
- * The server itself exposes the /.well-known/oauth-protected-resource endpoint.
310
- * An external authorization server URL is returned when requesting the endpoint.
311
- * Everything that follows is handled outside of the MCP server scope.
312
- */
297
+ /** Protected environment whose own /.well-known/oauth-protected-resource endpoint points at an external authorization server; everything after is handled outside the MCP server scope. */
313
298
  const externalAuthorizationServerEnvironmentSchema = z.object({
314
299
  allowsAnonymous: z.boolean(),
315
300
  oAuthMetadata: z.object({
@@ -318,12 +303,7 @@ const externalAuthorizationServerEnvironmentSchema = z.object({
318
303
  }),
319
304
  scope: z.string().optional()
320
305
  });
321
- /**
322
- * Standalone protected environment
323
- *
324
- * The server itself exposes the /.well-known/oauth-protected-resource endpoint.
325
- * The server itself exposes the /.well-known/oauth-authorization-server endpoint.
326
- */
306
+ /** Standalone protected environment: the server itself exposes both the /.well-known/oauth-protected-resource and /.well-known/oauth-authorization-server endpoints. */
327
307
  const standaloneEnvironmentSchema = z.object({
328
308
  allowsAnonymous: z.boolean(),
329
309
  oAuthMetadata: z.object({
@@ -332,13 +312,7 @@ const standaloneEnvironmentSchema = z.object({
332
312
  }),
333
313
  scope: z.string().optional()
334
314
  });
335
- /**
336
- * Protected environment without OAuth discovery
337
- *
338
- * The server enforces authentication but exposes no OAuth discovery metadata.
339
- * Neither /.well-known/oauth-protected-resource nor /.well-known/oauth-authorization-server
340
- * are advertised. Clients must obtain credentials out-of-band.
341
- */
315
+ /** Protected environment that enforces authentication but advertises no OAuth discovery metadata; clients must obtain credentials out-of-band. */
342
316
  const protectedWithoutDiscoveryEnvironmentSchema = z.object({
343
317
  allowsAnonymous: z.literal(false),
344
318
  oAuthMetadata: z.strictObject({}),
@@ -610,15 +584,7 @@ z.object({
610
584
  serverFields: serverFieldsSchema$1,
611
585
  source: z.enum(["registry", "defaults"])
612
586
  });
613
- /**
614
- * Returns a variant of a `maxLength`-constrained string that clamps (truncates) instead of
615
- * rejecting on overflow — used for AI-generated copy where the model routinely overshoots.
616
- *
617
- * NOTE: this rebuilds the schema from scratch, carrying over only `maxLength` (as a clamp),
618
- * `minLength`, and the description. Any other validators on the source field (`.regex()`,
619
- * `.email()`, custom refinements) are intentionally dropped — this helper is meant for plain
620
- * free-text length caps only. A field with `null` `maxLength` is returned unchanged.
621
- */
587
+ /** Clamps instead of rejecting on max-length overflow (for AI-generated copy that overshoots); intentionally carries over only maxLength, minLength, and description, dropping any other validators. */
622
588
  const clampStringField = (field) => {
623
589
  const max = field.maxLength;
624
590
  if (max === null) return field;
@@ -964,11 +930,7 @@ const chatgptToolJustificationSchema = z.object({
964
930
  openWorldJustification: z.string().describe("One sentence on whether the tool reaches external systems beyond your own service."),
965
931
  destructiveJustification: z.string().describe("One sentence on whether the tool changes data. For a read-only tool, state the full triad: \"No data is created, modified, or deleted.\"")
966
932
  }).describe("Per-tool justification of each MCP annotation value (one specific sentence per hint).");
967
- /**
968
- * Base copy fields, defined once and reused by both the submission form and per-locale
969
- * translations so the constraints (tagline ≤ 30 chars) never drift. The translation generation
970
- * path wraps these in {@link clampStringField} since the LLM tends to overshoot the limit.
971
- */
933
+ /** Defined once and reused by both the submission form and per-locale translations so the tagline ≤ 30 chars constraint never drifts. */
972
934
  const chatgptTaglineSchema = z.string().max(30);
973
935
  const chatgptDescriptionSchema = z.string();
974
936
  const chatgptTranslationSchema = z.object({
@@ -977,10 +939,7 @@ const chatgptTranslationSchema = z.object({
977
939
  description: chatgptDescriptionSchema
978
940
  }).describe("Locale-scoped override for tagline + description. English (US) is the default.");
979
941
  chatgptTranslationSchema.extend({ tagline: clampStringField(chatgptTaglineSchema) });
980
- /**
981
- * Field order mirrors the ChatGPT (OpenAI) submission spreadsheet, grouped by section.
982
- * When adding/removing/reordering fields, keep this in sync with the sheet.
983
- */
942
+ /** Field order mirrors the ChatGPT (OpenAI) submission spreadsheet, grouped by section; keep it in sync with the sheet. */
984
943
  const chatgptSubmissionFormDataSchema = z.object({
985
944
  logoLight: z.string().describe("Logo icon for light mode. Square PNG, no borders or rounded corners (clients apply circular cropping)."),
986
945
  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."),
@@ -1077,11 +1036,7 @@ const claudePolicyAcknowledgementSchema = z.enum([
1077
1036
  "My connector does not collect conversation data beyond what is needed for its function.",
1078
1037
  "Public documentation for this connector will be live by the publish date."
1079
1038
  ]);
1080
- /**
1081
- * Field order mirrors the claude.ai directory submission wizard
1082
- * (`claude.ai/admin-settings/directory/submissions/new`), grouped by step.
1083
- * When adding/removing/reordering fields, keep this in sync with the wizard.
1084
- */
1039
+ /** Field order mirrors the claude.ai directory submission wizard (`claude.ai/admin-settings/directory/submissions/new`), grouped by step; keep it in sync with the wizard. */
1085
1040
  const claudeSubmissionFormDataSchema = z.object({
1086
1041
  serverUrl: z.url().describe(`The full https:// URL where your MCP server is hosted and reachable. In the claude.ai wizard this is read live
1087
1042
  from the custom connector you select — the connection is used to verify the URL and the tool list at submission time.
@@ -1173,12 +1128,7 @@ claudeSubmissionFormDataSchema.pick({
1173
1128
  connectionRequirements: claudeSubmissionFormDataSchema.shape.connectionRequirements.optional(),
1174
1129
  testInstructions: claudeSubmissionFormDataSchema.shape.testInstructions.optional()
1175
1130
  });
1176
- /**
1177
- * Narrative fields the LLM-backed generation step produces for Claude submissions.
1178
- * This schema accepts the slightly loose shape returned by AI generation, then normalizes it into
1179
- * the strict form shape. Keep transforms here rather than in callers so generation leniency is
1180
- * colocated with the Claude contract.
1181
- */
1131
+ /** Loose shape returned by AI generation for Claude narrative fields; transforms live here so generation leniency stays colocated with the Claude contract. */
1182
1132
  const claudeAiGeneratedFormDataRawSchema = z.object({
1183
1133
  oneLiner: claudeSubmissionFormDataSchema.shape.oneLiner,
1184
1134
  description: claudeSubmissionFormDataSchema.shape.description,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.161.0",
3
+ "version": "1.162.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -33,13 +33,13 @@
33
33
  "author": "Alpic",
34
34
  "license": "ISC",
35
35
  "dependencies": {
36
- "@orpc/contract": "^1.14.10",
36
+ "@orpc/contract": "^1.14.13",
37
37
  "ms": "^2.1.3",
38
38
  "zod": "^4.4.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@orpc/openapi": "^1.14.10",
42
- "@orpc/zod": "^1.14.10",
41
+ "@orpc/openapi": "^1.14.13",
42
+ "@orpc/zod": "^1.14.13",
43
43
  "@total-typescript/tsconfig": "^1.0.4",
44
44
  "@types/ms": "^2.1.0",
45
45
  "shx": "^0.4.0",