@alpic-ai/api 1.104.1 → 1.106.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
@@ -637,6 +637,68 @@ declare const contract: {
637
637
  }>, Record<never, never>>;
638
638
  };
639
639
  };
640
+ playground: {
641
+ get: {
642
+ v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
643
+ environmentId: z.ZodString;
644
+ }, z.core.$strip>, z.ZodObject<{
645
+ isPlaygroundEnabled: z.ZodBoolean;
646
+ serverMetadata: z.ZodNullable<z.ZodObject<{
647
+ name: z.ZodString;
648
+ description: z.ZodString;
649
+ headers: z.ZodArray<z.ZodObject<{
650
+ name: z.ZodString;
651
+ description: z.ZodString;
652
+ isRequired: z.ZodBoolean;
653
+ isSecret: z.ZodBoolean;
654
+ }, z.core.$strip>>;
655
+ examplePrompts: z.ZodArray<z.ZodObject<{
656
+ title: z.ZodString;
657
+ prompt: z.ZodString;
658
+ }, z.core.$strip>>;
659
+ }, z.core.$strip>>;
660
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
661
+ NOT_FOUND: {};
662
+ }>, Record<never, never>>;
663
+ };
664
+ upsert: {
665
+ v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
666
+ environmentId: z.ZodString;
667
+ isPlaygroundEnabled: z.ZodOptional<z.ZodBoolean>;
668
+ name: z.ZodOptional<z.ZodString>;
669
+ description: z.ZodOptional<z.ZodString>;
670
+ headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
671
+ name: z.ZodString;
672
+ description: z.ZodString;
673
+ isRequired: z.ZodDefault<z.ZodBoolean>;
674
+ isSecret: z.ZodDefault<z.ZodBoolean>;
675
+ }, z.core.$strip>>>;
676
+ examplePrompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
677
+ title: z.ZodString;
678
+ prompt: z.ZodString;
679
+ }, z.core.$strip>>>;
680
+ }, z.core.$strip>, z.ZodObject<{
681
+ isPlaygroundEnabled: z.ZodBoolean;
682
+ serverMetadata: z.ZodNullable<z.ZodObject<{
683
+ name: z.ZodString;
684
+ description: z.ZodString;
685
+ headers: z.ZodArray<z.ZodObject<{
686
+ name: z.ZodString;
687
+ description: z.ZodString;
688
+ isRequired: z.ZodBoolean;
689
+ isSecret: z.ZodBoolean;
690
+ }, z.core.$strip>>;
691
+ examplePrompts: z.ZodArray<z.ZodObject<{
692
+ title: z.ZodString;
693
+ prompt: z.ZodString;
694
+ }, z.core.$strip>>;
695
+ }, z.core.$strip>>;
696
+ }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
697
+ NOT_FOUND: {};
698
+ BAD_REQUEST: {};
699
+ }>, Record<never, never>>;
700
+ };
701
+ };
640
702
  tunnels: {
641
703
  getTicket: {
642
704
  v1: _$_orpc_contract0.ContractProcedureBuilderWithOutput<_$_orpc_contract0.Schema<unknown, unknown>, z.ZodObject<{
@@ -725,6 +787,13 @@ declare const contract: {
725
787
  targetUrl: z.ZodString;
726
788
  teamId: z.ZodOptional<z.ZodString>;
727
789
  projectId: z.ZodOptional<z.ZodString>;
790
+ excludeCategories: z.ZodOptional<z.ZodArray<z.ZodEnum<{
791
+ connectivity: "connectivity";
792
+ "tool-metadata": "tool-metadata";
793
+ "resource-metadata": "resource-metadata";
794
+ performance: "performance";
795
+ e2e: "e2e";
796
+ }>>>;
728
797
  }, z.core.$strip>, z.ZodObject<{
729
798
  id: z.ZodString;
730
799
  }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
@@ -734,7 +803,7 @@ declare const contract: {
734
803
  };
735
804
  get: {
736
805
  v1: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
737
- analysisId: z.ZodString;
806
+ auditId: z.ZodString;
738
807
  }, z.core.$strip>, z.ZodObject<{
739
808
  id: z.ZodString;
740
809
  targetUrl: z.ZodString;
@@ -854,7 +923,7 @@ declare const transportSchema: z.ZodEnum<{
854
923
  streamablehttp: "streamablehttp";
855
924
  }>;
856
925
  type Transport = z.infer<typeof transportSchema>;
857
- declare const analysisStatusSchema: z.ZodEnum<{
926
+ declare const auditStatusSchema: z.ZodEnum<{
858
927
  pending: "pending";
859
928
  partial: "partial";
860
929
  completed: "completed";
@@ -999,6 +1068,16 @@ declare const auditReportSchema: z.ZodObject<{
999
1068
  }, z.core.$strip>>;
1000
1069
  }, z.core.$strip>;
1001
1070
  type AuditReport = z.infer<typeof auditReportSchema>;
1071
+ declare const playgroundHeaderSchema: z.ZodObject<{
1072
+ name: z.ZodString;
1073
+ description: z.ZodString;
1074
+ isRequired: z.ZodDefault<z.ZodBoolean>;
1075
+ isSecret: z.ZodDefault<z.ZodBoolean>;
1076
+ }, z.core.$strip>;
1077
+ declare const playgroundExamplePromptSchema: z.ZodObject<{
1078
+ title: z.ZodString;
1079
+ prompt: z.ZodString;
1080
+ }, z.core.$strip>;
1002
1081
  declare const serverFieldsSchema: z.ZodObject<{
1003
1082
  $schema: z.ZodString;
1004
1083
  name: z.ZodString;
@@ -1023,4 +1102,4 @@ declare const serverFieldsSchema: z.ZodObject<{
1023
1102
  }, z.core.$strip>>>;
1024
1103
  }, z.core.$strip>;
1025
1104
  //#endregion
1026
- export { ApiContext, AuditReport, CheckCategory, CheckDetail, CheckResult, CheckScope, CheckSeverity, Platform, RouterInput, RouterOutput, Runtime, Transport, analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, runtimeSchema, serverFieldsSchema, transportSchema };
1105
+ export { ApiContext, AuditReport, CheckCategory, CheckDetail, CheckResult, CheckScope, CheckSeverity, Platform, RouterInput, RouterOutput, Runtime, Transport, auditReportSchema, auditStatusSchema, buildSettingsSchema, checkCategorySchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema };
package/dist/index.mjs CHANGED
@@ -60,7 +60,7 @@ const transportSchema = z.enum([
60
60
  "sse",
61
61
  "streamablehttp"
62
62
  ]);
63
- const analysisStatusSchema = z.enum([
63
+ const auditStatusSchema = z.enum([
64
64
  "pending",
65
65
  "partial",
66
66
  "completed",
@@ -123,6 +123,16 @@ const auditReportSchema = z.object({
123
123
  claudeai: z.object({ url: z.string() }).optional()
124
124
  }).optional()
125
125
  });
126
+ const playgroundHeaderSchema = z.object({
127
+ name: z.string().min(1).max(100),
128
+ description: z.string().max(200),
129
+ isRequired: z.boolean().default(false),
130
+ isSecret: z.boolean().default(false)
131
+ });
132
+ const playgroundExamplePromptSchema = z.object({
133
+ title: z.string().min(1).max(100),
134
+ prompt: z.string().min(1).max(500)
135
+ });
126
136
  const serverFieldsSchema = z.object({
127
137
  $schema: z.string(),
128
138
  name: z.string(),
@@ -590,32 +600,74 @@ const getServerInfoContractV1 = oc.route({
590
600
  projectId: z.string(),
591
601
  domain: z.string()
592
602
  })).output(z.object({ serverFields: serverFieldsSchema }));
603
+ const playgroundServerMetadataOutputSchema = z.object({
604
+ name: z.string(),
605
+ description: z.string(),
606
+ headers: z.array(z.object({
607
+ name: z.string(),
608
+ description: z.string(),
609
+ isRequired: z.boolean(),
610
+ isSecret: z.boolean()
611
+ })),
612
+ examplePrompts: z.array(playgroundExamplePromptSchema)
613
+ });
614
+ const playgroundOutputSchema = z.object({
615
+ isPlaygroundEnabled: z.boolean(),
616
+ serverMetadata: playgroundServerMetadataOutputSchema.nullable()
617
+ });
618
+ const getPlaygroundContractV1 = oc.route({
619
+ path: "/v1/environments/{environmentId}/playground",
620
+ method: "GET",
621
+ summary: "Get playground configuration",
622
+ description: "Get the playground configuration for an environment",
623
+ tags: ["environments"],
624
+ successDescription: "The playground configuration"
625
+ }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(playgroundOutputSchema);
626
+ const upsertPlaygroundContractV1 = oc.route({
627
+ path: "/v1/environments/{environmentId}/playground",
628
+ method: "PUT",
629
+ summary: "Update playground configuration",
630
+ description: "Update the playground configuration for an environment. All fields are optional — only provided fields are updated.",
631
+ tags: ["environments"],
632
+ successDescription: "The updated playground configuration"
633
+ }).errors({
634
+ NOT_FOUND: {},
635
+ BAD_REQUEST: {}
636
+ }).input(z.object({
637
+ environmentId: z.string().describe("The ID of the environment"),
638
+ isPlaygroundEnabled: z.boolean().optional(),
639
+ name: z.string().min(1).max(100).optional(),
640
+ description: z.string().min(1).max(500).optional(),
641
+ headers: z.array(playgroundHeaderSchema).optional(),
642
+ examplePrompts: z.array(playgroundExamplePromptSchema).max(3).optional()
643
+ })).output(playgroundOutputSchema);
593
644
  const createBeaconContractV1 = oc.route({
594
- path: "/v1/beacon/analyses",
645
+ path: "/v1/beacon/audits",
595
646
  method: "POST",
596
- summary: "Create a beacon analysis",
597
- description: "Analyze an MCP server for spec compliance and AI client compatibility",
647
+ summary: "Create a beacon audit",
648
+ description: "Audit an MCP server for spec compliance and AI client compatibility",
598
649
  tags: ["beacon"],
599
- successDescription: "The analysis has been created"
650
+ successDescription: "The audit has been created"
600
651
  }).errors({
601
652
  NOT_FOUND: {},
602
653
  BAD_REQUEST: {}
603
654
  }).input(z.object({
604
- targetUrl: z.string().url().describe("The HTTPS URL of the MCP server to analyze"),
605
- teamId: z.string().optional().describe("The team ID to associate the analysis with"),
606
- projectId: z.string().optional().describe("The project ID to associate the analysis with")
655
+ targetUrl: z.string().url().describe("The HTTPS URL of the MCP server to audit"),
656
+ teamId: z.string().optional().describe("The team ID to associate the audit with"),
657
+ projectId: z.string().optional().describe("The project ID to associate the audit with"),
658
+ excludeCategories: z.array(checkCategorySchema).optional().describe("Check categories to exclude from the audit")
607
659
  })).output(z.object({ id: z.string() }));
608
660
  const getBeaconContractV1 = oc.route({
609
- path: "/v1/beacon/analyses/{analysisId}",
661
+ path: "/v1/beacon/audits/{auditId}",
610
662
  method: "GET",
611
- summary: "Get a beacon analysis",
612
- description: "Get a beacon analysis by ID, including the report if completed",
663
+ summary: "Get a beacon audit",
664
+ description: "Get a beacon audit by ID, including the report if completed",
613
665
  tags: ["beacon"],
614
- successDescription: "The analysis details"
615
- }).errors({ NOT_FOUND: {} }).input(z.object({ analysisId: z.string().describe("The ID of the analysis") })).output(z.object({
666
+ successDescription: "The audit details"
667
+ }).errors({ NOT_FOUND: {} }).input(z.object({ auditId: z.string().describe("The ID of the audit") })).output(z.object({
616
668
  id: z.string(),
617
669
  targetUrl: z.string(),
618
- status: analysisStatusSchema,
670
+ status: auditStatusSchema,
619
671
  durationMs: z.number().nullable(),
620
672
  createdAt: z.coerce.date(),
621
673
  report: auditReportSchema.nullable()
@@ -648,6 +700,10 @@ const contract = {
648
700
  create: { v1: createProjectContractV1 },
649
701
  delete: { v1: deleteProjectContractV1 }
650
702
  },
703
+ playground: {
704
+ get: { v1: getPlaygroundContractV1 },
705
+ upsert: { v1: upsertPlaygroundContractV1 }
706
+ },
651
707
  tunnels: { getTicket: { v1: getTunnelTicketContractV1 } },
652
708
  distribution: {
653
709
  publish: { v1: publishServerContractV1 },
@@ -659,4 +715,4 @@ const contract = {
659
715
  }
660
716
  };
661
717
  //#endregion
662
- export { analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, runtimeSchema, serverFieldsSchema, transportSchema };
718
+ export { auditReportSchema, auditStatusSchema, buildSettingsSchema, checkCategorySchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "1.104.1",
3
+ "version": "1.106.0",
4
4
  "description": "Contract for the Alpic API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "@types/ms": "^2.1.0",
27
27
  "shx": "^0.4.0",
28
28
  "tsdown": "^0.21.7",
29
- "typescript": "^5.9.3",
29
+ "typescript": "^6.0.2",
30
30
  "vitest": "^4.1.2"
31
31
  },
32
32
  "scripts": {