terse-types 0.0.24 → 0.0.26

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/Configs.d.ts CHANGED
@@ -14,7 +14,8 @@ export declare enum ConfigType {
14
14
  DATADOG = "DATADOG",
15
15
  TIME_TRIGGER = "time_trigger",
16
16
  LAUNCHDARKLY = "launchdarkly",
17
- TERSE = "terse",
17
+ WEB = "web",
18
+ IMAGE_EDIT = "image_edit",
18
19
  WORKOS_INPUT = "workos_input",
19
20
  WORKOS_OUTPUT = "workos_output",
20
21
  ATTIO_OUTPUT = "attio_output",
@@ -141,10 +142,18 @@ export declare const LaunchDarklyConfigMetadata: {
141
142
  readonly isInput: false;
142
143
  readonly isOutput: true;
143
144
  };
144
- export declare const TerseConfigMetadata: {
145
- readonly configType: ConfigType.TERSE;
146
- readonly name: "Terse Skills";
147
- readonly description: "Built-in capabilities like web search (always available to agents)";
145
+ export declare const WebConfigMetadata: {
146
+ readonly configType: ConfigType.WEB;
147
+ readonly name: "Web";
148
+ readonly description: "Built-in web search, page extraction, and multi-source research";
149
+ readonly integrationType: IntegrationType.TERSE;
150
+ readonly isInput: false;
151
+ readonly isOutput: true;
152
+ };
153
+ export declare const ImageEditConfigMetadata: {
154
+ readonly configType: ConfigType.IMAGE_EDIT;
155
+ readonly name: "Image Edit";
156
+ readonly description: "Built-in image editing and generation capability";
148
157
  readonly integrationType: IntegrationType.TERSE;
149
158
  readonly isInput: false;
150
159
  readonly isOutput: true;
@@ -530,14 +539,26 @@ export declare class LaunchDarklyConfig extends BaseConfigInstance<IntegrationTy
530
539
  isComplete(): boolean;
531
540
  formatForAgent(): string;
532
541
  }
533
- export declare const TerseConfigSchema: z.ZodObject<{
542
+ export declare const WebConfigSchema: z.ZodObject<{
534
543
  integrationId: z.ZodLiteral<"system">;
535
544
  integrationType: z.ZodLiteral<IntegrationType.TERSE>;
536
- configType: z.ZodLiteral<ConfigType.TERSE>;
545
+ configType: z.ZodLiteral<ConfigType.WEB>;
537
546
  }, z.core.$strip>;
538
- export type TerseConfigData = z.infer<typeof TerseConfigSchema>;
539
- export type TerseConfigInstance = TerseConfigData & ConfigBehavior;
540
- export declare class TerseConfig extends BaseConfigInstance<IntegrationType.TERSE, ConfigType.TERSE, "system"> implements TerseConfigInstance {
547
+ export type WebConfigData = z.infer<typeof WebConfigSchema>;
548
+ export type WebConfigInstance = WebConfigData & ConfigBehavior;
549
+ export declare class WebConfig extends BaseConfigInstance<IntegrationType.TERSE, ConfigType.WEB, "system"> implements WebConfigInstance {
550
+ constructor();
551
+ isComplete(): boolean;
552
+ formatForAgent(): string;
553
+ }
554
+ export declare const ImageEditConfigSchema: z.ZodObject<{
555
+ integrationId: z.ZodLiteral<"system">;
556
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
557
+ configType: z.ZodLiteral<ConfigType.IMAGE_EDIT>;
558
+ }, z.core.$strip>;
559
+ export type ImageEditConfigData = z.infer<typeof ImageEditConfigSchema>;
560
+ export type ImageEditConfigInstance = ImageEditConfigData & ConfigBehavior;
561
+ export declare class ImageEditConfig extends BaseConfigInstance<IntegrationType.TERSE, ConfigType.IMAGE_EDIT, "system"> implements ImageEditConfigInstance {
541
562
  constructor();
542
563
  isComplete(): boolean;
543
564
  formatForAgent(): string;
@@ -767,7 +788,11 @@ export declare const configDataSchema: z.ZodUnion<readonly [z.ZodObject<{
767
788
  }, z.core.$strip>, z.ZodObject<{
768
789
  integrationId: z.ZodLiteral<"system">;
769
790
  integrationType: z.ZodLiteral<IntegrationType.TERSE>;
770
- configType: z.ZodLiteral<ConfigType.TERSE>;
791
+ configType: z.ZodLiteral<ConfigType.WEB>;
792
+ }, z.core.$strip>, z.ZodObject<{
793
+ integrationId: z.ZodLiteral<"system">;
794
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
795
+ configType: z.ZodLiteral<ConfigType.IMAGE_EDIT>;
771
796
  }, z.core.$strip>, z.ZodObject<{
772
797
  integrationId: z.ZodString;
773
798
  integrationType: z.ZodLiteral<IntegrationType.WORKOS>;
@@ -974,7 +999,11 @@ export declare const skillConfigDataSchema: z.ZodUnion<readonly [z.ZodObject<{
974
999
  }, z.core.$strip>, z.ZodObject<{
975
1000
  integrationId: z.ZodLiteral<"system">;
976
1001
  integrationType: z.ZodLiteral<IntegrationType.TERSE>;
977
- configType: z.ZodLiteral<ConfigType.TERSE>;
1002
+ configType: z.ZodLiteral<ConfigType.WEB>;
1003
+ }, z.core.$strip>, z.ZodObject<{
1004
+ integrationId: z.ZodLiteral<"system">;
1005
+ integrationType: z.ZodLiteral<IntegrationType.TERSE>;
1006
+ configType: z.ZodLiteral<ConfigType.IMAGE_EDIT>;
978
1007
  }, z.core.$strip>, z.ZodObject<{
979
1008
  integrationId: z.ZodString;
980
1009
  integrationType: z.ZodLiteral<IntegrationType.WORKOS>;
@@ -1007,7 +1036,8 @@ export type ConfigMetadataMap = EnsureExhaustiveMetadata<{
1007
1036
  [ConfigType.DATADOG]: typeof DatadogConfig;
1008
1037
  [ConfigType.TIME_TRIGGER]: typeof TimeTriggerConfig;
1009
1038
  [ConfigType.LAUNCHDARKLY]: typeof LaunchDarklyConfig;
1010
- [ConfigType.TERSE]: typeof TerseConfig;
1039
+ [ConfigType.WEB]: typeof WebConfig;
1040
+ [ConfigType.IMAGE_EDIT]: typeof ImageEditConfig;
1011
1041
  [ConfigType.WORKOS_INPUT]: typeof WorkOSInputConfig;
1012
1042
  [ConfigType.WORKOS_OUTPUT]: typeof WorkOSOutputConfig;
1013
1043
  [ConfigType.ATTIO_OUTPUT]: typeof AttioOutputConfig;
package/dist/Configs.js CHANGED
@@ -15,7 +15,8 @@ export var ConfigType;
15
15
  ConfigType["DATADOG"] = "DATADOG";
16
16
  ConfigType["TIME_TRIGGER"] = "time_trigger";
17
17
  ConfigType["LAUNCHDARKLY"] = "launchdarkly";
18
- ConfigType["TERSE"] = "terse";
18
+ ConfigType["WEB"] = "web";
19
+ ConfigType["IMAGE_EDIT"] = "image_edit";
19
20
  ConfigType["WORKOS_INPUT"] = "workos_input";
20
21
  ConfigType["WORKOS_OUTPUT"] = "workos_output";
21
22
  ConfigType["ATTIO_OUTPUT"] = "attio_output";
@@ -130,10 +131,18 @@ export const LaunchDarklyConfigMetadata = {
130
131
  isInput: false,
131
132
  isOutput: true
132
133
  };
133
- export const TerseConfigMetadata = {
134
- configType: ConfigType.TERSE,
135
- name: "Terse Skills",
136
- description: "Built-in capabilities like web search (always available to agents)",
134
+ export const WebConfigMetadata = {
135
+ configType: ConfigType.WEB,
136
+ name: "Web",
137
+ description: "Built-in web search, page extraction, and multi-source research",
138
+ integrationType: IntegrationType.TERSE,
139
+ isInput: false,
140
+ isOutput: true
141
+ };
142
+ export const ImageEditConfigMetadata = {
143
+ configType: ConfigType.IMAGE_EDIT,
144
+ name: "Image Edit",
145
+ description: "Built-in image editing and generation capability",
137
146
  integrationType: IntegrationType.TERSE,
138
147
  isInput: false,
139
148
  isOutput: true
@@ -200,7 +209,8 @@ export const CONFIG_DETAILS = {
200
209
  [ConfigType.DATADOG]: DatadogConfigMetadata,
201
210
  [ConfigType.TIME_TRIGGER]: TimeTriggerConfigMetadata,
202
211
  [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfigMetadata,
203
- [ConfigType.TERSE]: TerseConfigMetadata,
212
+ [ConfigType.WEB]: WebConfigMetadata,
213
+ [ConfigType.IMAGE_EDIT]: ImageEditConfigMetadata,
204
214
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfigMetadata,
205
215
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfigMetadata,
206
216
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfigMetadata,
@@ -646,20 +656,36 @@ export class LaunchDarklyConfig extends BaseConfigInstance {
646
656
  return parts.join("\n");
647
657
  }
648
658
  }
649
- export const TerseConfigSchema = ConfigInstanceSchema.extend({
659
+ export const WebConfigSchema = ConfigInstanceSchema.extend({
660
+ integrationId: z.literal("system"),
661
+ integrationType: z.literal(IntegrationType.TERSE),
662
+ configType: z.literal(ConfigType.WEB)
663
+ });
664
+ export class WebConfig extends BaseConfigInstance {
665
+ constructor() {
666
+ super("system", IntegrationType.TERSE, ConfigType.WEB);
667
+ }
668
+ isComplete() {
669
+ return true;
670
+ }
671
+ formatForAgent() {
672
+ return "Type: Web (search, extract, research)";
673
+ }
674
+ }
675
+ export const ImageEditConfigSchema = ConfigInstanceSchema.extend({
650
676
  integrationId: z.literal("system"),
651
677
  integrationType: z.literal(IntegrationType.TERSE),
652
- configType: z.literal(ConfigType.TERSE)
678
+ configType: z.literal(ConfigType.IMAGE_EDIT)
653
679
  });
654
- export class TerseConfig extends BaseConfigInstance {
680
+ export class ImageEditConfig extends BaseConfigInstance {
655
681
  constructor() {
656
- super("system", IntegrationType.TERSE, ConfigType.TERSE);
682
+ super("system", IntegrationType.TERSE, ConfigType.IMAGE_EDIT);
657
683
  }
658
684
  isComplete() {
659
685
  return true;
660
686
  }
661
687
  formatForAgent() {
662
- return "Type: Terse Skills";
688
+ return "Type: Image Edit";
663
689
  }
664
690
  }
665
691
  export const WorkOSInputConfigSchema = ConfigInstanceSchema.extend({
@@ -838,7 +864,8 @@ export const configDataSchema = z.union([
838
864
  DatadogConfigSchema,
839
865
  TimeTriggerConfigSchema,
840
866
  LaunchDarklyConfigSchema,
841
- TerseConfigSchema,
867
+ WebConfigSchema,
868
+ ImageEditConfigSchema,
842
869
  WorkOSInputConfigSchema,
843
870
  WorkOSOutputConfigSchema,
844
871
  AttioOutputConfigSchema,
@@ -868,7 +895,8 @@ export const skillConfigDataSchema = z.union([
868
895
  PosthogConfigSchema,
869
896
  DatadogConfigSchema,
870
897
  LaunchDarklyConfigSchema,
871
- TerseConfigSchema,
898
+ WebConfigSchema,
899
+ ImageEditConfigSchema,
872
900
  WorkOSOutputConfigSchema,
873
901
  AttioOutputConfigSchema,
874
902
  SnowflakeOutputConfigSchema
@@ -883,7 +911,8 @@ export function isConfigComplete(config) {
883
911
  case ConfigType.GMAIL_DRAFT_OUTPUT:
884
912
  return true;
885
913
  case ConfigType.LINEAR_INPUT:
886
- case ConfigType.TERSE:
914
+ case ConfigType.WEB:
915
+ case ConfigType.IMAGE_EDIT:
887
916
  case ConfigType.WEBHOOK_INPUT:
888
917
  return true;
889
918
  case ConfigType.SLACK:
@@ -1025,8 +1054,10 @@ export function formatConfigForAgent(config) {
1025
1054
  parts.push(`Environments: ${config.environmentKeys.join(", ")}`);
1026
1055
  return parts.join("\n");
1027
1056
  }
1028
- case ConfigType.TERSE:
1029
- return "Type: Terse Skills";
1057
+ case ConfigType.WEB:
1058
+ return "Type: Web (search, extract, research)";
1059
+ case ConfigType.IMAGE_EDIT:
1060
+ return "Type: Image Edit";
1030
1061
  case ConfigType.WORKOS_INPUT:
1031
1062
  return `Type: WorkOS Events\nListening for: ${config.eventTypes.join(", ")}`;
1032
1063
  case ConfigType.WORKOS_OUTPUT:
@@ -1069,7 +1100,8 @@ export const CONFIG_METADATA = {
1069
1100
  [ConfigType.DATADOG]: DatadogConfig,
1070
1101
  [ConfigType.TIME_TRIGGER]: TimeTriggerConfig,
1071
1102
  [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfig,
1072
- [ConfigType.TERSE]: TerseConfig,
1103
+ [ConfigType.WEB]: WebConfig,
1104
+ [ConfigType.IMAGE_EDIT]: ImageEditConfig,
1073
1105
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfig,
1074
1106
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfig,
1075
1107
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfig,
@@ -17,7 +17,8 @@
17
17
  "RUN_HISTORY": "/app/agents/:id?tab=history&runId=:runId"
18
18
  },
19
19
  "PROJECTS": {
20
- "BY_ID": "/app/projects/:id"
20
+ "BY_ID": "/app/projects/:id",
21
+ "DEPLOYS": "/app/projects/:id/deploys"
21
22
  },
22
23
  "HOME": "/app/home",
23
24
  "INTEGRATIONS": "/app/integrations",
@@ -20,6 +20,7 @@ export declare const FrontendRoutes: {
20
20
  };
21
21
  PROJECTS: {
22
22
  BY_ID: string;
23
+ DEPLOYS: string;
23
24
  };
24
25
  HOME: string;
25
26
  INTEGRATIONS: string;
@@ -195,6 +195,34 @@ export declare const imageSchema: z.ZodObject<{
195
195
  type: z.ZodLiteral<"image">;
196
196
  url: z.ZodString;
197
197
  }, z.core.$strip>;
198
+ export declare const webhookFailureStageSchema: z.ZodEnum<{
199
+ handshake: "handshake";
200
+ delivery: "delivery";
201
+ }>;
202
+ export type WebhookFailureStage = z.infer<typeof webhookFailureStageSchema>;
203
+ /**
204
+ * Surfaced in the run history drawer when a self-hosted SDK job fails to reach (or be accepted by)
205
+ * the customer's webhook server. Persisted as a snippet so the failure is visible in the timeline
206
+ * alongside other run events; the run row itself is still marked FAILED.
207
+ */
208
+ export declare const webhookFailureSchema: z.ZodObject<{
209
+ type: z.ZodLiteral<"webhook_failure">;
210
+ stage: z.ZodEnum<{
211
+ handshake: "handshake";
212
+ delivery: "delivery";
213
+ }>;
214
+ message: z.ZodString;
215
+ triggerUrl: z.ZodString;
216
+ step: z.ZodOptional<z.ZodEnum<{
217
+ json: "json";
218
+ http: "http";
219
+ response_schema: "response_schema";
220
+ challenge_echo: "challenge_echo";
221
+ challenge_signature: "challenge_signature";
222
+ }>>;
223
+ httpStatus: z.ZodOptional<z.ZodNumber>;
224
+ bodySnippet: z.ZodOptional<z.ZodString>;
225
+ }, z.core.$strip>;
198
226
  export declare const snippetVariantSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
199
227
  type: z.ZodLiteral<"button">;
200
228
  label: z.ZodString;
@@ -219,6 +247,23 @@ export declare const snippetVariantSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
219
247
  }, z.core.$strip>, z.ZodObject<{
220
248
  type: z.ZodLiteral<"image">;
221
249
  url: z.ZodString;
250
+ }, z.core.$strip>, z.ZodObject<{
251
+ type: z.ZodLiteral<"webhook_failure">;
252
+ stage: z.ZodEnum<{
253
+ handshake: "handshake";
254
+ delivery: "delivery";
255
+ }>;
256
+ message: z.ZodString;
257
+ triggerUrl: z.ZodString;
258
+ step: z.ZodOptional<z.ZodEnum<{
259
+ json: "json";
260
+ http: "http";
261
+ response_schema: "response_schema";
262
+ challenge_echo: "challenge_echo";
263
+ challenge_signature: "challenge_signature";
264
+ }>>;
265
+ httpStatus: z.ZodOptional<z.ZodNumber>;
266
+ bodySnippet: z.ZodOptional<z.ZodString>;
222
267
  }, z.core.$strip>], "type">;
223
268
  export type SnippetVariant = z.infer<typeof snippetVariantSchema>;
224
269
  export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -255,6 +300,25 @@ export declare const chatSnippetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
255
300
  url: z.ZodString;
256
301
  id: z.ZodOptional<z.ZodString>;
257
302
  selectedValue: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ type: z.ZodLiteral<"webhook_failure">;
305
+ stage: z.ZodEnum<{
306
+ handshake: "handshake";
307
+ delivery: "delivery";
308
+ }>;
309
+ message: z.ZodString;
310
+ triggerUrl: z.ZodString;
311
+ step: z.ZodOptional<z.ZodEnum<{
312
+ json: "json";
313
+ http: "http";
314
+ response_schema: "response_schema";
315
+ challenge_echo: "challenge_echo";
316
+ challenge_signature: "challenge_signature";
317
+ }>>;
318
+ httpStatus: z.ZodOptional<z.ZodNumber>;
319
+ bodySnippet: z.ZodOptional<z.ZodString>;
320
+ id: z.ZodOptional<z.ZodString>;
321
+ selectedValue: z.ZodOptional<z.ZodString>;
258
322
  }, z.core.$strip>], "type">;
259
323
  export type ChatSnippet = z.infer<typeof chatSnippetSchema>;
260
324
  export declare const modelEventChatSnippetSchema: z.ZodObject<{
@@ -296,6 +360,25 @@ export declare const modelEventChatSnippetSchema: z.ZodObject<{
296
360
  url: z.ZodString;
297
361
  id: z.ZodOptional<z.ZodString>;
298
362
  selectedValue: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>, z.ZodObject<{
364
+ type: z.ZodLiteral<"webhook_failure">;
365
+ stage: z.ZodEnum<{
366
+ handshake: "handshake";
367
+ delivery: "delivery";
368
+ }>;
369
+ message: z.ZodString;
370
+ triggerUrl: z.ZodString;
371
+ step: z.ZodOptional<z.ZodEnum<{
372
+ json: "json";
373
+ http: "http";
374
+ response_schema: "response_schema";
375
+ challenge_echo: "challenge_echo";
376
+ challenge_signature: "challenge_signature";
377
+ }>>;
378
+ httpStatus: z.ZodOptional<z.ZodNumber>;
379
+ bodySnippet: z.ZodOptional<z.ZodString>;
380
+ id: z.ZodOptional<z.ZodString>;
381
+ selectedValue: z.ZodOptional<z.ZodString>;
299
382
  }, z.core.$strip>], "type">;
300
383
  }, z.core.$strip>;
301
384
  export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -421,6 +504,25 @@ export declare const modelEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
421
504
  url: z.ZodString;
422
505
  id: z.ZodOptional<z.ZodString>;
423
506
  selectedValue: z.ZodOptional<z.ZodString>;
507
+ }, z.core.$strip>, z.ZodObject<{
508
+ type: z.ZodLiteral<"webhook_failure">;
509
+ stage: z.ZodEnum<{
510
+ handshake: "handshake";
511
+ delivery: "delivery";
512
+ }>;
513
+ message: z.ZodString;
514
+ triggerUrl: z.ZodString;
515
+ step: z.ZodOptional<z.ZodEnum<{
516
+ json: "json";
517
+ http: "http";
518
+ response_schema: "response_schema";
519
+ challenge_echo: "challenge_echo";
520
+ challenge_signature: "challenge_signature";
521
+ }>>;
522
+ httpStatus: z.ZodOptional<z.ZodNumber>;
523
+ bodySnippet: z.ZodOptional<z.ZodString>;
524
+ id: z.ZodOptional<z.ZodString>;
525
+ selectedValue: z.ZodOptional<z.ZodString>;
424
526
  }, z.core.$strip>], "type">;
425
527
  }, z.core.$strip>, z.ZodObject<{
426
528
  id: z.ZodString;
@@ -1,5 +1,6 @@
1
1
  import * as z from "zod";
2
2
  import { EntityType } from "./Entities.js";
3
+ import { sdkJobServerCheckStepSchema } from "./types.js";
3
4
  export const entityTypeSchema = z.enum(EntityType);
4
5
  export var ChangeEventType;
5
6
  (function (ChangeEventType) {
@@ -146,7 +147,22 @@ export const imageSchema = z.object({
146
147
  type: z.literal("image"),
147
148
  url: z.string()
148
149
  });
149
- export const snippetVariantSchema = z.discriminatedUnion("type", [buttonSchema, integrationPromptSchema, navigateSchema, multipleChoiceSchema, imageSchema]);
150
+ export const webhookFailureStageSchema = z.enum(["handshake", "delivery"]);
151
+ /**
152
+ * Surfaced in the run history drawer when a self-hosted SDK job fails to reach (or be accepted by)
153
+ * the customer's webhook server. Persisted as a snippet so the failure is visible in the timeline
154
+ * alongside other run events; the run row itself is still marked FAILED.
155
+ */
156
+ export const webhookFailureSchema = z.object({
157
+ type: z.literal("webhook_failure"),
158
+ stage: webhookFailureStageSchema,
159
+ message: z.string(),
160
+ triggerUrl: z.string(),
161
+ step: sdkJobServerCheckStepSchema.optional(),
162
+ httpStatus: z.number().optional(),
163
+ bodySnippet: z.string().optional()
164
+ });
165
+ export const snippetVariantSchema = z.discriminatedUnion("type", [buttonSchema, integrationPromptSchema, navigateSchema, multipleChoiceSchema, imageSchema, webhookFailureSchema]);
150
166
  const chatSnippetMetadataSchema = {
151
167
  id: z.string().optional(),
152
168
  selectedValue: z.string().optional()
@@ -156,7 +172,8 @@ export const chatSnippetSchema = z.discriminatedUnion("type", [
156
172
  integrationPromptSchema.extend(chatSnippetMetadataSchema),
157
173
  navigateSchema.extend(chatSnippetMetadataSchema),
158
174
  multipleChoiceSchema.extend(chatSnippetMetadataSchema),
159
- imageSchema.extend(chatSnippetMetadataSchema)
175
+ imageSchema.extend(chatSnippetMetadataSchema),
176
+ webhookFailureSchema.extend(chatSnippetMetadataSchema)
160
177
  ]);
161
178
  export const modelEventChatSnippetSchema = modelEventBaseSchema.extend({
162
179
  type: z.literal("Snippet"),
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ export declare const SUPPORTED_PROVIDERS: readonly ["anthropic", "openai"];
3
+ export declare const supportedProviderSchema: z.ZodEnum<{
4
+ anthropic: "anthropic";
5
+ openai: "openai";
6
+ }>;
7
+ export type SupportedProvider = z.infer<typeof supportedProviderSchema>;
8
+ export declare const modelReferenceSchema: z.ZodObject<{
9
+ providerId: z.ZodEnum<{
10
+ anthropic: "anthropic";
11
+ openai: "openai";
12
+ }>;
13
+ modelId: z.ZodString;
14
+ value: z.ZodString;
15
+ }, z.core.$strip>;
16
+ export type ModelReference = z.infer<typeof modelReferenceSchema>;
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export const SUPPORTED_PROVIDERS = ["anthropic", "openai"];
3
+ export const supportedProviderSchema = z.enum(SUPPORTED_PROVIDERS);
4
+ export const modelReferenceSchema = z
5
+ .object({
6
+ providerId: supportedProviderSchema,
7
+ modelId: z.string().min(1),
8
+ value: z.string().min(1)
9
+ })
10
+ .superRefine((data, ctx) => {
11
+ const prefix = `${data.providerId}:`;
12
+ if (!data.value.startsWith(prefix)) {
13
+ ctx.addIssue({
14
+ code: z.ZodIssueCode.custom,
15
+ message: `model.value must start with "${prefix}"`
16
+ });
17
+ }
18
+ });
@@ -0,0 +1,10 @@
1
+ import * as z from "zod";
2
+ export declare const organizationMetadataSchema: z.ZodObject<{
3
+ stripeCustomerId: z.ZodString;
4
+ overageMode: z.ZodEnum<{
5
+ soft: "soft";
6
+ strict: "strict";
7
+ }>;
8
+ overageCapMultiplier: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
9
+ }, z.core.$strip>;
10
+ export type OrganizationMetadata = z.infer<typeof organizationMetadataSchema>;
@@ -0,0 +1,6 @@
1
+ import * as z from "zod";
2
+ export const organizationMetadataSchema = z.object({
3
+ stripeCustomerId: z.string(),
4
+ overageMode: z.enum(["soft", "strict"]),
5
+ overageCapMultiplier: z.string().transform(val => Number(val))
6
+ });