@alpic-ai/api 0.0.0-dev.ge93b6b2 → 0.0.0-dev.ge97c360

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
@@ -30,9 +30,10 @@ declare const createEnvironmentContractV1: import("@orpc/contract").ContractProc
30
30
  urls: z.ZodArray<z.ZodURL>;
31
31
  createdAt: z.ZodCoercedDate<unknown>;
32
32
  projectId: z.ZodString;
33
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
34
- NOT_FOUND: {};
33
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
35
34
  BAD_REQUEST: {};
35
+ }>, {
36
+ NOT_FOUND: {};
36
37
  }>, Record<never, never>>;
37
38
  declare const contract: {
38
39
  teams: {
@@ -42,7 +43,9 @@ declare const contract: {
42
43
  name: z.ZodString;
43
44
  createdAt: z.ZodCoercedDate<unknown>;
44
45
  hasStripeAccount: z.ZodBoolean;
45
- }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
46
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
47
+ BAD_REQUEST: {};
48
+ }>, Record<never, never>>;
46
49
  };
47
50
  };
48
51
  analytics: {
@@ -90,9 +93,10 @@ declare const contract: {
90
93
  categories: z.ZodRecord<z.ZodString, z.ZodUnknown>;
91
94
  }, z.core.$strip>>;
92
95
  }, z.core.$strip>;
93
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
94
- NOT_FOUND: {};
96
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
95
97
  BAD_REQUEST: {};
98
+ }>, {
99
+ NOT_FOUND: {};
96
100
  }>, Record<never, never>>;
97
101
  };
98
102
  };
@@ -126,7 +130,9 @@ declare const contract: {
126
130
  environmentName: z.ZodString;
127
131
  isCurrent: z.ZodBoolean;
128
132
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
129
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
133
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
134
+ BAD_REQUEST: {};
135
+ }>, {
130
136
  NOT_FOUND: {};
131
137
  }>, Record<never, never>>;
132
138
  };
@@ -152,7 +158,9 @@ declare const contract: {
152
158
  environmentName: z.ZodString;
153
159
  isCurrent: z.ZodBoolean;
154
160
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
155
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
161
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
162
+ BAD_REQUEST: {};
163
+ }>, {
156
164
  NOT_FOUND: {};
157
165
  }>, Record<never, never>>;
158
166
  };
@@ -163,9 +171,10 @@ declare const contract: {
163
171
  uploadUrl: z.ZodURL;
164
172
  token: z.ZodString;
165
173
  expiresAt: z.ZodCoercedDate<unknown>;
166
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
167
- NOT_FOUND: {};
174
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
168
175
  BAD_REQUEST: {};
176
+ }>, {
177
+ NOT_FOUND: {};
169
178
  }>, Record<never, never>>;
170
179
  };
171
180
  getLogs: {
@@ -177,7 +186,9 @@ declare const contract: {
177
186
  content: z.ZodOptional<z.ZodString>;
178
187
  }, z.core.$strip>>;
179
188
  hasMoreLogs: z.ZodBoolean;
180
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
189
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
190
+ BAD_REQUEST: {};
191
+ }>, {
181
192
  NOT_FOUND: {};
182
193
  }>, Record<never, never>>;
183
194
  };
@@ -200,9 +211,10 @@ declare const contract: {
200
211
  urls: z.ZodArray<z.ZodURL>;
201
212
  createdAt: z.ZodCoercedDate<unknown>;
202
213
  projectId: z.ZodString;
203
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
204
- NOT_FOUND: {};
214
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
205
215
  BAD_REQUEST: {};
216
+ }>, {
217
+ NOT_FOUND: {};
206
218
  }>, Record<never, never>>;
207
219
  };
208
220
  get: {
@@ -216,7 +228,9 @@ declare const contract: {
216
228
  domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
217
229
  createdAt: z.ZodCoercedDate<unknown>;
218
230
  projectId: z.ZodString;
219
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
231
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
232
+ BAD_REQUEST: {};
233
+ }>, {
220
234
  NOT_FOUND: {};
221
235
  }>, Record<never, never>>;
222
236
  };
@@ -254,9 +268,10 @@ declare const contract: {
254
268
  environmentName: z.ZodString;
255
269
  isCurrent: z.ZodBoolean;
256
270
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
257
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
258
- NOT_FOUND: {};
271
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
259
272
  BAD_REQUEST: {};
273
+ }>, {
274
+ NOT_FOUND: {};
260
275
  CONFLICT: {};
261
276
  }>, Record<never, never>>;
262
277
  };
@@ -291,9 +306,10 @@ declare const contract: {
291
306
  durationInMs: z.ZodOptional<z.ZodNumber>;
292
307
  }, z.core.$strip>>;
293
308
  nextToken: z.ZodNullable<z.ZodString>;
294
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
295
- NOT_FOUND: {};
309
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
296
310
  BAD_REQUEST: {};
311
+ }>, {
312
+ NOT_FOUND: {};
297
313
  }>, Record<never, never>>;
298
314
  };
299
315
  getLatestLogs: {
@@ -323,9 +339,10 @@ declare const contract: {
323
339
  method: z.ZodOptional<z.ZodString>;
324
340
  durationInMs: z.ZodOptional<z.ZodNumber>;
325
341
  }, z.core.$strip>>;
326
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
327
- NOT_FOUND: {};
342
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
328
343
  BAD_REQUEST: {};
344
+ }>, {
345
+ NOT_FOUND: {};
329
346
  }>, Record<never, never>>;
330
347
  };
331
348
  };
@@ -339,7 +356,9 @@ declare const contract: {
339
356
  value: z.ZodString;
340
357
  isSecret: z.ZodBoolean;
341
358
  createdAt: z.ZodCoercedDate<unknown>;
342
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
359
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
360
+ BAD_REQUEST: {};
361
+ }>, {
343
362
  NOT_FOUND: {};
344
363
  }>, Record<never, never>>;
345
364
  };
@@ -353,9 +372,10 @@ declare const contract: {
353
372
  }, z.core.$strip>>;
354
373
  }, z.core.$strip>, z.ZodObject<{
355
374
  success: z.ZodLiteral<true>;
356
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
357
- NOT_FOUND: {};
375
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
358
376
  BAD_REQUEST: {};
377
+ }>, {
378
+ NOT_FOUND: {};
359
379
  }>, Record<never, never>>;
360
380
  };
361
381
  update: {
@@ -366,9 +386,10 @@ declare const contract: {
366
386
  isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
367
387
  }, z.core.$strip>, z.ZodObject<{
368
388
  success: z.ZodLiteral<true>;
369
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
370
- NOT_FOUND: {};
389
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
371
390
  BAD_REQUEST: {};
391
+ }>, {
392
+ NOT_FOUND: {};
372
393
  }>, Record<never, never>>;
373
394
  };
374
395
  delete: {
@@ -376,9 +397,10 @@ declare const contract: {
376
397
  environmentVariableId: z.ZodString;
377
398
  }, z.core.$strip>, z.ZodObject<{
378
399
  success: z.ZodLiteral<true>;
379
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
380
- NOT_FOUND: {};
400
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
381
401
  BAD_REQUEST: {};
402
+ }>, {
403
+ NOT_FOUND: {};
382
404
  }>, Record<never, never>>;
383
405
  };
384
406
  };
@@ -456,9 +478,10 @@ declare const contract: {
456
478
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
457
479
  }, z.core.$strip>>;
458
480
  }, z.core.$strip>>;
459
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
460
- NOT_FOUND: {};
481
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
461
482
  BAD_REQUEST: {};
483
+ }>, {
484
+ NOT_FOUND: {};
462
485
  FORBIDDEN: {};
463
486
  }>, Record<never, never>>;
464
487
  };
@@ -533,7 +556,9 @@ declare const contract: {
533
556
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
534
557
  }, z.core.$strip>>;
535
558
  }, z.core.$strip>>;
536
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
559
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
560
+ BAD_REQUEST: {};
561
+ }>, {
537
562
  NOT_FOUND: {};
538
563
  }>, Record<never, never>>;
539
564
  };
@@ -608,9 +633,10 @@ declare const contract: {
608
633
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
609
634
  }, z.core.$strip>>;
610
635
  }, z.core.$strip>>;
611
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
612
- NOT_FOUND: {};
636
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
613
637
  BAD_REQUEST: {};
638
+ }>, {
639
+ NOT_FOUND: {};
614
640
  }>, Record<never, never>>;
615
641
  };
616
642
  create: {
@@ -672,9 +698,10 @@ declare const contract: {
672
698
  installCommand: z.ZodNullable<z.ZodString>;
673
699
  startCommand: z.ZodNullable<z.ZodString>;
674
700
  createdAt: z.ZodCoercedDate<unknown>;
675
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
676
- NOT_FOUND: {};
701
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
677
702
  BAD_REQUEST: {};
703
+ }>, {
704
+ NOT_FOUND: {};
678
705
  FORBIDDEN: {};
679
706
  }>, Record<never, never>>;
680
707
  };
@@ -683,7 +710,9 @@ declare const contract: {
683
710
  projectId: z.ZodString;
684
711
  }, z.core.$strip>, z.ZodObject<{
685
712
  success: z.ZodLiteral<true>;
686
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
713
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
714
+ BAD_REQUEST: {};
715
+ }>, {
687
716
  NOT_FOUND: {};
688
717
  }>, Record<never, never>>;
689
718
  };
@@ -708,7 +737,9 @@ declare const contract: {
708
737
  prompt: z.ZodString;
709
738
  }, z.core.$strip>>;
710
739
  }, z.core.$strip>>;
711
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
740
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
741
+ BAD_REQUEST: {};
742
+ }>, {
712
743
  NOT_FOUND: {};
713
744
  }>, Record<never, never>>;
714
745
  };
@@ -744,9 +775,10 @@ declare const contract: {
744
775
  prompt: z.ZodString;
745
776
  }, z.core.$strip>>;
746
777
  }, z.core.$strip>>;
747
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
748
- NOT_FOUND: {};
778
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
749
779
  BAD_REQUEST: {};
780
+ }>, {
781
+ NOT_FOUND: {};
750
782
  }>, Record<never, never>>;
751
783
  };
752
784
  };
@@ -756,7 +788,9 @@ declare const contract: {
756
788
  subdomain: z.ZodString;
757
789
  ticket: z.ZodString;
758
790
  tunnelHost: z.ZodString;
759
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
791
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
792
+ BAD_REQUEST: {};
793
+ }>, {
760
794
  FORBIDDEN: {};
761
795
  }>, Record<never, never>>;
762
796
  };
@@ -795,9 +829,10 @@ declare const contract: {
795
829
  }, z.core.$strip>>>;
796
830
  }, z.core.$strip>>>;
797
831
  }, z.core.$strip>;
798
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
799
- NOT_FOUND: {};
832
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
800
833
  BAD_REQUEST: {};
834
+ }>, {
835
+ NOT_FOUND: {};
801
836
  }>, Record<never, never>>;
802
837
  };
803
838
  get: {
@@ -828,9 +863,10 @@ declare const contract: {
828
863
  }, z.core.$strip>>>;
829
864
  }, z.core.$strip>>>;
830
865
  }, z.core.$strip>;
831
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
832
- NOT_FOUND: {};
866
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
833
867
  BAD_REQUEST: {};
868
+ }>, {
869
+ NOT_FOUND: {};
834
870
  }>, Record<never, never>>;
835
871
  };
836
872
  };
@@ -849,9 +885,10 @@ declare const contract: {
849
885
  }>>>;
850
886
  }, z.core.$strip>, z.ZodObject<{
851
887
  id: z.ZodString;
852
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
853
- NOT_FOUND: {};
888
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
854
889
  BAD_REQUEST: {};
890
+ }>, {
891
+ NOT_FOUND: {};
855
892
  DNS_RESOLUTION_FAILED: {
856
893
  status: number;
857
894
  };
@@ -942,7 +979,9 @@ declare const contract: {
942
979
  }, z.core.$strip>>;
943
980
  }, z.core.$strip>;
944
981
  }, z.core.$strip>>;
945
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
982
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
983
+ BAD_REQUEST: {};
984
+ }>, {
946
985
  NOT_FOUND: {};
947
986
  }>, Record<never, never>>;
948
987
  };
@@ -979,7 +1018,9 @@ declare const contractForDocs: {
979
1018
  environmentName: z.ZodString;
980
1019
  isCurrent: z.ZodBoolean;
981
1020
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
982
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1021
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1022
+ BAD_REQUEST: {};
1023
+ }>, {
983
1024
  NOT_FOUND: {};
984
1025
  }>, Record<never, never>>;
985
1026
  };
@@ -1005,7 +1046,9 @@ declare const contractForDocs: {
1005
1046
  environmentName: z.ZodString;
1006
1047
  isCurrent: z.ZodBoolean;
1007
1048
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
1008
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1049
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1050
+ BAD_REQUEST: {};
1051
+ }>, {
1009
1052
  NOT_FOUND: {};
1010
1053
  }>, Record<never, never>>;
1011
1054
  };
@@ -1018,7 +1061,9 @@ declare const contractForDocs: {
1018
1061
  content: z.ZodOptional<z.ZodString>;
1019
1062
  }, z.core.$strip>>;
1020
1063
  hasMoreLogs: z.ZodBoolean;
1021
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1064
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1065
+ BAD_REQUEST: {};
1066
+ }>, {
1022
1067
  NOT_FOUND: {};
1023
1068
  }>, Record<never, never>>;
1024
1069
  };
@@ -1030,7 +1075,9 @@ declare const contractForDocs: {
1030
1075
  name: z.ZodString;
1031
1076
  createdAt: z.ZodCoercedDate<unknown>;
1032
1077
  hasStripeAccount: z.ZodBoolean;
1033
- }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
1078
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1079
+ BAD_REQUEST: {};
1080
+ }>, Record<never, never>>;
1034
1081
  };
1035
1082
  };
1036
1083
  analytics: {
@@ -1078,9 +1125,10 @@ declare const contractForDocs: {
1078
1125
  categories: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1079
1126
  }, z.core.$strip>>;
1080
1127
  }, z.core.$strip>;
1081
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1082
- NOT_FOUND: {};
1128
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1083
1129
  BAD_REQUEST: {};
1130
+ }>, {
1131
+ NOT_FOUND: {};
1084
1132
  }>, Record<never, never>>;
1085
1133
  };
1086
1134
  };
@@ -1102,9 +1150,10 @@ declare const contractForDocs: {
1102
1150
  urls: z.ZodArray<z.ZodURL>;
1103
1151
  createdAt: z.ZodCoercedDate<unknown>;
1104
1152
  projectId: z.ZodString;
1105
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1106
- NOT_FOUND: {};
1153
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1107
1154
  BAD_REQUEST: {};
1155
+ }>, {
1156
+ NOT_FOUND: {};
1108
1157
  }>, Record<never, never>>;
1109
1158
  };
1110
1159
  get: {
@@ -1118,7 +1167,9 @@ declare const contractForDocs: {
1118
1167
  domains: z.ZodArray<z.ZodCustomStringFormat<"hostname">>;
1119
1168
  createdAt: z.ZodCoercedDate<unknown>;
1120
1169
  projectId: z.ZodString;
1121
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1170
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1171
+ BAD_REQUEST: {};
1172
+ }>, {
1122
1173
  NOT_FOUND: {};
1123
1174
  }>, Record<never, never>>;
1124
1175
  };
@@ -1156,9 +1207,10 @@ declare const contractForDocs: {
1156
1207
  environmentName: z.ZodString;
1157
1208
  isCurrent: z.ZodBoolean;
1158
1209
  deploymentPageUrl: z.ZodNullable<z.ZodURL>;
1159
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1160
- NOT_FOUND: {};
1210
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1161
1211
  BAD_REQUEST: {};
1212
+ }>, {
1213
+ NOT_FOUND: {};
1162
1214
  CONFLICT: {};
1163
1215
  }>, Record<never, never>>;
1164
1216
  };
@@ -1193,9 +1245,10 @@ declare const contractForDocs: {
1193
1245
  durationInMs: z.ZodOptional<z.ZodNumber>;
1194
1246
  }, z.core.$strip>>;
1195
1247
  nextToken: z.ZodNullable<z.ZodString>;
1196
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1197
- NOT_FOUND: {};
1248
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1198
1249
  BAD_REQUEST: {};
1250
+ }>, {
1251
+ NOT_FOUND: {};
1199
1252
  }>, Record<never, never>>;
1200
1253
  };
1201
1254
  getLatestLogs: {
@@ -1225,9 +1278,10 @@ declare const contractForDocs: {
1225
1278
  method: z.ZodOptional<z.ZodString>;
1226
1279
  durationInMs: z.ZodOptional<z.ZodNumber>;
1227
1280
  }, z.core.$strip>>;
1228
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1229
- NOT_FOUND: {};
1281
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1230
1282
  BAD_REQUEST: {};
1283
+ }>, {
1284
+ NOT_FOUND: {};
1231
1285
  }>, Record<never, never>>;
1232
1286
  };
1233
1287
  };
@@ -1241,7 +1295,9 @@ declare const contractForDocs: {
1241
1295
  value: z.ZodString;
1242
1296
  isSecret: z.ZodBoolean;
1243
1297
  createdAt: z.ZodCoercedDate<unknown>;
1244
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1298
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1299
+ BAD_REQUEST: {};
1300
+ }>, {
1245
1301
  NOT_FOUND: {};
1246
1302
  }>, Record<never, never>>;
1247
1303
  };
@@ -1255,9 +1311,10 @@ declare const contractForDocs: {
1255
1311
  }, z.core.$strip>>;
1256
1312
  }, z.core.$strip>, z.ZodObject<{
1257
1313
  success: z.ZodLiteral<true>;
1258
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1259
- NOT_FOUND: {};
1314
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1260
1315
  BAD_REQUEST: {};
1316
+ }>, {
1317
+ NOT_FOUND: {};
1261
1318
  }>, Record<never, never>>;
1262
1319
  };
1263
1320
  update: {
@@ -1268,9 +1325,10 @@ declare const contractForDocs: {
1268
1325
  isSecret: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1269
1326
  }, z.core.$strip>, z.ZodObject<{
1270
1327
  success: z.ZodLiteral<true>;
1271
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1272
- NOT_FOUND: {};
1328
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1273
1329
  BAD_REQUEST: {};
1330
+ }>, {
1331
+ NOT_FOUND: {};
1274
1332
  }>, Record<never, never>>;
1275
1333
  };
1276
1334
  delete: {
@@ -1278,9 +1336,10 @@ declare const contractForDocs: {
1278
1336
  environmentVariableId: z.ZodString;
1279
1337
  }, z.core.$strip>, z.ZodObject<{
1280
1338
  success: z.ZodLiteral<true>;
1281
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1282
- NOT_FOUND: {};
1339
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1283
1340
  BAD_REQUEST: {};
1341
+ }>, {
1342
+ NOT_FOUND: {};
1284
1343
  }>, Record<never, never>>;
1285
1344
  };
1286
1345
  };
@@ -1358,9 +1417,10 @@ declare const contractForDocs: {
1358
1417
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1359
1418
  }, z.core.$strip>>;
1360
1419
  }, z.core.$strip>>;
1361
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1362
- NOT_FOUND: {};
1420
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1363
1421
  BAD_REQUEST: {};
1422
+ }>, {
1423
+ NOT_FOUND: {};
1364
1424
  FORBIDDEN: {};
1365
1425
  }>, Record<never, never>>;
1366
1426
  };
@@ -1435,7 +1495,9 @@ declare const contractForDocs: {
1435
1495
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1436
1496
  }, z.core.$strip>>;
1437
1497
  }, z.core.$strip>>;
1438
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1498
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1499
+ BAD_REQUEST: {};
1500
+ }>, {
1439
1501
  NOT_FOUND: {};
1440
1502
  }>, Record<never, never>>;
1441
1503
  };
@@ -1510,9 +1572,10 @@ declare const contractForDocs: {
1510
1572
  completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1511
1573
  }, z.core.$strip>>;
1512
1574
  }, z.core.$strip>>;
1513
- }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1514
- NOT_FOUND: {};
1575
+ }, z.core.$strip>>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1515
1576
  BAD_REQUEST: {};
1577
+ }>, {
1578
+ NOT_FOUND: {};
1516
1579
  }>, Record<never, never>>;
1517
1580
  };
1518
1581
  create: {
@@ -1574,9 +1637,10 @@ declare const contractForDocs: {
1574
1637
  installCommand: z.ZodNullable<z.ZodString>;
1575
1638
  startCommand: z.ZodNullable<z.ZodString>;
1576
1639
  createdAt: z.ZodCoercedDate<unknown>;
1577
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1578
- NOT_FOUND: {};
1640
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1579
1641
  BAD_REQUEST: {};
1642
+ }>, {
1643
+ NOT_FOUND: {};
1580
1644
  FORBIDDEN: {};
1581
1645
  }>, Record<never, never>>;
1582
1646
  };
@@ -1585,7 +1649,9 @@ declare const contractForDocs: {
1585
1649
  projectId: z.ZodString;
1586
1650
  }, z.core.$strip>, z.ZodObject<{
1587
1651
  success: z.ZodLiteral<true>;
1588
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1652
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1653
+ BAD_REQUEST: {};
1654
+ }>, {
1589
1655
  NOT_FOUND: {};
1590
1656
  }>, Record<never, never>>;
1591
1657
  };
@@ -1610,7 +1676,9 @@ declare const contractForDocs: {
1610
1676
  prompt: z.ZodString;
1611
1677
  }, z.core.$strip>>;
1612
1678
  }, z.core.$strip>>;
1613
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1679
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1680
+ BAD_REQUEST: {};
1681
+ }>, {
1614
1682
  NOT_FOUND: {};
1615
1683
  }>, Record<never, never>>;
1616
1684
  };
@@ -1646,9 +1714,10 @@ declare const contractForDocs: {
1646
1714
  prompt: z.ZodString;
1647
1715
  }, z.core.$strip>>;
1648
1716
  }, z.core.$strip>>;
1649
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1650
- NOT_FOUND: {};
1717
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1651
1718
  BAD_REQUEST: {};
1719
+ }>, {
1720
+ NOT_FOUND: {};
1652
1721
  }>, Record<never, never>>;
1653
1722
  };
1654
1723
  };
@@ -1658,7 +1727,9 @@ declare const contractForDocs: {
1658
1727
  subdomain: z.ZodString;
1659
1728
  ticket: z.ZodString;
1660
1729
  tunnelHost: z.ZodString;
1661
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1730
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1731
+ BAD_REQUEST: {};
1732
+ }>, {
1662
1733
  FORBIDDEN: {};
1663
1734
  }>, Record<never, never>>;
1664
1735
  };
@@ -1697,9 +1768,10 @@ declare const contractForDocs: {
1697
1768
  }, z.core.$strip>>>;
1698
1769
  }, z.core.$strip>>>;
1699
1770
  }, z.core.$strip>;
1700
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1701
- NOT_FOUND: {};
1771
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1702
1772
  BAD_REQUEST: {};
1773
+ }>, {
1774
+ NOT_FOUND: {};
1703
1775
  }>, Record<never, never>>;
1704
1776
  };
1705
1777
  get: {
@@ -1730,9 +1802,10 @@ declare const contractForDocs: {
1730
1802
  }, z.core.$strip>>>;
1731
1803
  }, z.core.$strip>>>;
1732
1804
  }, z.core.$strip>;
1733
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1734
- NOT_FOUND: {};
1805
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1735
1806
  BAD_REQUEST: {};
1807
+ }>, {
1808
+ NOT_FOUND: {};
1736
1809
  }>, Record<never, never>>;
1737
1810
  };
1738
1811
  };
@@ -1751,9 +1824,10 @@ declare const contractForDocs: {
1751
1824
  }>>>;
1752
1825
  }, z.core.$strip>, z.ZodObject<{
1753
1826
  id: z.ZodString;
1754
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1755
- NOT_FOUND: {};
1827
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1756
1828
  BAD_REQUEST: {};
1829
+ }>, {
1830
+ NOT_FOUND: {};
1757
1831
  DNS_RESOLUTION_FAILED: {
1758
1832
  status: number;
1759
1833
  };
@@ -1844,7 +1918,9 @@ declare const contractForDocs: {
1844
1918
  }, z.core.$strip>>;
1845
1919
  }, z.core.$strip>;
1846
1920
  }, z.core.$strip>>;
1847
- }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1921
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, {
1922
+ BAD_REQUEST: {};
1923
+ }>, {
1848
1924
  NOT_FOUND: {};
1849
1925
  }>, Record<never, never>>;
1850
1926
  };
package/dist/index.mjs CHANGED
@@ -407,7 +407,8 @@ z.object({
407
407
  createdAt: z.coerce.date(),
408
408
  environmentId: z.string(),
409
409
  content: z.string(),
410
- source: z.enum(["model", "user"])
410
+ source: z.enum(["model", "user"]),
411
+ clientName: z.string().nullable()
411
412
  });
412
413
  z.object({
413
414
  content: z.string(),
@@ -443,6 +444,7 @@ z.object({
443
444
  environmentId: z.string(),
444
445
  toolName: z.string(),
445
446
  message: z.string(),
447
+ clientName: z.string().nullable(),
446
448
  categories: z.array(intentCategorySchema)
447
449
  });
448
450
  const signalCategorySchema = z.object({
@@ -507,6 +509,246 @@ z.enum([
507
509
  "DEBUG",
508
510
  "ERROR"
509
511
  ]);
512
+ /** Only names a vendor actually ships belong here: lookalikes like `claude-code-test` are customers' own scripts. */
513
+ const MCP_CLIENT_GROUPS = [
514
+ {
515
+ id: "claude_code",
516
+ label: "Claude Code",
517
+ vendor: "anthropic",
518
+ rawNames: ["claude-code", "Anthropic/ClaudeCodeDesktop"]
519
+ },
520
+ {
521
+ id: "claude",
522
+ label: "Claude",
523
+ vendor: "anthropic",
524
+ rawNames: [
525
+ "Anthropic/ClaudeAI",
526
+ "claude-ai",
527
+ "claude",
528
+ "Claude",
529
+ "claude-desktop",
530
+ "claude-desktop-3p"
531
+ ]
532
+ },
533
+ {
534
+ id: "claude_mobile",
535
+ label: "Claude mobile",
536
+ vendor: "anthropic",
537
+ rawNames: ["claude-ios", "ClaudeAndroid"]
538
+ },
539
+ {
540
+ id: "claude_cowork",
541
+ label: "Claude Cowork",
542
+ vendor: "anthropic",
543
+ rawNames: ["Anthropic/Cowork"]
544
+ },
545
+ {
546
+ id: "claude_toolbox",
547
+ label: "Claude Toolbox",
548
+ vendor: "anthropic",
549
+ rawNames: ["Anthropic/Toolbox", "Anthropic/toolbox-bootstrap"]
550
+ },
551
+ {
552
+ id: "anthropic_api",
553
+ label: "Anthropic API",
554
+ vendor: "anthropic",
555
+ rawNames: ["Anthropic/API"]
556
+ },
557
+ {
558
+ id: "anthropic_connector_refresh",
559
+ label: "Anthropic (connector refresh)",
560
+ vendor: "anthropic",
561
+ rawNames: ["Anthropic"]
562
+ },
563
+ {
564
+ id: "codex",
565
+ label: "Codex",
566
+ vendor: "openai",
567
+ rawNames: [
568
+ "codex-mcp-client",
569
+ "codex",
570
+ "Codex",
571
+ "codex-cli",
572
+ "openai-mcp (Codex)"
573
+ ]
574
+ },
575
+ {
576
+ id: "chatgpt",
577
+ label: "ChatGPT",
578
+ vendor: "openai",
579
+ rawNames: ["openai-mcp (ChatGPT)"]
580
+ },
581
+ {
582
+ id: "openai_responses_api",
583
+ label: "OpenAI Responses API",
584
+ vendor: "openai",
585
+ rawNames: ["openai-mcp (Responses API)"]
586
+ },
587
+ {
588
+ id: "openai_agent_builder",
589
+ label: "OpenAI Agent Builder",
590
+ vendor: "openai",
591
+ rawNames: ["openai-mcp (Agent Builder)"]
592
+ },
593
+ {
594
+ id: "openai_other",
595
+ label: "OpenAI Other",
596
+ vendor: "openai",
597
+ rawNames: ["openai-mcp"]
598
+ },
599
+ {
600
+ id: "cursor",
601
+ label: "Cursor",
602
+ vendor: "cursor",
603
+ rawNames: [
604
+ "cursor-vscode",
605
+ "Cursor",
606
+ "cursor"
607
+ ]
608
+ },
609
+ {
610
+ id: "cline",
611
+ label: "Cline",
612
+ vendor: "cline",
613
+ rawNames: [
614
+ "Cline",
615
+ "cline",
616
+ "@cline/core"
617
+ ]
618
+ },
619
+ {
620
+ id: "github_copilot",
621
+ label: "GitHub Copilot",
622
+ vendor: "githubCopilot",
623
+ rawNames: [
624
+ "Copilot",
625
+ "github-copilot-developer",
626
+ "Copilot MCP Gateway",
627
+ "Xcode/copilot-xcode"
628
+ ]
629
+ },
630
+ {
631
+ id: "gemini_cli",
632
+ label: "Gemini CLI",
633
+ vendor: "google",
634
+ rawNames: ["gemini-cli-mcp-client", "gemini-cli"]
635
+ },
636
+ {
637
+ id: "antigravity",
638
+ label: "Antigravity",
639
+ vendor: "google",
640
+ rawNames: ["antigravity-client"]
641
+ },
642
+ {
643
+ id: "gemini",
644
+ label: "Gemini",
645
+ vendor: "google",
646
+ rawNames: ["Gemini", "google-ai-edge-gallery"]
647
+ },
648
+ {
649
+ id: "windsurf",
650
+ label: "Windsurf",
651
+ vendor: "windsurf",
652
+ rawNames: ["Windsurf", "windsurf-client"]
653
+ },
654
+ {
655
+ id: "mistral",
656
+ label: "Mistral / Le Chat",
657
+ vendor: "mistral",
658
+ rawNames: ["Mistral"],
659
+ rawNamePrefixes: ["connector:custom-mcp:"]
660
+ },
661
+ {
662
+ id: "n8n",
663
+ label: "n8n",
664
+ vendor: "n8n",
665
+ rawNames: [
666
+ "@n8n/n8n-nodes-langchain.mcpClient",
667
+ "@n8n/n8n-nodes-langchain.mcpClientTool",
668
+ "n8n"
669
+ ]
670
+ },
671
+ {
672
+ id: "alpic_playground",
673
+ label: "Alpic Playground",
674
+ vendor: "alpic",
675
+ rawNames: ["alpic-playground", "playground"]
676
+ },
677
+ {
678
+ id: "opencode",
679
+ label: "opencode",
680
+ vendor: "opencode",
681
+ rawNames: ["opencode"]
682
+ },
683
+ {
684
+ id: "zed",
685
+ label: "Zed",
686
+ vendor: "zed",
687
+ rawNames: ["Zed", "zed"]
688
+ },
689
+ {
690
+ id: "zapier",
691
+ label: "Zapier",
692
+ vendor: "zapier",
693
+ rawNames: ["Zapier", "zapier"]
694
+ },
695
+ {
696
+ id: "make",
697
+ label: "Make",
698
+ vendor: "make",
699
+ rawNames: ["Make", "make"]
700
+ },
701
+ {
702
+ id: "librechat",
703
+ label: "LibreChat",
704
+ vendor: "mcp",
705
+ rawNames: ["LibreChat", "librechat"]
706
+ },
707
+ {
708
+ id: "jan",
709
+ label: "Jan",
710
+ vendor: "mcp",
711
+ rawNames: ["Jan", "jan"]
712
+ },
713
+ {
714
+ id: "goose",
715
+ label: "goose",
716
+ vendor: "mcp",
717
+ rawNames: ["goose", "Goose"]
718
+ },
719
+ {
720
+ id: "mcphost",
721
+ label: "mcphost",
722
+ vendor: "mcp",
723
+ rawNames: ["mcphost"]
724
+ },
725
+ {
726
+ id: "mcporter",
727
+ label: "mcporter",
728
+ vendor: "mcp",
729
+ rawNames: ["mcporter"]
730
+ },
731
+ {
732
+ id: "rmcp",
733
+ label: "rmcp",
734
+ vendor: "mcp",
735
+ rawNames: ["rmcp"]
736
+ },
737
+ {
738
+ id: "unnamed_client",
739
+ label: "Unnamed client",
740
+ vendor: "mcp",
741
+ rawNames: [
742
+ "mcp",
743
+ "unknown",
744
+ ""
745
+ ]
746
+ }
747
+ ];
748
+ /** A source pattern, not a RegExp, because analytics renders the same rule into ClickHouse RE2, which shares this syntax. */
749
+ const MCP_REMOTE_WRAPPER_SUFFIX = String.raw` \(via mcp-remote [^\n]+?\)$`;
750
+ new RegExp(MCP_REMOTE_WRAPPER_SUFFIX);
751
+ new Map(MCP_CLIENT_GROUPS.map((group) => [group.id, group]));
510
752
  const runtimeSchema = z.enum([
511
753
  "python3.13",
512
754
  "python3.14",
@@ -1178,6 +1420,13 @@ z.object({
1178
1420
  customerUsage: customerUsageSchema.nullable(),
1179
1421
  partnerDiscount: partnerDiscountSchema.nullable()
1180
1422
  });
1423
+ const REQUEST_USAGE_THRESHOLD_PERCENTS = [
1424
+ 50,
1425
+ 75,
1426
+ 100
1427
+ ];
1428
+ z.literal(REQUEST_USAGE_THRESHOLD_PERCENTS);
1429
+ [...REQUEST_USAGE_THRESHOLD_PERCENTS].reverse();
1181
1430
  //#endregion
1182
1431
  //#region src/auth-scope.ts
1183
1432
  /** Accepts an API key or OAuth access token (default for most routes). */
@@ -1308,17 +1557,15 @@ const isValidLogTimeInput = (value) => {
1308
1557
  if (ms(value) !== void 0) return true;
1309
1558
  return !Number.isNaN(new Date(value).getTime());
1310
1559
  };
1311
- const createEnvironmentContractV1 = oc.route({
1560
+ const base = oc.errors({ BAD_REQUEST: {} });
1561
+ const createEnvironmentContractV1 = base.route({
1312
1562
  path: "/v1/environments",
1313
1563
  method: "POST",
1314
1564
  summary: "Create an environment",
1315
1565
  description: "Create an environment for a project",
1316
1566
  tags: ["environments"],
1317
1567
  successDescription: "The environment has been created successfully"
1318
- }).errors({
1319
- NOT_FOUND: {},
1320
- BAD_REQUEST: {}
1321
- }).input(z.object({
1568
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1322
1569
  projectId: z.string().describe("The ID of the project to create the environment for"),
1323
1570
  name: z.string().min(1).describe("The name of the environment"),
1324
1571
  sourceBranch: z.string().min(1).describe("The branch used to build the environment"),
@@ -1331,7 +1578,7 @@ const createEnvironmentContractV1 = oc.route({
1331
1578
  createdAt: z.coerce.date(),
1332
1579
  projectId: z.string().describe("The ID of the project the environment belongs to")
1333
1580
  }));
1334
- const getEnvironmentContractV1 = oc.route({
1581
+ const getEnvironmentContractV1 = base.route({
1335
1582
  path: "/v1/environments/{environmentId}",
1336
1583
  method: "GET",
1337
1584
  summary: "Get an environment",
@@ -1388,7 +1635,7 @@ const projectOutputSchema = z.object({
1388
1635
  productionEnvironment: productionEnvironmentSchema.nullable(),
1389
1636
  environments: z.array(environmentSchema)
1390
1637
  });
1391
- const getProjectContractV1 = oc.route({
1638
+ const getProjectContractV1 = base.route({
1392
1639
  path: "/v1/projects/{projectId}",
1393
1640
  method: "GET",
1394
1641
  summary: "Get a project",
@@ -1396,18 +1643,15 @@ const getProjectContractV1 = oc.route({
1396
1643
  tags: ["projects"],
1397
1644
  successDescription: "The project details"
1398
1645
  }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(projectOutputSchema);
1399
- const listProjectsContractV1 = oc.route({
1646
+ const listProjectsContractV1 = base.route({
1400
1647
  path: "/v1/projects",
1401
1648
  method: "GET",
1402
1649
  summary: "List projects",
1403
1650
  description: "List all projects for a team",
1404
1651
  tags: ["projects"],
1405
1652
  successDescription: "The list of projects"
1406
- }).errors({
1407
- NOT_FOUND: {},
1408
- BAD_REQUEST: {}
1409
- }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
1410
- const createProjectContractV1 = oc.route({
1653
+ }).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.array(projectOutputSchema));
1654
+ const createProjectContractV1 = base.route({
1411
1655
  path: "/v1/projects",
1412
1656
  method: "POST",
1413
1657
  summary: "Create a project",
@@ -1416,7 +1660,6 @@ const createProjectContractV1 = oc.route({
1416
1660
  successDescription: "The project has been created successfully"
1417
1661
  }).errors({
1418
1662
  NOT_FOUND: {},
1419
- BAD_REQUEST: {},
1420
1663
  FORBIDDEN: {}
1421
1664
  }).input(z.object({
1422
1665
  teamId: z.string().optional(),
@@ -1457,7 +1700,7 @@ const environmentVariableOutputSchema = z.object({
1457
1700
  isSecret: z.boolean(),
1458
1701
  createdAt: z.coerce.date()
1459
1702
  });
1460
- const listEnvironmentVariablesContractV1 = oc.route({
1703
+ const listEnvironmentVariablesContractV1 = base.route({
1461
1704
  path: "/v1/environments/{environmentId}/environment-variables",
1462
1705
  method: "GET",
1463
1706
  summary: "List environment variables",
@@ -1465,48 +1708,39 @@ const listEnvironmentVariablesContractV1 = oc.route({
1465
1708
  tags: ["environments"],
1466
1709
  successDescription: "The list of environment variables"
1467
1710
  }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(z.array(environmentVariableOutputSchema));
1468
- const createEnvironmentVariablesContractV1 = oc.route({
1711
+ const createEnvironmentVariablesContractV1 = base.route({
1469
1712
  path: "/v1/environments/{environmentId}/environment-variables",
1470
1713
  method: "POST",
1471
1714
  summary: "Add environment variables",
1472
1715
  description: "Add one or more environment variables to an environment",
1473
1716
  tags: ["environments"],
1474
1717
  successDescription: "The environment variables have been added successfully"
1475
- }).errors({
1476
- NOT_FOUND: {},
1477
- BAD_REQUEST: {}
1478
- }).input(z.object({
1718
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1479
1719
  environmentId: z.string().describe("The ID of the environment"),
1480
1720
  environmentVariables: environmentVariablesSchema
1481
1721
  })).output(z.object({ success: z.literal(true) }));
1482
- const updateEnvironmentVariableContractV1 = oc.route({
1722
+ const updateEnvironmentVariableContractV1 = base.route({
1483
1723
  path: "/v1/environment-variables/{environmentVariableId}",
1484
1724
  method: "PATCH",
1485
1725
  summary: "Update an environment variable",
1486
1726
  description: "Update an environment variable by ID",
1487
1727
  tags: ["environments"],
1488
1728
  successDescription: "The environment variable has been updated successfully"
1489
- }).errors({
1490
- NOT_FOUND: {},
1491
- BAD_REQUEST: {}
1492
- }).input(z.object({
1729
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1493
1730
  environmentVariableId: z.string().describe("The ID of the environment variable"),
1494
1731
  key: environmentVariableSchema.shape.key,
1495
1732
  value: environmentVariableSchema.shape.value.optional(),
1496
1733
  isSecret: environmentVariableSchema.shape.isSecret.optional()
1497
1734
  })).output(z.object({ success: z.literal(true) }));
1498
- const deleteEnvironmentVariableContractV1 = oc.route({
1735
+ const deleteEnvironmentVariableContractV1 = base.route({
1499
1736
  path: "/v1/environment-variables/{environmentVariableId}",
1500
1737
  method: "DELETE",
1501
1738
  summary: "Delete an environment variable",
1502
1739
  description: "Delete an environment variable by ID",
1503
1740
  tags: ["environments"],
1504
1741
  successDescription: "The environment variable has been deleted successfully"
1505
- }).errors({
1506
- NOT_FOUND: {},
1507
- BAD_REQUEST: {}
1508
- }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1509
- const deleteProjectContractV1 = oc.route({
1742
+ }).errors({ NOT_FOUND: {} }).input(z.object({ environmentVariableId: z.string().describe("The ID of the environment variable") })).output(z.object({ success: z.literal(true) }));
1743
+ const deleteProjectContractV1 = base.route({
1510
1744
  path: "/v1/projects/{projectId}",
1511
1745
  method: "DELETE",
1512
1746
  summary: "Delete a project",
@@ -1514,7 +1748,7 @@ const deleteProjectContractV1 = oc.route({
1514
1748
  tags: ["projects"],
1515
1749
  successDescription: "The project has been deleted successfully"
1516
1750
  }).errors({ NOT_FOUND: {} }).input(z.object({ projectId: z.string().describe("The ID of the project") })).output(z.object({ success: z.literal(true) }));
1517
- const updateProjectContractV1 = oc.route({
1751
+ const updateProjectContractV1 = base.route({
1518
1752
  path: "/v1/projects/{projectId}",
1519
1753
  method: "PATCH",
1520
1754
  summary: "Update a project",
@@ -1523,14 +1757,13 @@ const updateProjectContractV1 = oc.route({
1523
1757
  successDescription: "The project has been updated successfully"
1524
1758
  }).errors({
1525
1759
  NOT_FOUND: {},
1526
- BAD_REQUEST: {},
1527
1760
  FORBIDDEN: {}
1528
1761
  }).input(z.object({
1529
1762
  projectId: z.string().describe("The ID of the project"),
1530
1763
  name: z.string().min(1).max(100).optional().describe("The new name for the project"),
1531
1764
  sourceRepository: z.string().nullable().optional().describe("The source repository to connect to the project")
1532
1765
  })).output(projectOutputSchema);
1533
- const deployEnvironmentContractV1 = oc.route({
1766
+ const deployEnvironmentContractV1 = base.route({
1534
1767
  path: "/v1/environments/{environmentId}/deploy",
1535
1768
  method: "POST",
1536
1769
  summary: "Deploy an environment",
@@ -1539,29 +1772,25 @@ const deployEnvironmentContractV1 = oc.route({
1539
1772
  successDescription: "The environment has been deployed successfully"
1540
1773
  }).errors({
1541
1774
  NOT_FOUND: {},
1542
- BAD_REQUEST: {},
1543
1775
  CONFLICT: {}
1544
1776
  }).input(z.object({
1545
1777
  environmentId: z.string().describe("The ID of the environment to deploy"),
1546
1778
  token: z.string().describe("The token to identify the source archive").optional(),
1547
1779
  settings: buildSettingsSchema.extend({ transport: transportSchema }).optional().describe("Project settings detected by the client from the source. When provided, the server skips downloading and extracting the source archive to detect them.")
1548
1780
  })).output(deploymentSchema);
1549
- const uploadDeploymentArtifactContractV1 = oc.route({
1781
+ const uploadDeploymentArtifactContractV1 = base.route({
1550
1782
  path: "/v1/deployments/upload",
1551
1783
  method: "POST",
1552
1784
  summary: "Upload deployment artifacts",
1553
1785
  description: "Return a presigned S3 URL to upload a deployment artifact",
1554
1786
  tags: ["deployments"],
1555
1787
  successDescription: "The presigned upload URL has been generated successfully"
1556
- }).errors({
1557
- NOT_FOUND: {},
1558
- BAD_REQUEST: {}
1559
- }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
1788
+ }).errors({ NOT_FOUND: {} }).input(z.object({ teamId: z.string().optional() }).optional()).output(z.object({
1560
1789
  uploadUrl: z.url().describe("Presigned S3 URL to upload the source archive with HTTP PUT"),
1561
1790
  token: z.string().describe("Token to identify the source archive"),
1562
1791
  expiresAt: z.coerce.date().describe("Expiration date of the presigned URL")
1563
1792
  }));
1564
- const listDeploymentsContractV1 = oc.route({
1793
+ const listDeploymentsContractV1 = base.route({
1565
1794
  path: "/v1/projects/{projectId}/deployments",
1566
1795
  method: "GET",
1567
1796
  summary: "List project deployments",
@@ -1573,7 +1802,7 @@ const listDeploymentsContractV1 = oc.route({
1573
1802
  status: z.array(deploymentStatusSchema).optional().describe("Filter by one or more statuses"),
1574
1803
  environmentId: z.string().optional().describe("Filter by environment ID")
1575
1804
  })).output(z.array(deploymentSchema));
1576
- const getDeploymentContractV1 = oc.route({
1805
+ const getDeploymentContractV1 = base.route({
1577
1806
  path: "/v1/deployments/{deploymentId}",
1578
1807
  method: "GET",
1579
1808
  summary: "Get a deployment",
@@ -1596,17 +1825,14 @@ const logEntrySchema = z.object({
1596
1825
  method: z.string().optional(),
1597
1826
  durationInMs: z.number().optional()
1598
1827
  });
1599
- const getLogsContractV1 = oc.route({
1828
+ const getLogsContractV1 = base.route({
1600
1829
  path: "/v1/environments/{environmentId}/logs",
1601
1830
  method: "GET",
1602
1831
  summary: "Get logs",
1603
1832
  description: "Get logs for an environment",
1604
1833
  tags: ["environments"],
1605
1834
  successDescription: "The logs"
1606
- }).errors({
1607
- NOT_FOUND: {},
1608
- BAD_REQUEST: {}
1609
- }).input(z.object({
1835
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1610
1836
  environmentId: z.string().describe("The ID of the environment"),
1611
1837
  since: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("Start time — ISO 8601 (2024-01-01T00:00:00Z) or relative (1h, 30m, 2d)"),
1612
1838
  until: z.string().refine(isValidLogTimeInput, { message: "Invalid time. Use relative (1h, 30m, 2d) or ISO 8601 format." }).optional().describe("End time — ISO 8601 or relative"),
@@ -1623,17 +1849,14 @@ const getLogsContractV1 = oc.route({
1623
1849
  logs: z.array(logEntrySchema),
1624
1850
  nextToken: z.string().nullable()
1625
1851
  }));
1626
- const getLatestLogsContractV1 = oc.route({
1852
+ const getLatestLogsContractV1 = base.route({
1627
1853
  path: "/v1/environments/{environmentId}/latest-logs",
1628
1854
  method: "GET",
1629
1855
  summary: "Get latest logs",
1630
1856
  description: "Get the N most recent logs for an environment",
1631
1857
  tags: ["environments"],
1632
1858
  successDescription: "The latest logs"
1633
- }).errors({
1634
- NOT_FOUND: {},
1635
- BAD_REQUEST: {}
1636
- }).input(z.object({
1859
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1637
1860
  environmentId: z.string().describe("The ID of the environment"),
1638
1861
  limit: z.coerce.number().int().min(1).max(1e3).default(100).describe("Number of most recent log entries to return"),
1639
1862
  level: z.array(z.enum([
@@ -1644,7 +1867,7 @@ const getLatestLogsContractV1 = oc.route({
1644
1867
  ])).optional().describe("Filter by log level"),
1645
1868
  search: z.string().optional().describe("Filter pattern to search for in log content")
1646
1869
  })).output(z.object({ logs: z.array(logEntrySchema) }));
1647
- const getDeploymentLogsContractV1 = oc.route({
1870
+ const getDeploymentLogsContractV1 = base.route({
1648
1871
  path: "/v1/deployments/{deploymentId}/logs",
1649
1872
  method: "GET",
1650
1873
  summary: "Get deployment logs",
@@ -1671,17 +1894,14 @@ const analyticsTimeSeriesSchema = z.object({
1671
1894
  output_token_mean: z.array(analyticsDataPointSchema),
1672
1895
  task_count: z.array(analyticsDataPointSchema)
1673
1896
  });
1674
- const getProjectAnalyticsContractV1 = oc.route({
1897
+ const getProjectAnalyticsContractV1 = base.route({
1675
1898
  path: "/v1/analytics/{projectId}",
1676
1899
  method: "GET",
1677
1900
  summary: "Get project analytics",
1678
1901
  description: "Get analytics data for a project over a time range",
1679
1902
  tags: ["analytics"],
1680
1903
  successDescription: "The project analytics data"
1681
- }).errors({
1682
- NOT_FOUND: {},
1683
- BAD_REQUEST: {}
1684
- }).input(z.object({
1904
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1685
1905
  projectId: z.string().describe("The ID of the project"),
1686
1906
  startTimestamp: z.coerce.number().describe("Start timestamp in milliseconds"),
1687
1907
  endTimestamp: z.coerce.number().describe("End timestamp in milliseconds"),
@@ -1696,7 +1916,7 @@ const getProjectAnalyticsContractV1 = oc.route({
1696
1916
  }),
1697
1917
  timeSeries: analyticsTimeSeriesSchema
1698
1918
  }));
1699
- const listTeamsContractV1 = oc.route({
1919
+ const listTeamsContractV1 = base.route({
1700
1920
  path: "/v1/teams",
1701
1921
  method: "GET",
1702
1922
  summary: "List teams",
@@ -1709,7 +1929,7 @@ const listTeamsContractV1 = oc.route({
1709
1929
  createdAt: z.coerce.date(),
1710
1930
  hasStripeAccount: z.boolean()
1711
1931
  })));
1712
- const getTunnelTicketContractV1 = oc.route({
1932
+ const getTunnelTicketContractV1 = base.route({
1713
1933
  path: "/v1/tunnels/ticket",
1714
1934
  method: "GET",
1715
1935
  summary: "Get a tunnel ticket",
@@ -1721,16 +1941,13 @@ const getTunnelTicketContractV1 = oc.route({
1721
1941
  ticket: z.string().describe("The signed tunnel ticket"),
1722
1942
  tunnelHost: z.string().describe("The tunnel host to connect to")
1723
1943
  }));
1724
- const publishServerContractV1 = oc.route({
1944
+ const publishServerContractV1 = base.route({
1725
1945
  path: "/v1/distribution/publish",
1726
1946
  method: "POST",
1727
1947
  summary: "Publish a server to the MCP registry",
1728
1948
  tags: ["distribution"],
1729
1949
  successDescription: "The server has been published successfully"
1730
- }).errors({
1731
- NOT_FOUND: {},
1732
- BAD_REQUEST: {}
1733
- }).input(z.object({
1950
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1734
1951
  projectId: z.string(),
1735
1952
  domain: z.string(),
1736
1953
  title: z.string().min(1).max(100),
@@ -1739,17 +1956,14 @@ const publishServerContractV1 = oc.route({
1739
1956
  iconSrc: z.url().max(255).optional(),
1740
1957
  dryRun: z.boolean().optional()
1741
1958
  })).output(z.object({ serverFields: serverFieldsSchema }));
1742
- const getServerInfoContractV1 = oc.route({
1959
+ const getServerInfoContractV1 = base.route({
1743
1960
  path: "/v1/distribution/get",
1744
1961
  method: "GET",
1745
1962
  summary: "Get server info",
1746
1963
  description: "Get info about a server",
1747
1964
  tags: ["distribution"],
1748
1965
  successDescription: "The server info"
1749
- }).errors({
1750
- NOT_FOUND: {},
1751
- BAD_REQUEST: {}
1752
- }).input(z.object({
1966
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1753
1967
  projectId: z.string(),
1754
1968
  domain: z.string()
1755
1969
  })).output(z.object({ serverFields: serverFieldsSchema }));
@@ -1768,7 +1982,7 @@ const playgroundOutputSchema = z.object({
1768
1982
  isPlaygroundEnabled: z.boolean(),
1769
1983
  serverMetadata: playgroundServerMetadataOutputSchema.nullable()
1770
1984
  });
1771
- const getPlaygroundContractV1 = oc.route({
1985
+ const getPlaygroundContractV1 = base.route({
1772
1986
  path: "/v1/environments/{environmentId}/playground",
1773
1987
  method: "GET",
1774
1988
  summary: "Get playground configuration",
@@ -1776,17 +1990,14 @@ const getPlaygroundContractV1 = oc.route({
1776
1990
  tags: ["environments"],
1777
1991
  successDescription: "The playground configuration"
1778
1992
  }).errors({ NOT_FOUND: {} }).input(z.object({ environmentId: z.string().describe("The ID of the environment") })).output(playgroundOutputSchema);
1779
- const upsertPlaygroundContractV1 = oc.route({
1993
+ const upsertPlaygroundContractV1 = base.route({
1780
1994
  path: "/v1/environments/{environmentId}/playground",
1781
1995
  method: "PUT",
1782
1996
  summary: "Update playground configuration",
1783
1997
  description: "Update the playground configuration for an environment. All fields are optional — only provided fields are updated.",
1784
1998
  tags: ["environments"],
1785
1999
  successDescription: "The updated playground configuration"
1786
- }).errors({
1787
- NOT_FOUND: {},
1788
- BAD_REQUEST: {}
1789
- }).input(z.object({
2000
+ }).errors({ NOT_FOUND: {} }).input(z.object({
1790
2001
  environmentId: z.string().describe("The ID of the environment"),
1791
2002
  isPlaygroundEnabled: z.boolean().optional(),
1792
2003
  name: z.string().min(1).max(100).optional(),
@@ -1794,7 +2005,7 @@ const upsertPlaygroundContractV1 = oc.route({
1794
2005
  headers: z.array(playgroundHeaderSchema).optional(),
1795
2006
  examplePrompts: z.array(playgroundExamplePromptSchema).max(5).optional()
1796
2007
  })).output(playgroundOutputSchema);
1797
- const createBeaconContractV1 = oc.route({
2008
+ const createBeaconContractV1 = base.route({
1798
2009
  path: "/v1/beacon/audits",
1799
2010
  method: "POST",
1800
2011
  summary: "Create a beacon audit",
@@ -1803,7 +2014,6 @@ const createBeaconContractV1 = oc.route({
1803
2014
  successDescription: "The audit has been created"
1804
2015
  }).errors({
1805
2016
  NOT_FOUND: {},
1806
- BAD_REQUEST: {},
1807
2017
  DNS_RESOLUTION_FAILED: { status: 400 }
1808
2018
  }).input(z.object({
1809
2019
  targetUrl: z.url().describe("The HTTPS URL of the MCP server to audit"),
@@ -1811,7 +2021,7 @@ const createBeaconContractV1 = oc.route({
1811
2021
  projectId: z.string().optional().describe("The project ID to associate the audit with"),
1812
2022
  excludeCategories: z.array(checkCategorySchema).optional().describe("Check categories to exclude from the audit")
1813
2023
  })).output(z.object({ id: z.string() }));
1814
- const getBeaconContractV1 = oc.route({
2024
+ const getBeaconContractV1 = base.route({
1815
2025
  path: "/v1/beacon/audits/{auditId}",
1816
2026
  method: "GET",
1817
2027
  summary: "Get a beacon audit",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/api",
3
- "version": "0.0.0-dev.ge93b6b2",
3
+ "version": "0.0.0-dev.ge97c360",
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.13",
36
+ "@orpc/contract": "^1.15.0",
37
37
  "ms": "^2.1.3",
38
38
  "zod": "^4.4.3"
39
39
  },
40
40
  "devDependencies": {
41
- "@orpc/openapi": "^1.14.13",
42
- "@orpc/zod": "^1.14.13",
41
+ "@orpc/openapi": "^1.15.0",
42
+ "@orpc/zod": "^1.15.0",
43
43
  "@total-typescript/tsconfig": "^1.0.4",
44
44
  "@types/ms": "^2.1.0",
45
45
  "shx": "^0.4.0",