terse-sdk 0.3.6 → 0.3.7

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.
Files changed (69) hide show
  1. package/dist/__typetest.d.ts +2 -0
  2. package/dist/__typetest.d.ts.map +1 -0
  3. package/dist/__typetest.js +25 -0
  4. package/dist/__typetest.js.map +1 -0
  5. package/package.json +2 -2
  6. package/dist/__state_typetest.d.ts +0 -2
  7. package/dist/__state_typetest.d.ts.map +0 -1
  8. package/dist/__state_typetest.js +0 -32
  9. package/dist/__state_typetest.js.map +0 -1
  10. package/dist/memoryfs/file.d.ts +0 -16
  11. package/dist/memoryfs/file.d.ts.map +0 -1
  12. package/dist/memoryfs/file.js +0 -40
  13. package/dist/memoryfs/file.js.map +0 -1
  14. package/dist/memoryfs/index.d.ts +0 -25
  15. package/dist/memoryfs/index.d.ts.map +0 -1
  16. package/dist/memoryfs/index.js +0 -60
  17. package/dist/memoryfs/index.js.map +0 -1
  18. package/dist/memoryfs/memory.d.ts +0 -21
  19. package/dist/memoryfs/memory.d.ts.map +0 -1
  20. package/dist/memoryfs/memory.js +0 -196
  21. package/dist/memoryfs/memory.js.map +0 -1
  22. package/dist/memoryfs/paths.d.ts +0 -7
  23. package/dist/memoryfs/paths.d.ts.map +0 -1
  24. package/dist/memoryfs/paths.js +0 -39
  25. package/dist/memoryfs/paths.js.map +0 -1
  26. package/dist/memoryfs/store.d.ts +0 -18
  27. package/dist/memoryfs/store.d.ts.map +0 -1
  28. package/dist/memoryfs/store.js +0 -89
  29. package/dist/memoryfs/store.js.map +0 -1
  30. package/dist/perf.d.ts +0 -9
  31. package/dist/perf.d.ts.map +0 -1
  32. package/dist/perf.js +0 -57
  33. package/dist/perf.js.map +0 -1
  34. package/dist/shared/ApiRoutes.d.ts +0 -348
  35. package/dist/shared/ApiRoutes.d.ts.map +0 -1
  36. package/dist/shared/ApiRoutes.js +0 -325
  37. package/dist/shared/ApiRoutes.js.map +0 -1
  38. package/dist/shared/Configs.d.ts +0 -488
  39. package/dist/shared/Configs.d.ts.map +0 -1
  40. package/dist/shared/Configs.js +0 -785
  41. package/dist/shared/Configs.js.map +0 -1
  42. package/dist/shared/Entities.d.ts +0 -8
  43. package/dist/shared/Entities.d.ts.map +0 -1
  44. package/dist/shared/Entities.js +0 -9
  45. package/dist/shared/Entities.js.map +0 -1
  46. package/dist/shared/Integrations.d.ts +0 -235
  47. package/dist/shared/Integrations.d.ts.map +0 -1
  48. package/dist/shared/Integrations.js +0 -143
  49. package/dist/shared/Integrations.js.map +0 -1
  50. package/dist/shared/ModelEvents.d.ts +0 -176
  51. package/dist/shared/ModelEvents.d.ts.map +0 -1
  52. package/dist/shared/ModelEvents.js +0 -29
  53. package/dist/shared/ModelEvents.js.map +0 -1
  54. package/dist/shared/RunHistoryTypes.d.ts +0 -95
  55. package/dist/shared/RunHistoryTypes.d.ts.map +0 -1
  56. package/dist/shared/RunHistoryTypes.js +0 -11
  57. package/dist/shared/RunHistoryTypes.js.map +0 -1
  58. package/dist/shared/Survey.d.ts +0 -10
  59. package/dist/shared/Survey.d.ts.map +0 -1
  60. package/dist/shared/Survey.js +0 -2
  61. package/dist/shared/Survey.js.map +0 -1
  62. package/dist/shared/TicketSystem.d.ts +0 -154
  63. package/dist/shared/TicketSystem.d.ts.map +0 -1
  64. package/dist/shared/TicketSystem.js +0 -21
  65. package/dist/shared/TicketSystem.js.map +0 -1
  66. package/dist/shared/types.d.ts +0 -1732
  67. package/dist/shared/types.d.ts.map +0 -1
  68. package/dist/shared/types.js +0 -17
  69. package/dist/shared/types.js.map +0 -1
@@ -1,785 +0,0 @@
1
- import { IntegrationType } from "./Integrations.js";
2
- export var ConfigType;
3
- (function (ConfigType) {
4
- ConfigType["GMAIL"] = "gmail";
5
- ConfigType["GMAIL_OUTPUT"] = "gmail_output";
6
- ConfigType["GMAIL_DRAFT_OUTPUT"] = "gmail_draft_output";
7
- ConfigType["FIGMA"] = "figma";
8
- ConfigType["SLACK"] = "slack";
9
- ConfigType["SLACK_OUTPUT"] = "slack_output";
10
- ConfigType["NOTION"] = "notion";
11
- ConfigType["LINEAR_INPUT"] = "linear_input";
12
- ConfigType["LINEAR_OUTPUT"] = "linear_output";
13
- ConfigType["GITHUB"] = "github";
14
- ConfigType["JIRA"] = "jira";
15
- ConfigType["CONFLUENCE"] = "confluence";
16
- ConfigType["POSTHOG"] = "POSTHOG";
17
- ConfigType["DATADOG"] = "DATADOG";
18
- ConfigType["TIME_TRIGGER"] = "time_trigger";
19
- ConfigType["LAUNCHDARKLY"] = "launchdarkly";
20
- ConfigType["TERSE"] = "terse";
21
- ConfigType["WORKOS_INPUT"] = "workos_input";
22
- ConfigType["WORKOS_OUTPUT"] = "workos_output";
23
- ConfigType["ATTIO_OUTPUT"] = "attio_output";
24
- ConfigType["SNOWFLAKE_OUTPUT"] = "snowflake_output";
25
- })(ConfigType || (ConfigType = {}));
26
- // Metadata objects - using const objects instead of classes
27
- export const GmailConfigMetadata = {
28
- configType: ConfigType.GMAIL,
29
- name: "Gmail",
30
- description: "Monitor incoming emails",
31
- integrationType: IntegrationType.GMAIL,
32
- isInput: true,
33
- isOutput: false
34
- };
35
- export const FigmaConfigMetadata = {
36
- configType: ConfigType.FIGMA,
37
- name: "Figma",
38
- description: "Monitor design changes in Figma files",
39
- integrationType: IntegrationType.FIGMA,
40
- isInput: true,
41
- isOutput: false
42
- };
43
- export const SlackConfigMetadata = {
44
- configType: ConfigType.SLACK,
45
- name: "Slack",
46
- description: "Monitor messages in Slack channels or DMs",
47
- integrationType: IntegrationType.SLACK,
48
- isInput: true,
49
- isOutput: false
50
- };
51
- export const SlackOutputConfigMetadata = {
52
- configType: ConfigType.SLACK_OUTPUT,
53
- name: "Slack",
54
- description: "Send messages to Slack channels, group DMs, or direct messages",
55
- integrationType: IntegrationType.SLACK,
56
- isInput: false,
57
- isOutput: true
58
- };
59
- export const GmailOutputConfigMetadata = {
60
- configType: ConfigType.GMAIL_OUTPUT,
61
- name: "Gmail",
62
- description: "Send emails via Gmail",
63
- integrationType: IntegrationType.GMAIL,
64
- isInput: false,
65
- isOutput: true
66
- };
67
- export const GmailDraftOutputConfigMetadata = {
68
- configType: ConfigType.GMAIL_DRAFT_OUTPUT,
69
- name: "Gmail Draft",
70
- description: "Create draft emails in Gmail",
71
- integrationType: IntegrationType.GMAIL,
72
- isInput: false,
73
- isOutput: true
74
- };
75
- export const NotionConfigMetadata = {
76
- configType: ConfigType.NOTION,
77
- name: "Notion",
78
- description: "Update and monitor Notion pages and databases",
79
- integrationType: IntegrationType.NOTION,
80
- isInput: false,
81
- isOutput: true
82
- };
83
- export const LinearInputConfigMetadata = {
84
- configType: ConfigType.LINEAR_INPUT,
85
- name: "Linear",
86
- description: "Monitor Linear issues",
87
- integrationType: IntegrationType.LINEAR,
88
- isInput: true,
89
- isOutput: false
90
- };
91
- export const LinearOutputConfigMetadata = {
92
- configType: ConfigType.LINEAR_OUTPUT,
93
- name: "Linear",
94
- description: "Update Linear issues",
95
- integrationType: IntegrationType.LINEAR,
96
- isInput: false,
97
- isOutput: true
98
- };
99
- export const GitHubConfigMetadata = {
100
- configType: ConfigType.GITHUB,
101
- name: "GitHub",
102
- description: "Monitor and read Github repositories",
103
- integrationType: IntegrationType.GITHUB,
104
- isInput: true,
105
- isOutput: true
106
- };
107
- export const JiraConfigMetadata = {
108
- configType: ConfigType.JIRA,
109
- name: "Jira",
110
- description: "Monitor and update Jira issues",
111
- integrationType: IntegrationType.ATLASSIAN,
112
- isInput: true,
113
- isOutput: true
114
- };
115
- export const ConfluenceConfigMetadata = {
116
- configType: ConfigType.CONFLUENCE,
117
- name: "Confluence",
118
- description: "Update Confluence pages",
119
- integrationType: IntegrationType.ATLASSIAN,
120
- isInput: false,
121
- isOutput: true
122
- };
123
- export const PosthogConfigMetadata = {
124
- configType: ConfigType.POSTHOG,
125
- name: "Posthog",
126
- description: "Track user events",
127
- integrationType: IntegrationType.POSTHOG,
128
- isInput: false,
129
- isOutput: true
130
- };
131
- export const DatadogConfigMetadata = {
132
- configType: ConfigType.DATADOG,
133
- name: "Datadog",
134
- description: "Search logs in Datadog",
135
- integrationType: IntegrationType.DATADOG,
136
- isInput: false,
137
- isOutput: true
138
- };
139
- export const TimeTriggerConfigMetadata = {
140
- configType: ConfigType.TIME_TRIGGER,
141
- name: "Time Trigger",
142
- description: "Run on a schedule (daily, weekly, etc.)",
143
- integrationType: IntegrationType.CRON_JOB,
144
- isInput: true,
145
- isOutput: false
146
- };
147
- export const LaunchDarklyConfigMetadata = {
148
- configType: ConfigType.LAUNCHDARKLY,
149
- name: "LaunchDarkly",
150
- description: "Query feature flags",
151
- integrationType: IntegrationType.LAUNCHDARKLY,
152
- isInput: false,
153
- isOutput: true
154
- };
155
- export const TerseConfigMetadata = {
156
- configType: ConfigType.TERSE,
157
- name: "Terse Skills",
158
- description: "Built-in capabilities like web search (always available to agents)",
159
- integrationType: IntegrationType.TERSE,
160
- isInput: false,
161
- isOutput: true
162
- };
163
- export const WorkOSInputConfigMetadata = {
164
- configType: ConfigType.WORKOS_INPUT,
165
- name: "WorkOS",
166
- description: "Trigger on user signup, deletion, or membership changes in your app",
167
- integrationType: IntegrationType.WORKOS,
168
- isInput: true,
169
- isOutput: false
170
- };
171
- export const WorkOSOutputConfigMetadata = {
172
- configType: ConfigType.WORKOS_OUTPUT,
173
- name: "WorkOS",
174
- description: "Fetch and search users from your WorkOS account",
175
- integrationType: IntegrationType.WORKOS,
176
- isInput: false,
177
- isOutput: true
178
- };
179
- export const AttioOutputConfigMetadata = {
180
- configType: ConfigType.ATTIO_OUTPUT,
181
- name: "Attio",
182
- description: "Add and update contacts in Attio",
183
- integrationType: IntegrationType.ATTIO,
184
- isInput: false,
185
- isOutput: true
186
- };
187
- export const SnowflakeOutputConfigMetadata = {
188
- configType: ConfigType.SNOWFLAKE_OUTPUT,
189
- name: "Snowflake",
190
- description: "Run read-only queries against Snowflake data warehouses",
191
- integrationType: IntegrationType.SNOWFLAKE,
192
- isInput: false,
193
- isOutput: true
194
- };
195
- export const CONFIG_DETAILS = {
196
- [ConfigType.GMAIL]: GmailConfigMetadata,
197
- [ConfigType.GMAIL_OUTPUT]: GmailOutputConfigMetadata,
198
- [ConfigType.GMAIL_DRAFT_OUTPUT]: GmailDraftOutputConfigMetadata,
199
- [ConfigType.FIGMA]: FigmaConfigMetadata,
200
- [ConfigType.SLACK]: SlackConfigMetadata,
201
- [ConfigType.SLACK_OUTPUT]: SlackOutputConfigMetadata,
202
- [ConfigType.NOTION]: NotionConfigMetadata,
203
- [ConfigType.LINEAR_INPUT]: LinearInputConfigMetadata,
204
- [ConfigType.LINEAR_OUTPUT]: LinearOutputConfigMetadata,
205
- [ConfigType.GITHUB]: GitHubConfigMetadata,
206
- [ConfigType.JIRA]: JiraConfigMetadata,
207
- [ConfigType.CONFLUENCE]: ConfluenceConfigMetadata,
208
- [ConfigType.POSTHOG]: PosthogConfigMetadata,
209
- [ConfigType.DATADOG]: DatadogConfigMetadata,
210
- [ConfigType.TIME_TRIGGER]: TimeTriggerConfigMetadata,
211
- [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfigMetadata,
212
- [ConfigType.TERSE]: TerseConfigMetadata,
213
- [ConfigType.WORKOS_INPUT]: WorkOSInputConfigMetadata,
214
- [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfigMetadata,
215
- [ConfigType.ATTIO_OUTPUT]: AttioOutputConfigMetadata,
216
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfigMetadata
217
- };
218
- // MARK: Event Types — specific events within each integration trigger
219
- export var SlackEventType;
220
- (function (SlackEventType) {
221
- SlackEventType["MESSAGE"] = "message";
222
- SlackEventType["APP_MENTION"] = "app_mention";
223
- SlackEventType["REACTION_ADDED"] = "reaction_added";
224
- })(SlackEventType || (SlackEventType = {}));
225
- export var GitHubEventType;
226
- (function (GitHubEventType) {
227
- GitHubEventType["PUSH"] = "push";
228
- GitHubEventType["PR_OPENED"] = "pull_request.opened";
229
- GitHubEventType["PR_MERGED"] = "pull_request.merged";
230
- GitHubEventType["PR_CLOSED"] = "pull_request.closed";
231
- GitHubEventType["PR_SYNCHRONIZE"] = "pull_request.synchronize";
232
- })(GitHubEventType || (GitHubEventType = {}));
233
- export var LinearEventType;
234
- (function (LinearEventType) {
235
- LinearEventType["ISSUE_CREATED"] = "issue.created";
236
- LinearEventType["ISSUE_UPDATED"] = "issue.updated";
237
- LinearEventType["COMMENT_CREATED"] = "comment.created";
238
- })(LinearEventType || (LinearEventType = {}));
239
- export var JiraEventType;
240
- (function (JiraEventType) {
241
- JiraEventType["ISSUE_CREATED"] = "issue.created";
242
- JiraEventType["ISSUE_UPDATED"] = "issue.updated";
243
- })(JiraEventType || (JiraEventType = {}));
244
- export var FigmaEventType;
245
- (function (FigmaEventType) {
246
- FigmaEventType["FILE_COMMENT"] = "file_comment";
247
- })(FigmaEventType || (FigmaEventType = {}));
248
- export var GmailEventType;
249
- (function (GmailEventType) {
250
- GmailEventType["EMAIL_RECEIVED"] = "email.received";
251
- })(GmailEventType || (GmailEventType = {}));
252
- export var WorkOSEventType;
253
- (function (WorkOSEventType) {
254
- WorkOSEventType["USER_CREATED"] = "user.created";
255
- WorkOSEventType["USER_UPDATED"] = "user.updated";
256
- WorkOSEventType["USER_DELETED"] = "user.deleted";
257
- WorkOSEventType["ORGANIZATION_CREATED"] = "organization.created";
258
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_CREATED"] = "organization_membership.created";
259
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_UPDATED"] = "organization_membership.updated";
260
- WorkOSEventType["ORGANIZATION_MEMBERSHIP_DELETED"] = "organization_membership.deleted";
261
- WorkOSEventType["INVITATION_CREATED"] = "invitation.created";
262
- WorkOSEventType["INVITATION_ACCEPTED"] = "invitation.accepted";
263
- WorkOSEventType["INVITATION_RESENT"] = "invitation.resent";
264
- WorkOSEventType["INVITATION_REVOKED"] = "invitation.revoked";
265
- })(WorkOSEventType || (WorkOSEventType = {}));
266
- export class GmailConfig {
267
- integrationId;
268
- eventTypes;
269
- integrationType = IntegrationType.GMAIL;
270
- configType = ConfigType.GMAIL;
271
- constructor(integrationId, eventTypes) {
272
- this.integrationId = integrationId;
273
- this.eventTypes = eventTypes;
274
- }
275
- isComplete() {
276
- // Gmail only requires integrationId (base check handled in isInputComplete)
277
- return true;
278
- }
279
- formatForAgent() {
280
- return `Type: Gmail\nIntegration ID: ${this.integrationId}`;
281
- }
282
- }
283
- export class FigmaConfig {
284
- integrationId;
285
- fileKey;
286
- fileName;
287
- teamId;
288
- eventTypes;
289
- integrationType = IntegrationType.FIGMA;
290
- configType = ConfigType.FIGMA;
291
- constructor(integrationId, fileKey, fileName, teamId, eventTypes) {
292
- this.integrationId = integrationId;
293
- this.fileKey = fileKey;
294
- this.fileName = fileName;
295
- this.teamId = teamId;
296
- this.eventTypes = eventTypes;
297
- }
298
- isComplete() {
299
- return !!(this.fileKey && this.teamId);
300
- }
301
- formatForAgent() {
302
- const parts = [`Type: Figma`, `Integration ID: ${this.integrationId}`];
303
- if (this.fileName) {
304
- parts.push(`File: ${this.fileName}`);
305
- }
306
- if (this.fileKey) {
307
- parts.push(`File Key: ${this.fileKey}`);
308
- }
309
- return parts.join("\n");
310
- }
311
- }
312
- export class SlackConfig {
313
- integrationId;
314
- channelId;
315
- channelName;
316
- listenToUserDms;
317
- userIds;
318
- eventTypes;
319
- integrationType = IntegrationType.SLACK;
320
- configType = ConfigType.SLACK;
321
- constructor(integrationId, channelId, channelName, listenToUserDms = false, userIds, eventTypes) {
322
- this.integrationId = integrationId;
323
- this.channelId = channelId;
324
- this.channelName = channelName;
325
- this.listenToUserDms = listenToUserDms;
326
- this.userIds = userIds;
327
- this.eventTypes = eventTypes;
328
- }
329
- isComplete() {
330
- // Slack is complete if either channelId is set OR listenToUserDms is true
331
- return !!(this.channelId || this.listenToUserDms);
332
- }
333
- formatForAgent() {
334
- const parts = [`Type: Slack`, `Integration ID: ${this.integrationId}`];
335
- if (this.channelName) {
336
- parts.push(`Channel: ${this.channelName}`);
337
- }
338
- else if (this.channelId) {
339
- parts.push(`Channel ID: ${this.channelId}`);
340
- }
341
- if (this.listenToUserDms) {
342
- parts.push(`Listening to user DMs: Yes`);
343
- }
344
- if (this.userIds) {
345
- parts.push(`Users: ${this.userIds.join(", ")}`);
346
- }
347
- return parts.join("\n");
348
- }
349
- }
350
- export class SlackOutputConfig {
351
- integrationId;
352
- channelId;
353
- channelName;
354
- userIds;
355
- userNames;
356
- listenToUserDms;
357
- integrationType = IntegrationType.SLACK;
358
- configType = ConfigType.SLACK_OUTPUT;
359
- constructor(integrationId, channelId, channelName, userIds, userNames, listenToUserDms = false) {
360
- this.integrationId = integrationId;
361
- this.channelId = channelId;
362
- this.channelName = channelName;
363
- this.userIds = userIds;
364
- this.userNames = userNames;
365
- this.listenToUserDms = listenToUserDms;
366
- }
367
- isComplete() {
368
- // Slack output is complete if a channel is set, DM users are set, or "listen to user DMs" is enabled.
369
- return !!(this.channelId || (this.userIds?.length ?? 0) > 0 || this.listenToUserDms);
370
- }
371
- formatForAgent() {
372
- const parts = [`Type: Slack Output`, `Integration ID: ${this.integrationId}`];
373
- if (this.channelId) {
374
- parts.push(`Channel ID: ${this.channelId}`);
375
- }
376
- if (this.listenToUserDms) {
377
- parts.push(`Listen to user DMs: Yes`);
378
- }
379
- if (this.userIds?.length) {
380
- parts.push(`DM user IDs: ${this.userIds.join(", ")}`);
381
- }
382
- return parts.join("\n");
383
- }
384
- }
385
- export class GmailOutputConfig {
386
- integrationId;
387
- integrationType = IntegrationType.GMAIL;
388
- configType = ConfigType.GMAIL_OUTPUT;
389
- constructor(integrationId) {
390
- this.integrationId = integrationId;
391
- }
392
- isComplete() {
393
- // Gmail output only requires integrationId
394
- return true;
395
- }
396
- formatForAgent() {
397
- return `Type: Gmail Output\nIntegration ID: ${this.integrationId}`;
398
- }
399
- }
400
- export class GmailDraftOutputConfig {
401
- integrationId;
402
- integrationType = IntegrationType.GMAIL;
403
- configType = ConfigType.GMAIL_DRAFT_OUTPUT;
404
- constructor(integrationId) {
405
- this.integrationId = integrationId;
406
- }
407
- isComplete() {
408
- return true;
409
- }
410
- formatForAgent() {
411
- return `Type: Gmail Draft Output\nIntegration ID: ${this.integrationId}`;
412
- }
413
- }
414
- export class NotionConfig {
415
- integrationId;
416
- databaseIds;
417
- databaseNames;
418
- pageIds;
419
- pageNames;
420
- integrationType = IntegrationType.NOTION;
421
- configType = ConfigType.NOTION;
422
- constructor(integrationId, databaseIds = [], databaseNames = [], pageIds = [], pageNames = []) {
423
- this.integrationId = integrationId;
424
- this.databaseIds = databaseIds;
425
- this.databaseNames = databaseNames;
426
- this.pageIds = pageIds;
427
- this.pageNames = pageNames;
428
- }
429
- isComplete() {
430
- return (this.databaseIds?.length ?? 0) > 0 || (this.pageIds?.length ?? 0) > 0;
431
- }
432
- formatForAgent() {
433
- const parts = [`Type: Notion`, `Integration ID: ${this.integrationId}`];
434
- const dbIds = this.databaseIds ?? [];
435
- const dbNames = this.databaseNames ?? [];
436
- if (dbIds.length > 0) {
437
- parts.push(`Databases: ${dbIds.map((id, i) => dbNames[i] || id).join(", ")}`);
438
- }
439
- const pageIds = this.pageIds ?? [];
440
- const pageNames = this.pageNames ?? [];
441
- if (pageIds.length > 0) {
442
- parts.push(`Pages: ${pageIds.map((id, i) => pageNames[i] || id).join(", ")}`);
443
- }
444
- return parts.join("\n");
445
- }
446
- }
447
- export class LinearInputConfig {
448
- integrationId;
449
- projectId;
450
- projectName;
451
- eventTypes;
452
- integrationType = IntegrationType.LINEAR;
453
- configType = ConfigType.LINEAR_INPUT;
454
- constructor(integrationId, projectId, projectName, eventTypes) {
455
- this.integrationId = integrationId;
456
- this.projectId = projectId;
457
- this.projectName = projectName;
458
- this.eventTypes = eventTypes;
459
- }
460
- isComplete() {
461
- return true;
462
- }
463
- formatForAgent() {
464
- const parts = [`Type: Linear`, `Integration ID: ${this.integrationId}`];
465
- if (this.projectName) {
466
- parts.push(`Project: ${this.projectName}`);
467
- }
468
- else if (this.projectId) {
469
- parts.push(`Project ID: ${this.projectId}`);
470
- }
471
- return parts.join("\n");
472
- }
473
- }
474
- export class LinearOutputConfig {
475
- integrationId;
476
- teamId;
477
- teamName;
478
- projectId;
479
- projectName;
480
- integrationType = IntegrationType.LINEAR;
481
- configType = ConfigType.LINEAR_OUTPUT;
482
- constructor(integrationId, teamId, teamName, projectId, projectName) {
483
- this.integrationId = integrationId;
484
- this.teamId = teamId;
485
- this.teamName = teamName;
486
- this.projectId = projectId;
487
- this.projectName = projectName;
488
- }
489
- isComplete() {
490
- return !!this.integrationId;
491
- }
492
- formatForAgent() {
493
- const parts = [`Type: Linear`, `Integration ID: ${this.integrationId}`];
494
- if (this.teamName) {
495
- parts.push(`Team: ${this.teamName}`);
496
- }
497
- else if (this.teamId) {
498
- parts.push(`Team ID: ${this.teamId}`);
499
- }
500
- if (this.projectName) {
501
- parts.push(`Project: ${this.projectName}`);
502
- }
503
- else if (this.projectId) {
504
- parts.push(`Project ID: ${this.projectId}`);
505
- }
506
- return parts.join("\n");
507
- }
508
- }
509
- export class GitHubConfig {
510
- integrationId;
511
- repositoryIds;
512
- eventTypes;
513
- integrationType = IntegrationType.GITHUB;
514
- configType = ConfigType.GITHUB;
515
- constructor(integrationId, repositoryIds, eventTypes) {
516
- this.integrationId = integrationId;
517
- this.repositoryIds = repositoryIds;
518
- this.eventTypes = eventTypes;
519
- }
520
- isComplete() {
521
- return (this.repositoryIds?.length ?? 0) > 0;
522
- }
523
- formatForAgent() {
524
- const parts = [`Type: GitHub`, `Integration ID: ${this.integrationId}`];
525
- if (this.repositoryIds.length > 0) {
526
- parts.push(`Repositories: ${this.repositoryIds.join(", ")}`);
527
- }
528
- return parts.join("\n");
529
- }
530
- }
531
- export class JiraConfig {
532
- integrationId;
533
- projectKey;
534
- projectId;
535
- eventTypes;
536
- integrationType = IntegrationType.ATLASSIAN;
537
- configType = ConfigType.JIRA;
538
- constructor(integrationId, projectKey, projectId, eventTypes) {
539
- this.integrationId = integrationId;
540
- this.projectKey = projectKey;
541
- this.projectId = projectId;
542
- this.eventTypes = eventTypes;
543
- }
544
- isComplete() {
545
- // Jira only requires integrationId (base check handled in isInputComplete)
546
- return true;
547
- }
548
- formatForAgent() {
549
- const parts = [`Type: Jira`, `Integration ID: ${this.integrationId}`];
550
- if (this.projectKey) {
551
- parts.push(`Project Key: ${this.projectKey}`);
552
- }
553
- else if (this.projectId) {
554
- parts.push(`Project ID: ${this.projectId}`);
555
- }
556
- return parts.join("\n");
557
- }
558
- }
559
- export class ConfluenceConfig {
560
- integrationId;
561
- spaceName;
562
- spaceId;
563
- pageId;
564
- pageName;
565
- integrationType = IntegrationType.ATLASSIAN;
566
- configType = ConfigType.CONFLUENCE;
567
- constructor(integrationId, spaceName, spaceId, pageId, // Page ID (required for outputs - specific page to write to)
568
- pageName // Page display name (for UI, optional)
569
- ) {
570
- this.integrationId = integrationId;
571
- this.spaceName = spaceName;
572
- this.spaceId = spaceId;
573
- this.pageId = pageId;
574
- this.pageName = pageName;
575
- }
576
- isComplete() {
577
- // Confluence only requires integrationId (base check handled in isInputComplete)
578
- return true;
579
- }
580
- formatForAgent() {
581
- const parts = [`Type: Confluence`, `Integration ID: ${this.integrationId}`];
582
- if (this.spaceName) {
583
- parts.push(`Space: ${this.spaceName}`);
584
- }
585
- if (this.pageName) {
586
- parts.push(`Page: ${this.pageName}`);
587
- }
588
- else if (this.pageId) {
589
- parts.push(`Page ID: ${this.pageId}`);
590
- }
591
- return parts.join("\n");
592
- }
593
- }
594
- export class PosthogConfig {
595
- integrationId;
596
- projectId;
597
- projectName;
598
- integrationType = IntegrationType.POSTHOG;
599
- configType = ConfigType.POSTHOG;
600
- constructor(integrationId, projectId, projectName) {
601
- this.integrationId = integrationId;
602
- this.projectId = projectId;
603
- this.projectName = projectName;
604
- }
605
- isComplete() {
606
- return !!this.projectId;
607
- }
608
- formatForAgent() {
609
- const parts = [`Type: Posthog`, `Integration ID: ${this.integrationId}`];
610
- if (this.projectId) {
611
- parts.push(`Project ID: ${this.projectId}`);
612
- }
613
- if (this.projectName) {
614
- parts.push(`Project: ${this.projectName}`);
615
- }
616
- return parts.join("\n");
617
- }
618
- }
619
- export class DatadogConfig {
620
- integrationId;
621
- defaultIndexes;
622
- integrationType = IntegrationType.DATADOG;
623
- configType = ConfigType.DATADOG;
624
- constructor(integrationId, defaultIndexes = ["main"]) {
625
- this.integrationId = integrationId;
626
- this.defaultIndexes = defaultIndexes;
627
- }
628
- isComplete() {
629
- return !!this.integrationId;
630
- }
631
- formatForAgent() {
632
- const parts = [`Type: Datadog`, `Integration ID: ${this.integrationId}`];
633
- if (this.defaultIndexes && this.defaultIndexes.length > 0) {
634
- parts.push(`Default indexes: ${this.defaultIndexes.join(", ")}`);
635
- }
636
- return parts.join("\n");
637
- }
638
- }
639
- export class TimeTriggerConfig {
640
- cronExpression;
641
- integrationType = IntegrationType.CRON_JOB;
642
- configType = ConfigType.TIME_TRIGGER;
643
- // System integration - no real integration ID needed
644
- integrationId = "system";
645
- constructor(cronExpression) {
646
- this.cronExpression = cronExpression;
647
- }
648
- isComplete() {
649
- return !!this.cronExpression;
650
- }
651
- formatForAgent() {
652
- const parts = [`Type: Time Trigger`];
653
- if (this.cronExpression) {
654
- parts.push(`Schedule (UTC): ${this.cronExpression}`);
655
- }
656
- return parts.join("\n");
657
- }
658
- }
659
- export class LaunchDarklyConfig {
660
- integrationId;
661
- projectKey;
662
- environmentKeys;
663
- integrationType = IntegrationType.LAUNCHDARKLY;
664
- configType = ConfigType.LAUNCHDARKLY;
665
- constructor(integrationId, projectKey, environmentKeys // ["production", "staging"]
666
- ) {
667
- this.integrationId = integrationId;
668
- this.projectKey = projectKey;
669
- this.environmentKeys = environmentKeys;
670
- }
671
- isComplete() {
672
- return !!(this.projectKey && this.environmentKeys.length > 0);
673
- }
674
- formatForAgent() {
675
- const parts = [`Type: LaunchDarkly`, `Integration ID: ${this.integrationId}`];
676
- if (this.projectKey) {
677
- parts.push(`Project Key: ${this.projectKey}`);
678
- }
679
- if (this.environmentKeys.length > 0) {
680
- parts.push(`Environments: ${this.environmentKeys.join(", ")}`);
681
- }
682
- return parts.join("\n");
683
- }
684
- }
685
- export class TerseConfig {
686
- integrationType = IntegrationType.TERSE;
687
- configType = ConfigType.TERSE;
688
- integrationId = "system";
689
- constructor() { }
690
- isComplete() {
691
- return true;
692
- }
693
- formatForAgent() {
694
- return "Type: Terse Skills";
695
- }
696
- }
697
- export class WorkOSInputConfig {
698
- integrationId;
699
- eventTypes;
700
- integrationType = IntegrationType.WORKOS;
701
- configType = ConfigType.WORKOS_INPUT;
702
- constructor(integrationId, eventTypes = []) {
703
- this.integrationId = integrationId;
704
- this.eventTypes = eventTypes;
705
- }
706
- isComplete() {
707
- return this.eventTypes.length > 0;
708
- }
709
- formatForAgent() {
710
- return `Type: WorkOS Events\nListening for: ${this.eventTypes.join(", ")}`;
711
- }
712
- }
713
- export class WorkOSOutputConfig {
714
- integrationId;
715
- integrationType = IntegrationType.WORKOS;
716
- configType = ConfigType.WORKOS_OUTPUT;
717
- constructor(integrationId) {
718
- this.integrationId = integrationId;
719
- }
720
- isComplete() {
721
- return !!this.integrationId;
722
- }
723
- formatForAgent() {
724
- return `Type: WorkOS Skill\nIntegration ID: ${this.integrationId}`;
725
- }
726
- }
727
- export class AttioOutputConfig {
728
- integrationId;
729
- objectSlug;
730
- integrationType = IntegrationType.ATTIO;
731
- configType = ConfigType.ATTIO_OUTPUT;
732
- constructor(integrationId, objectSlug) {
733
- this.integrationId = integrationId;
734
- this.objectSlug = objectSlug;
735
- }
736
- isComplete() {
737
- return !!this.objectSlug;
738
- }
739
- formatForAgent() {
740
- const parts = [`Type: Attio Output`, `Integration ID: ${this.integrationId}`];
741
- if (this.objectSlug) {
742
- parts.push(`Object: ${this.objectSlug}`);
743
- }
744
- return parts.join("\n");
745
- }
746
- }
747
- export class SnowflakeOutputConfig {
748
- integrationId;
749
- integrationType = IntegrationType.SNOWFLAKE;
750
- configType = ConfigType.SNOWFLAKE_OUTPUT;
751
- constructor(integrationId) {
752
- this.integrationId = integrationId;
753
- }
754
- isComplete() {
755
- return !!this.integrationId;
756
- }
757
- formatForAgent() {
758
- const parts = [`Type: Snowflake Output`, `Integration ID: ${this.integrationId}`];
759
- return parts.join("\n");
760
- }
761
- }
762
- export const CONFIG_METADATA = {
763
- [ConfigType.GMAIL]: GmailConfig,
764
- [ConfigType.GMAIL_OUTPUT]: GmailOutputConfig,
765
- [ConfigType.GMAIL_DRAFT_OUTPUT]: GmailDraftOutputConfig,
766
- [ConfigType.FIGMA]: FigmaConfig,
767
- [ConfigType.SLACK]: SlackConfig,
768
- [ConfigType.SLACK_OUTPUT]: SlackOutputConfig,
769
- [ConfigType.NOTION]: NotionConfig,
770
- [ConfigType.LINEAR_INPUT]: LinearInputConfig,
771
- [ConfigType.LINEAR_OUTPUT]: LinearOutputConfig,
772
- [ConfigType.GITHUB]: GitHubConfig,
773
- [ConfigType.JIRA]: JiraConfig,
774
- [ConfigType.CONFLUENCE]: ConfluenceConfig,
775
- [ConfigType.POSTHOG]: PosthogConfig,
776
- [ConfigType.DATADOG]: DatadogConfig,
777
- [ConfigType.TIME_TRIGGER]: TimeTriggerConfig,
778
- [ConfigType.LAUNCHDARKLY]: LaunchDarklyConfig,
779
- [ConfigType.TERSE]: TerseConfig,
780
- [ConfigType.WORKOS_INPUT]: WorkOSInputConfig,
781
- [ConfigType.WORKOS_OUTPUT]: WorkOSOutputConfig,
782
- [ConfigType.ATTIO_OUTPUT]: AttioOutputConfig,
783
- [ConfigType.SNOWFLAKE_OUTPUT]: SnowflakeOutputConfig
784
- };
785
- //# sourceMappingURL=Configs.js.map