terse-cli 0.3.7 → 0.4.0

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