terse-types 0.0.2 → 0.0.4

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.js CHANGED
@@ -5,15 +5,12 @@ export var ConfigType;
5
5
  ConfigType["GMAIL"] = "gmail";
6
6
  ConfigType["GMAIL_OUTPUT"] = "gmail_output";
7
7
  ConfigType["GMAIL_DRAFT_OUTPUT"] = "gmail_draft_output";
8
- ConfigType["FIGMA"] = "figma";
9
8
  ConfigType["SLACK"] = "slack";
10
9
  ConfigType["SLACK_OUTPUT"] = "slack_output";
11
10
  ConfigType["NOTION"] = "notion";
12
11
  ConfigType["LINEAR_INPUT"] = "linear_input";
13
12
  ConfigType["LINEAR_OUTPUT"] = "linear_output";
14
13
  ConfigType["GITHUB"] = "github";
15
- ConfigType["JIRA"] = "jira";
16
- ConfigType["CONFLUENCE"] = "confluence";
17
14
  ConfigType["POSTHOG"] = "POSTHOG";
18
15
  ConfigType["DATADOG"] = "DATADOG";
19
16
  ConfigType["TIME_TRIGGER"] = "time_trigger";
@@ -23,6 +20,7 @@ export var ConfigType;
23
20
  ConfigType["WORKOS_OUTPUT"] = "workos_output";
24
21
  ConfigType["ATTIO_OUTPUT"] = "attio_output";
25
22
  ConfigType["SNOWFLAKE_OUTPUT"] = "snowflake_output";
23
+ ConfigType["WEBHOOK_INPUT"] = "webhook_input";
26
24
  })(ConfigType || (ConfigType = {}));
27
25
  export const configTypeEnum = z.enum(ConfigType);
28
26
  // Metadata objects - using const objects instead of classes
@@ -34,14 +32,6 @@ export const GmailConfigMetadata = {
34
32
  isInput: true,
35
33
  isOutput: false
36
34
  };
37
- export const FigmaConfigMetadata = {
38
- configType: ConfigType.FIGMA,
39
- name: "Figma",
40
- description: "Monitor design changes in Figma files",
41
- integrationType: IntegrationType.FIGMA,
42
- isInput: true,
43
- isOutput: false
44
- };
45
35
  export const SlackConfigMetadata = {
46
36
  configType: ConfigType.SLACK,
47
37
  name: "Slack",
@@ -106,22 +96,6 @@ export const GitHubConfigMetadata = {
106
96
  isInput: true,
107
97
  isOutput: true
108
98
  };
109
- export const JiraConfigMetadata = {
110
- configType: ConfigType.JIRA,
111
- name: "Jira",
112
- description: "Monitor and update Jira issues",
113
- integrationType: IntegrationType.ATLASSIAN,
114
- isInput: true,
115
- isOutput: true
116
- };
117
- export const ConfluenceConfigMetadata = {
118
- configType: ConfigType.CONFLUENCE,
119
- name: "Confluence",
120
- description: "Update Confluence pages",
121
- integrationType: IntegrationType.ATLASSIAN,
122
- isInput: false,
123
- isOutput: true
124
- };
125
99
  export const PosthogConfigMetadata = {
126
100
  configType: ConfigType.POSTHOG,
127
101
  name: "Posthog",
@@ -194,19 +168,24 @@ export const SnowflakeOutputConfigMetadata = {
194
168
  isInput: false,
195
169
  isOutput: true
196
170
  };
171
+ export const WebhookInputConfigMetadata = {
172
+ configType: ConfigType.WEBHOOK_INPUT,
173
+ name: "Webhook",
174
+ description: "Trigger via an external HTTP request to a generated URL",
175
+ integrationType: IntegrationType.WEBHOOK,
176
+ isInput: true,
177
+ isOutput: false
178
+ };
197
179
  export const CONFIG_DETAILS = {
198
180
  [ConfigType.GMAIL]: GmailConfigMetadata,
199
181
  [ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
200
182
  [ConfigType.GMAIL_DRAFT_OUTPUT]: GmailDraftOutputConfigMetadata,
201
- [ConfigType.FIGMA]: FigmaConfigMetadata,
202
183
  [ConfigType.SLACK]: SlackConfigMetadata,
203
184
  [ConfigType.SLACK_OUTPUT]: SlackOutputConfigMetadata,
204
185
  [ConfigType.NOTION]: NotionConfigMetadata,
205
186
  [ConfigType.LINEAR_INPUT]: LinearInputConfigMetadata,
206
187
  [ConfigType.LINEAR_OUTPUT]: LinearOutputConfigMetadata,
207
188
  [ConfigType.GITHUB]: GitHubConfigMetadata,
208
- [ConfigType.JIRA]: JiraConfigMetadata,
209
- [ConfigType.CONFLUENCE]: ConfluenceConfigMetadata,
210
189
  [ConfigType.POSTHOG]: PosthogConfigMetadata,
211
190
  [ConfigType.DATADOG]: DatadogConfigMetadata,
212
191
  [ConfigType.TIME_TRIGGER]: TimeTriggerConfigMetadata,
@@ -215,56 +194,48 @@ export const CONFIG_DETAILS = {
215
194
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfigMetadata,
216
195
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfigMetadata,
217
196
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfigMetadata,
218
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata
197
+ [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata,
198
+ [ConfigType.WEBHOOK_INPUT]: WebhookInputConfigMetadata
219
199
  };
220
200
  // MARK: Event Types — specific events within each integration trigger
221
- export var SlackEventType;
222
- (function (SlackEventType) {
223
- SlackEventType["MESSAGE"] = "message";
224
- SlackEventType["APP_MENTION"] = "app_mention";
225
- SlackEventType["REACTION_ADDED"] = "reaction_added";
226
- })(SlackEventType || (SlackEventType = {}));
227
- export var GitHubEventType;
228
- (function (GitHubEventType) {
229
- GitHubEventType["PUSH"] = "push";
230
- GitHubEventType["PR_OPENED"] = "pull_request.opened";
231
- GitHubEventType["PR_MERGED"] = "pull_request.merged";
232
- GitHubEventType["PR_CLOSED"] = "pull_request.closed";
233
- GitHubEventType["PR_SYNCHRONIZE"] = "pull_request.synchronize";
234
- })(GitHubEventType || (GitHubEventType = {}));
235
- export var LinearEventType;
236
- (function (LinearEventType) {
237
- LinearEventType["ISSUE_CREATED"] = "issue.created";
238
- LinearEventType["ISSUE_UPDATED"] = "issue.updated";
239
- LinearEventType["COMMENT_CREATED"] = "comment.created";
240
- })(LinearEventType || (LinearEventType = {}));
241
- export var JiraEventType;
242
- (function (JiraEventType) {
243
- JiraEventType["ISSUE_CREATED"] = "issue.created";
244
- JiraEventType["ISSUE_UPDATED"] = "issue.updated";
245
- })(JiraEventType || (JiraEventType = {}));
246
- export var FigmaEventType;
247
- (function (FigmaEventType) {
248
- FigmaEventType["FILE_COMMENT"] = "file_comment";
249
- })(FigmaEventType || (FigmaEventType = {}));
250
- export var GmailEventType;
251
- (function (GmailEventType) {
252
- GmailEventType["EMAIL_RECEIVED"] = "email.received";
253
- })(GmailEventType || (GmailEventType = {}));
254
- export var WorkOSEventType;
255
- (function (WorkOSEventType) {
256
- WorkOSEventType["USER_CREATED"] = "user.created";
257
- WorkOSEventType["USER_UPDATED"] = "user.updated";
258
- WorkOSEventType["USER_DELETED"] = "user.deleted";
259
- WorkOSEventType["ORGANIZATION_CREATED"] = "organization.created";
260
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_CREATED"] = "organization_membership.created";
261
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_UPDATED"] = "organization_membership.updated";
262
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_DELETED"] = "organization_membership.deleted";
263
- WorkOSEventType["INVITATION_CREATED"] = "invitation.created";
264
- WorkOSEventType["INVITATION_ACCEPTED"] = "invitation.accepted";
265
- WorkOSEventType["INVITATION_RESENT"] = "invitation.resent";
266
- WorkOSEventType["INVITATION_REVOKED"] = "invitation.revoked";
267
- })(WorkOSEventType || (WorkOSEventType = {}));
201
+ export const SlackEventType = {
202
+ MESSAGE: "message",
203
+ APP_MENTION: "app_mention",
204
+ REACTION_ADDED: "reaction_added"
205
+ };
206
+ export const slackEventTypeSchema = z.enum(SlackEventType);
207
+ export const GitHubEventType = {
208
+ PUSH: "push",
209
+ PR_OPENED: "pull_request.opened",
210
+ PR_MERGED: "pull_request.merged",
211
+ PR_CLOSED: "pull_request.closed",
212
+ PR_SYNCHRONIZE: "pull_request.synchronize"
213
+ };
214
+ export const gitHubEventTypeSchema = z.enum(GitHubEventType);
215
+ export const LinearEventType = {
216
+ ISSUE_CREATED: "issue.created",
217
+ ISSUE_UPDATED: "issue.updated",
218
+ COMMENT_CREATED: "comment.created"
219
+ };
220
+ export const linearEventTypeSchema = z.enum(LinearEventType);
221
+ export const GmailEventType = {
222
+ EMAIL_RECEIVED: "email.received"
223
+ };
224
+ export const gmailEventTypeSchema = z.enum(GmailEventType);
225
+ export const WorkOSEventType = {
226
+ USER_CREATED: "user.created",
227
+ USER_UPDATED: "user.updated",
228
+ USER_DELETED: "user.deleted",
229
+ ORGANIZATION_CREATED: "organization.created",
230
+ ORGANIZATION_MEMBERSHIP_CREATED: "organization_membership.created",
231
+ ORGANIZATION_MEMBERSHIP_UPDATED: "organization_membership.updated",
232
+ ORGANIZATION_MEMBERSHIP_DELETED: "organization_membership.deleted",
233
+ INVITATION_CREATED: "invitation.created",
234
+ INVITATION_ACCEPTED: "invitation.accepted",
235
+ INVITATION_RESENT: "invitation.resent",
236
+ INVITATION_REVOKED: "invitation.revoked"
237
+ };
238
+ export const workOSEventTypeSchema = z.enum(WorkOSEventType);
268
239
  export const ConfigInstanceSchema = z.object({
269
240
  integrationId: z.string(),
270
241
  integrationType: integrationTypeEnum,
@@ -283,7 +254,7 @@ class BaseConfigInstance {
283
254
  export const GmailConfigSchema = ConfigInstanceSchema.extend({
284
255
  integrationType: z.literal(IntegrationType.GMAIL),
285
256
  configType: z.literal(ConfigType.GMAIL),
286
- eventTypes: z.array(z.enum(GmailEventType)).nullable()
257
+ eventTypes: z.array(gmailEventTypeSchema).nullable()
287
258
  });
288
259
  export class GmailConfig extends BaseConfigInstance {
289
260
  eventTypes;
@@ -298,40 +269,6 @@ export class GmailConfig extends BaseConfigInstance {
298
269
  return `Type: Gmail\nIntegration ID: ${this.integrationId}`;
299
270
  }
300
271
  }
301
- export const FigmaConfigSchema = ConfigInstanceSchema.extend({
302
- integrationType: z.literal(IntegrationType.FIGMA),
303
- configType: z.literal(ConfigType.FIGMA),
304
- fileKey: z.string(),
305
- fileName: z.string(),
306
- teamId: z.string(),
307
- eventTypes: z.array(z.enum(FigmaEventType)).nullable()
308
- });
309
- export class FigmaConfig extends BaseConfigInstance {
310
- fileKey;
311
- fileName;
312
- teamId;
313
- eventTypes;
314
- constructor(integrationId, fileKey, fileName, teamId, eventTypes = null) {
315
- super(integrationId, IntegrationType.FIGMA, ConfigType.FIGMA);
316
- this.fileKey = fileKey;
317
- this.fileName = fileName;
318
- this.teamId = teamId;
319
- this.eventTypes = eventTypes;
320
- }
321
- isComplete() {
322
- return !!(this.fileKey && this.teamId);
323
- }
324
- formatForAgent() {
325
- const parts = [`Type: Figma`, `Integration ID: ${this.integrationId}`];
326
- if (this.fileName) {
327
- parts.push(`File: ${this.fileName}`);
328
- }
329
- if (this.fileKey) {
330
- parts.push(`File Key: ${this.fileKey}`);
331
- }
332
- return parts.join("\n");
333
- }
334
- }
335
272
  export const SlackConfigSchema = ConfigInstanceSchema.extend({
336
273
  integrationType: z.literal(IntegrationType.SLACK),
337
274
  configType: z.literal(ConfigType.SLACK),
@@ -339,7 +276,7 @@ export const SlackConfigSchema = ConfigInstanceSchema.extend({
339
276
  channelName: z.string().nullable(),
340
277
  listenToUserDms: z.boolean().default(false),
341
278
  userIds: z.array(z.string()).nullable(),
342
- eventTypes: z.array(z.enum(SlackEventType)).nullable()
279
+ eventTypes: z.array(slackEventTypeSchema).nullable()
343
280
  });
344
281
  export class SlackConfig extends BaseConfigInstance {
345
282
  channelId;
@@ -356,7 +293,6 @@ export class SlackConfig extends BaseConfigInstance {
356
293
  this.eventTypes = eventTypes;
357
294
  }
358
295
  isComplete() {
359
- // Slack is complete if either channelId is set OR listenToUserDms is true
360
296
  return !!(this.channelId || this.listenToUserDms);
361
297
  }
362
298
  formatForAgent() {
@@ -373,6 +309,9 @@ export class SlackConfig extends BaseConfigInstance {
373
309
  if (this.userIds) {
374
310
  parts.push(`Users: ${this.userIds.join(", ")}`);
375
311
  }
312
+ if (this.eventTypes?.length) {
313
+ parts.push(`Event Types: ${this.eventTypes.join(", ")}`);
314
+ }
376
315
  return parts.join("\n");
377
316
  }
378
317
  }
@@ -489,31 +428,34 @@ export class NotionConfig extends BaseConfigInstance {
489
428
  export const LinearInputConfigSchema = ConfigInstanceSchema.extend({
490
429
  integrationType: z.literal(IntegrationType.LINEAR),
491
430
  configType: z.literal(ConfigType.LINEAR_INPUT),
431
+ teamId: z.string().nullable(),
492
432
  projectId: z.string().nullable(),
493
- projectName: z.string().nullable(),
494
- eventTypes: z.array(z.enum(LinearEventType)).nullable()
433
+ eventTypes: z.array(linearEventTypeSchema).nullable()
495
434
  });
496
435
  export class LinearInputConfig extends BaseConfigInstance {
497
436
  projectId;
498
- projectName;
499
437
  eventTypes;
500
- constructor(integrationId, projectId = null, projectName = null, eventTypes = null) {
438
+ teamId;
439
+ constructor(integrationId, projectId = null, eventTypes = null, teamId = null) {
501
440
  super(integrationId, IntegrationType.LINEAR, ConfigType.LINEAR_INPUT);
502
441
  this.projectId = projectId;
503
- this.projectName = projectName;
504
442
  this.eventTypes = eventTypes;
443
+ this.teamId = teamId;
505
444
  }
506
445
  isComplete() {
507
- return true;
446
+ return (this.eventTypes?.length ?? 0) > 0;
508
447
  }
509
448
  formatForAgent() {
510
449
  const parts = [`Type: Linear`, `Integration ID: ${this.integrationId}`];
511
- if (this.projectName) {
512
- parts.push(`Project: ${this.projectName}`);
450
+ if (this.teamId) {
451
+ parts.push(`Team ID: ${this.teamId}`);
513
452
  }
514
- else if (this.projectId) {
453
+ if (this.projectId) {
515
454
  parts.push(`Project ID: ${this.projectId}`);
516
455
  }
456
+ if (this.eventTypes?.length) {
457
+ parts.push(`Event Types: ${this.eventTypes.join(", ")}`);
458
+ }
517
459
  return parts.join("\n");
518
460
  }
519
461
  }
@@ -522,20 +464,17 @@ export const LinearOutputConfigSchema = ConfigInstanceSchema.extend({
522
464
  configType: z.literal(ConfigType.LINEAR_OUTPUT),
523
465
  teamId: z.string().nullable(),
524
466
  teamName: z.string().nullable(),
525
- projectId: z.string().nullable(),
526
- projectName: z.string().nullable()
467
+ projectId: z.string().nullable()
527
468
  });
528
469
  export class LinearOutputConfig extends BaseConfigInstance {
529
470
  teamId;
530
471
  teamName;
531
472
  projectId;
532
- projectName;
533
- constructor(integrationId, teamId = null, teamName = null, projectId = null, projectName = null) {
473
+ constructor(integrationId, teamId = null, teamName = null, projectId = null) {
534
474
  super(integrationId, IntegrationType.LINEAR, ConfigType.LINEAR_OUTPUT);
535
475
  this.teamId = teamId;
536
476
  this.teamName = teamName;
537
477
  this.projectId = projectId;
538
- this.projectName = projectName;
539
478
  }
540
479
  isComplete() {
541
480
  return !!this.integrationId;
@@ -548,10 +487,7 @@ export class LinearOutputConfig extends BaseConfigInstance {
548
487
  else if (this.teamId) {
549
488
  parts.push(`Team ID: ${this.teamId}`);
550
489
  }
551
- if (this.projectName) {
552
- parts.push(`Project: ${this.projectName}`);
553
- }
554
- else if (this.projectId) {
490
+ if (this.projectId) {
555
491
  parts.push(`Project ID: ${this.projectId}`);
556
492
  }
557
493
  return parts.join("\n");
@@ -561,7 +497,7 @@ export const GitHubConfigSchema = ConfigInstanceSchema.extend({
561
497
  integrationType: z.literal(IntegrationType.GITHUB),
562
498
  configType: z.literal(ConfigType.GITHUB),
563
499
  repositoryIds: z.array(z.number().int()),
564
- eventTypes: z.array(z.enum(GitHubEventType)).nullable()
500
+ eventTypes: z.array(gitHubEventTypeSchema).nullable()
565
501
  });
566
502
  export class GitHubConfig extends BaseConfigInstance {
567
503
  repositoryIds;
@@ -572,88 +508,28 @@ export class GitHubConfig extends BaseConfigInstance {
572
508
  this.eventTypes = eventTypes;
573
509
  }
574
510
  isComplete() {
575
- return (this.repositoryIds?.length ?? 0) > 0;
511
+ return (this.repositoryIds?.length ?? 0) > 0 && (this.eventTypes?.length ?? 0) > 0;
576
512
  }
577
513
  formatForAgent() {
578
514
  const parts = [`Type: GitHub`, `Integration ID: ${this.integrationId}`];
579
515
  if (this.repositoryIds.length > 0) {
580
516
  parts.push(`Repositories: ${this.repositoryIds.join(", ")}`);
581
517
  }
582
- return parts.join("\n");
583
- }
584
- }
585
- export const JiraConfigSchema = ConfigInstanceSchema.extend({
586
- integrationType: z.literal(IntegrationType.ATLASSIAN),
587
- configType: z.literal(ConfigType.JIRA),
588
- projectKey: z.string().nullable(),
589
- projectId: z.string().nullable(),
590
- eventTypes: z.array(z.enum(JiraEventType)).nullable()
591
- });
592
- export class JiraConfig extends BaseConfigInstance {
593
- projectKey;
594
- projectId;
595
- eventTypes;
596
- constructor(integrationId, projectKey = null, projectId = null, eventTypes = null) {
597
- super(integrationId, IntegrationType.ATLASSIAN, ConfigType.JIRA);
598
- this.projectKey = projectKey;
599
- this.projectId = projectId;
600
- this.eventTypes = eventTypes;
601
- }
602
- isComplete() {
603
- // Jira only requires integrationId (base check handled in isInputComplete)
604
- return true;
605
- }
606
- formatForAgent() {
607
- const parts = [`Type: Jira`, `Integration ID: ${this.integrationId}`];
608
- if (this.projectKey) {
609
- parts.push(`Project Key: ${this.projectKey}`);
610
- }
611
- else if (this.projectId) {
612
- parts.push(`Project ID: ${this.projectId}`);
518
+ if (this.eventTypes?.length) {
519
+ parts.push(`Event Types: ${this.eventTypes.join(", ")}`);
613
520
  }
614
521
  return parts.join("\n");
615
522
  }
616
523
  }
617
- export const ConfluenceConfigSchema = ConfigInstanceSchema.extend({
618
- integrationType: z.literal(IntegrationType.ATLASSIAN),
619
- configType: z.literal(ConfigType.CONFLUENCE),
620
- spaceName: z.string(),
621
- spaceId: z.string(),
622
- pageId: z.string(),
623
- pageName: z.string()
524
+ /**
525
+ * Skill-specific variant of GitHubConfigSchema.
526
+ * Skills do not listen for events, so eventTypes is omitted entirely.
527
+ */
528
+ export const GitHubSkillConfigSchema = ConfigInstanceSchema.extend({
529
+ integrationType: z.literal(IntegrationType.GITHUB),
530
+ configType: z.literal(ConfigType.GITHUB),
531
+ repositoryIds: z.array(z.number().int())
624
532
  });
625
- export class ConfluenceConfig extends BaseConfigInstance {
626
- spaceName;
627
- spaceId;
628
- pageId;
629
- pageName;
630
- constructor(integrationId, spaceName, spaceId, pageId, // Page ID (required for outputs - specific page to write to)
631
- pageName // Page display name (for UI, optional)
632
- ) {
633
- super(integrationId, IntegrationType.ATLASSIAN, ConfigType.CONFLUENCE);
634
- this.spaceName = spaceName;
635
- this.spaceId = spaceId;
636
- this.pageId = pageId;
637
- this.pageName = pageName;
638
- }
639
- isComplete() {
640
- // Confluence only requires integrationId (base check handled in isInputComplete)
641
- return true;
642
- }
643
- formatForAgent() {
644
- const parts = [`Type: Confluence`, `Integration ID: ${this.integrationId}`];
645
- if (this.spaceName) {
646
- parts.push(`Space: ${this.spaceName}`);
647
- }
648
- if (this.pageName) {
649
- parts.push(`Page: ${this.pageName}`);
650
- }
651
- else if (this.pageId) {
652
- parts.push(`Page ID: ${this.pageId}`);
653
- }
654
- return parts.join("\n");
655
- }
656
- }
657
533
  export const PosthogConfigSchema = ConfigInstanceSchema.extend({
658
534
  integrationType: z.literal(IntegrationType.POSTHOG),
659
535
  configType: z.literal(ConfigType.POSTHOG),
@@ -775,7 +651,7 @@ export class TerseConfig extends BaseConfigInstance {
775
651
  export const WorkOSInputConfigSchema = ConfigInstanceSchema.extend({
776
652
  integrationType: z.literal(IntegrationType.WORKOS),
777
653
  configType: z.literal(ConfigType.WORKOS_INPUT),
778
- eventTypes: z.array(z.enum(WorkOSEventType)).default([])
654
+ eventTypes: z.array(workOSEventTypeSchema).default([])
779
655
  });
780
656
  export class WorkOSInputConfig extends BaseConfigInstance {
781
657
  eventTypes;
@@ -843,9 +719,24 @@ export class SnowflakeOutputConfig extends BaseConfigInstance {
843
719
  return parts.join("\n");
844
720
  }
845
721
  }
722
+ export const WebhookInputConfigSchema = ConfigInstanceSchema.extend({
723
+ integrationId: z.literal("system"),
724
+ integrationType: z.literal(IntegrationType.WEBHOOK),
725
+ configType: z.literal(ConfigType.WEBHOOK_INPUT)
726
+ });
727
+ export class WebhookInputConfig extends BaseConfigInstance {
728
+ constructor() {
729
+ super("system", IntegrationType.WEBHOOK, ConfigType.WEBHOOK_INPUT);
730
+ }
731
+ isComplete() {
732
+ return true;
733
+ }
734
+ formatForAgent() {
735
+ return "Type: Webhook Trigger";
736
+ }
737
+ }
846
738
  export const configDataSchema = z.union([
847
739
  GmailConfigSchema,
848
- FigmaConfigSchema,
849
740
  SlackConfigSchema,
850
741
  SlackOutputConfigSchema,
851
742
  GmailOutputConfigSchema,
@@ -854,8 +745,7 @@ export const configDataSchema = z.union([
854
745
  LinearInputConfigSchema,
855
746
  LinearOutputConfigSchema,
856
747
  GitHubConfigSchema,
857
- JiraConfigSchema,
858
- ConfluenceConfigSchema,
748
+ GitHubSkillConfigSchema,
859
749
  PosthogConfigSchema,
860
750
  DatadogConfigSchema,
861
751
  TimeTriggerConfigSchema,
@@ -864,6 +754,33 @@ export const configDataSchema = z.union([
864
754
  WorkOSInputConfigSchema,
865
755
  WorkOSOutputConfigSchema,
866
756
  AttioOutputConfigSchema,
757
+ SnowflakeOutputConfigSchema,
758
+ WebhookInputConfigSchema
759
+ ]);
760
+ /** Configs that can serve as triggers (event sources). */
761
+ export const triggerConfigDataSchema = z.union([
762
+ GmailConfigSchema,
763
+ SlackConfigSchema,
764
+ LinearInputConfigSchema,
765
+ GitHubConfigSchema,
766
+ TimeTriggerConfigSchema,
767
+ WorkOSInputConfigSchema,
768
+ WebhookInputConfigSchema
769
+ ]);
770
+ /** Configs that can serve as skills (tools / outputs). */
771
+ export const skillConfigDataSchema = z.union([
772
+ SlackOutputConfigSchema,
773
+ GmailOutputConfigSchema,
774
+ GmailDraftOutputConfigSchema,
775
+ NotionConfigSchema,
776
+ LinearOutputConfigSchema,
777
+ GitHubSkillConfigSchema,
778
+ PosthogConfigSchema,
779
+ DatadogConfigSchema,
780
+ LaunchDarklyConfigSchema,
781
+ TerseConfigSchema,
782
+ WorkOSOutputConfigSchema,
783
+ AttioOutputConfigSchema,
867
784
  SnowflakeOutputConfigSchema
868
785
  ]);
869
786
  export function isConfigComplete(config) {
@@ -874,13 +791,11 @@ export function isConfigComplete(config) {
874
791
  case ConfigType.GMAIL:
875
792
  case ConfigType.GMAIL_OUTPUT:
876
793
  case ConfigType.GMAIL_DRAFT_OUTPUT:
794
+ return true;
877
795
  case ConfigType.LINEAR_INPUT:
878
- case ConfigType.JIRA:
879
- case ConfigType.CONFLUENCE:
880
796
  case ConfigType.TERSE:
797
+ case ConfigType.WEBHOOK_INPUT:
881
798
  return true;
882
- case ConfigType.FIGMA:
883
- return !!(config.fileKey && config.teamId);
884
799
  case ConfigType.SLACK:
885
800
  return !!(config.channelId || config.listenToUserDms);
886
801
  case ConfigType.SLACK_OUTPUT:
@@ -913,14 +828,6 @@ export function formatConfigForAgent(config) {
913
828
  switch (config.configType) {
914
829
  case ConfigType.GMAIL:
915
830
  return `Type: Gmail\nIntegration ID: ${config.integrationId}`;
916
- case ConfigType.FIGMA: {
917
- const parts = [`Type: Figma`, `Integration ID: ${config.integrationId}`];
918
- if (config.fileName)
919
- parts.push(`File: ${config.fileName}`);
920
- if (config.fileKey)
921
- parts.push(`File Key: ${config.fileKey}`);
922
- return parts.join("\n");
923
- }
924
831
  case ConfigType.SLACK: {
925
832
  const parts = [`Type: Slack`, `Integration ID: ${config.integrationId}`];
926
833
  if (config.channelName) {
@@ -933,6 +840,8 @@ export function formatConfigForAgent(config) {
933
840
  parts.push(`Listening to user DMs: Yes`);
934
841
  if (config.userIds)
935
842
  parts.push(`Users: ${config.userIds.join(", ")}`);
843
+ if (config.eventTypes?.length)
844
+ parts.push(`Event Types: ${config.eventTypes.join(", ")}`);
936
845
  return parts.join("\n");
937
846
  }
938
847
  case ConfigType.SLACK_OUTPUT: {
@@ -965,12 +874,14 @@ export function formatConfigForAgent(config) {
965
874
  }
966
875
  case ConfigType.LINEAR_INPUT: {
967
876
  const parts = [`Type: Linear`, `Integration ID: ${config.integrationId}`];
968
- if (config.projectName) {
969
- parts.push(`Project: ${config.projectName}`);
877
+ if (config.teamId) {
878
+ parts.push(`Team ID: ${config.teamId}`);
970
879
  }
971
- else if (config.projectId) {
880
+ if (config.projectId) {
972
881
  parts.push(`Project ID: ${config.projectId}`);
973
882
  }
883
+ if (config.eventTypes?.length)
884
+ parts.push(`Event Types: ${config.eventTypes.join(", ")}`);
974
885
  return parts.join("\n");
975
886
  }
976
887
  case ConfigType.LINEAR_OUTPUT: {
@@ -981,10 +892,7 @@ export function formatConfigForAgent(config) {
981
892
  else if (config.teamId) {
982
893
  parts.push(`Team ID: ${config.teamId}`);
983
894
  }
984
- if (config.projectName) {
985
- parts.push(`Project: ${config.projectName}`);
986
- }
987
- else if (config.projectId) {
895
+ if (config.projectId) {
988
896
  parts.push(`Project ID: ${config.projectId}`);
989
897
  }
990
898
  return parts.join("\n");
@@ -993,28 +901,8 @@ export function formatConfigForAgent(config) {
993
901
  const parts = [`Type: GitHub`, `Integration ID: ${config.integrationId}`];
994
902
  if (config.repositoryIds.length > 0)
995
903
  parts.push(`Repositories: ${config.repositoryIds.join(", ")}`);
996
- return parts.join("\n");
997
- }
998
- case ConfigType.JIRA: {
999
- const parts = [`Type: Jira`, `Integration ID: ${config.integrationId}`];
1000
- if (config.projectKey) {
1001
- parts.push(`Project Key: ${config.projectKey}`);
1002
- }
1003
- else if (config.projectId) {
1004
- parts.push(`Project ID: ${config.projectId}`);
1005
- }
1006
- return parts.join("\n");
1007
- }
1008
- case ConfigType.CONFLUENCE: {
1009
- const parts = [`Type: Confluence`, `Integration ID: ${config.integrationId}`];
1010
- if (config.spaceName)
1011
- parts.push(`Space: ${config.spaceName}`);
1012
- if (config.pageName) {
1013
- parts.push(`Page: ${config.pageName}`);
1014
- }
1015
- else if (config.pageId) {
1016
- parts.push(`Page ID: ${config.pageId}`);
1017
- }
904
+ if ("eventTypes" in config && config.eventTypes?.length)
905
+ parts.push(`Event Types: ${config.eventTypes.join(", ")}`);
1018
906
  return parts.join("\n");
1019
907
  }
1020
908
  case ConfigType.POSTHOG: {
@@ -1059,6 +947,8 @@ export function formatConfigForAgent(config) {
1059
947
  }
1060
948
  case ConfigType.SNOWFLAKE_OUTPUT:
1061
949
  return `Type: Snowflake Output\nIntegration ID: ${config.integrationId}`;
950
+ case ConfigType.WEBHOOK_INPUT:
951
+ return "Type: Webhook Trigger";
1062
952
  default: {
1063
953
  const _exhaustive = config;
1064
954
  return _exhaustive;
@@ -1069,15 +959,12 @@ export const CONFIG_METADATA = {
1069
959
  [ConfigType.GMAIL]: GmailConfig,
1070
960
  [ConfigType.GMAIL_OUTPUT]: GmailOutputConfig,
1071
961
  [ConfigType.GMAIL_DRAFT_OUTPUT]: GmailDraftOutputConfig,
1072
- [ConfigType.FIGMA]: FigmaConfig,
1073
962
  [ConfigType.SLACK]: SlackConfig,
1074
963
  [ConfigType.SLACK_OUTPUT]: SlackOutputConfig,
1075
964
  [ConfigType.NOTION]: NotionConfig,
1076
965
  [ConfigType.LINEAR_INPUT]: LinearInputConfig,
1077
966
  [ConfigType.LINEAR_OUTPUT]: LinearOutputConfig,
1078
967
  [ConfigType.GITHUB]: GitHubConfig,
1079
- [ConfigType.JIRA]: JiraConfig,
1080
- [ConfigType.CONFLUENCE]: ConfluenceConfig,
1081
968
  [ConfigType.POSTHOG]: PosthogConfig,
1082
969
  [ConfigType.DATADOG]: DatadogConfig,
1083
970
  [ConfigType.TIME_TRIGGER]: TimeTriggerConfig,
@@ -1086,5 +973,6 @@ export const CONFIG_METADATA = {
1086
973
  [ConfigType.WORKOS_INPUT]: WorkOSInputConfig,
1087
974
  [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfig,
1088
975
  [ConfigType.ATTIO_OUTPUT]: AttioOutputConfig,
1089
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig
976
+ [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig,
977
+ [ConfigType.WEBHOOK_INPUT]: WebhookInputConfig
1090
978
  };