@alpic-ai/api 0.0.0-staging.dccf4e1 → 0.0.0-staging.dcd2ccb

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
@@ -318,7 +318,7 @@ declare const contract: {
318
318
  environmentVariableId: z.ZodString;
319
319
  key: z.ZodString;
320
320
  value: z.ZodOptional<z.ZodString>;
321
- isSecret: z.ZodDefault<z.ZodBoolean>;
321
+ isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
322
322
  }, z.core.$strip>, z.ZodObject<{
323
323
  success: z.ZodLiteral<true>;
324
324
  }, z.core.$strip>, _$_orpc_contract0.MergedErrorMap<Record<never, never>, {
@@ -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;
@@ -835,6 +904,11 @@ declare const environmentVariablesSchema: z.ZodArray<z.ZodObject<{
835
904
  value: z.ZodString;
836
905
  isSecret: z.ZodDefault<z.ZodBoolean>;
837
906
  }, z.core.$strip>>;
907
+ declare const updateEnvironmentVariableSchema: z.ZodObject<{
908
+ key: z.ZodString;
909
+ value: z.ZodOptional<z.ZodString>;
910
+ isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
911
+ }, z.core.$strip>;
838
912
  declare const buildSettingsSchema: z.ZodObject<{
839
913
  installCommand: z.ZodOptional<z.ZodString>;
840
914
  buildCommand: z.ZodOptional<z.ZodString>;
@@ -854,7 +928,7 @@ declare const transportSchema: z.ZodEnum<{
854
928
  streamablehttp: "streamablehttp";
855
929
  }>;
856
930
  type Transport = z.infer<typeof transportSchema>;
857
- declare const analysisStatusSchema: z.ZodEnum<{
931
+ declare const auditStatusSchema: z.ZodEnum<{
858
932
  pending: "pending";
859
933
  partial: "partial";
860
934
  completed: "completed";
@@ -999,6 +1073,16 @@ declare const auditReportSchema: z.ZodObject<{
999
1073
  }, z.core.$strip>>;
1000
1074
  }, z.core.$strip>;
1001
1075
  type AuditReport = z.infer<typeof auditReportSchema>;
1076
+ declare const playgroundHeaderSchema: z.ZodObject<{
1077
+ name: z.ZodString;
1078
+ description: z.ZodString;
1079
+ isRequired: z.ZodDefault<z.ZodBoolean>;
1080
+ isSecret: z.ZodDefault<z.ZodBoolean>;
1081
+ }, z.core.$strip>;
1082
+ declare const playgroundExamplePromptSchema: z.ZodObject<{
1083
+ title: z.ZodString;
1084
+ prompt: z.ZodString;
1085
+ }, z.core.$strip>;
1002
1086
  declare const serverFieldsSchema: z.ZodObject<{
1003
1087
  $schema: z.ZodString;
1004
1088
  name: z.ZodString;
@@ -1023,4 +1107,4 @@ declare const serverFieldsSchema: z.ZodObject<{
1023
1107
  }, z.core.$strip>>>;
1024
1108
  }, z.core.$strip>;
1025
1109
  //#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 };
1110
+ 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, updateEnvironmentVariableSchema };
package/dist/index.mjs CHANGED
@@ -43,6 +43,10 @@ const environmentVariableSchema = z.object({
43
43
  isSecret: z.boolean().default(false)
44
44
  });
45
45
  const environmentVariablesSchema = z.array(environmentVariableSchema);
46
+ const updateEnvironmentVariableSchema = environmentVariableSchema.partial({
47
+ value: true,
48
+ isSecret: true
49
+ });
46
50
  const buildSettingsSchema = z.object({
47
51
  installCommand: z.string().optional(),
48
52
  buildCommand: z.string().optional(),
@@ -60,7 +64,7 @@ const transportSchema = z.enum([
60
64
  "sse",
61
65
  "streamablehttp"
62
66
  ]);
63
- const analysisStatusSchema = z.enum([
67
+ const auditStatusSchema = z.enum([
64
68
  "pending",
65
69
  "partial",
66
70
  "completed",
@@ -123,6 +127,16 @@ const auditReportSchema = z.object({
123
127
  claudeai: z.object({ url: z.string() }).optional()
124
128
  }).optional()
125
129
  });
130
+ const playgroundHeaderSchema = z.object({
131
+ name: z.string().min(1).max(100),
132
+ description: z.string().max(200),
133
+ isRequired: z.boolean().default(false),
134
+ isSecret: z.boolean().default(false)
135
+ });
136
+ const playgroundExamplePromptSchema = z.object({
137
+ title: z.string().min(1).max(100),
138
+ prompt: z.string().min(1).max(500)
139
+ });
126
140
  const serverFieldsSchema = z.object({
127
141
  $schema: z.string(),
128
142
  name: z.string(),
@@ -361,7 +375,7 @@ const updateEnvironmentVariableContractV1 = oc.route({
361
375
  environmentVariableId: z.string().describe("The ID of the environment variable"),
362
376
  key: environmentVariableSchema.shape.key,
363
377
  value: environmentVariableSchema.shape.value.optional(),
364
- isSecret: environmentVariableSchema.shape.isSecret
378
+ isSecret: environmentVariableSchema.shape.isSecret.optional()
365
379
  })).output(z.object({ success: z.literal(true) }));
366
380
  const deleteEnvironmentVariableContractV1 = oc.route({
367
381
  path: "/v1/environment-variables/{environmentVariableId}",
@@ -590,32 +604,74 @@ const getServerInfoContractV1 = oc.route({
590
604
  projectId: z.string(),
591
605
  domain: z.string()
592
606
  })).output(z.object({ serverFields: serverFieldsSchema }));
607
+ const playgroundServerMetadataOutputSchema = z.object({
608
+ name: z.string(),
609
+ description: z.string(),
610
+ headers: z.array(z.object({
611
+ name: z.string(),
612
+ description: z.string(),
613
+ isRequired: z.boolean(),
614
+ isSecret: z.boolean()
615
+ })),
616
+ examplePrompts: z.array(playgroundExamplePromptSchema)
617
+ });
618
+ const playgroundOutputSchema = z.object({
619
+ isPlaygroundEnabled: z.boolean(),
620
+ serverMetadata: playgroundServerMetadataOutputSchema.nullable()
621
+ });
622
+ const getPlaygroundContractV1 = oc.route({
623
+ path: "/v1/environments/{environmentId}/playground",
624
+ method: "GET",
625
+ summary: "Get playground configuration",
626
+ description: "Get the playground configuration for an environment",
627
+ tags: ["environments"],
628
+ successDescription: "The playground configuration"
629
+ }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(playgroundOutputSchema);
630
+ const upsertPlaygroundContractV1 = oc.route({
631
+ path: "/v1/environments/{environmentId}/playground",
632
+ method: "PUT",
633
+ summary: "Update playground configuration",
634
+ description: "Update the playground configuration for an environment. All fields are optional — only provided fields are updated.",
635
+ tags: ["environments"],
636
+ successDescription: "The updated playground configuration"
637
+ }).errors({
638
+ NOT_FOUND: {},
639
+ BAD_REQUEST: {}
640
+ }).input(z.object({
641
+ environmentId: z.string().describe("The ID of the environment"),
642
+ isPlaygroundEnabled: z.boolean().optional(),
643
+ name: z.string().min(1).max(100).optional(),
644
+ description: z.string().min(1).max(500).optional(),
645
+ headers: z.array(playgroundHeaderSchema).optional(),
646
+ examplePrompts: z.array(playgroundExamplePromptSchema).max(3).optional()
647
+ })).output(playgroundOutputSchema);
593
648
  const createBeaconContractV1 = oc.route({
594
- path: "/v1/beacon/analyses",
649
+ path: "/v1/beacon/audits",
595
650
  method: "POST",
596
- summary: "Create a beacon analysis",
597
- description: "Analyze an MCP server for spec compliance and AI client compatibility",
651
+ summary: "Create a beacon audit",
652
+ description: "Audit an MCP server for spec compliance and AI client compatibility",
598
653
  tags: ["beacon"],
599
- successDescription: "The analysis has been created"
654
+ successDescription: "The audit has been created"
600
655
  }).errors({
601
656
  NOT_FOUND: {},
602
657
  BAD_REQUEST: {}
603
658
  }).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")
659
+ targetUrl: z.string().url().describe("The HTTPS URL of the MCP server to audit"),
660
+ teamId: z.string().optional().describe("The team ID to associate the audit with"),
661
+ projectId: z.string().optional().describe("The project ID to associate the audit with"),
662
+ excludeCategories: z.array(checkCategorySchema).optional().describe("Check categories to exclude from the audit")
607
663
  })).output(z.object({ id: z.string() }));
608
664
  const getBeaconContractV1 = oc.route({
609
- path: "/v1/beacon/analyses/{analysisId}",
665
+ path: "/v1/beacon/audits/{auditId}",
610
666
  method: "GET",
611
- summary: "Get a beacon analysis",
612
- description: "Get a beacon analysis by ID, including the report if completed",
667
+ summary: "Get a beacon audit",
668
+ description: "Get a beacon audit by ID, including the report if completed",
613
669
  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({
670
+ successDescription: "The audit details"
671
+ }).errors({ NOT_FOUND: {} }).input(z.object({ auditId: z.string().describe("The ID of the audit") })).output(z.object({
616
672
  id: z.string(),
617
673
  targetUrl: z.string(),
618
- status: analysisStatusSchema,
674
+ status: auditStatusSchema,
619
675
  durationMs: z.number().nullable(),
620
676
  createdAt: z.coerce.date(),
621
677
  report: auditReportSchema.nullable()
@@ -648,6 +704,10 @@ const contract = {
648
704
  create: { v1: createProjectContractV1 },
649
705
  delete: { v1: deleteProjectContractV1 }
650
706
  },
707
+ playground: {
708
+ get: { v1: getPlaygroundContractV1 },
709
+ upsert: { v1: upsertPlaygroundContractV1 }
710
+ },
651
711
  tunnels: { getTicket: { v1: getTunnelTicketContractV1 } },
652
712
  distribution: {
653
713
  publish: { v1: publishServerContractV1 },
@@ -659,4 +719,4 @@ const contract = {
659
719
  }
660
720
  };
661
721
  //#endregion
662
- export { analysisStatusSchema, auditReportSchema, buildSettingsSchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, runtimeSchema, serverFieldsSchema, transportSchema };
722
+ export { auditReportSchema, auditStatusSchema, buildSettingsSchema, checkCategorySchema, checkDetailSchema, checkResultSchema, contract, createEnvironmentContractV1, deploymentStatusSchema, environmentVariableSchema, environmentVariablesSchema, platformSchema, playgroundExamplePromptSchema, playgroundHeaderSchema, runtimeSchema, serverFieldsSchema, transportSchema, updateEnvironmentVariableSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-staging.dccf4e1",
3
+ "version": "0.0.0-staging.dcd2ccb",
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": {