sequentum-mcp 1.0.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.
@@ -0,0 +1,476 @@
1
+ /**
2
+ * Sequentum API Client
3
+ * Handles all HTTP communication with the Sequentum Control Center API
4
+ */
5
+ export class SequentumApiClient {
6
+ baseUrl;
7
+ apiKey;
8
+ requestTimeoutMs;
9
+ /**
10
+ * Create a new Sequentum API client
11
+ * @param baseUrl - The base URL of the Sequentum API (e.g., https://dashboard.sequentum.com)
12
+ * @param apiKey - The API key (sk-...) for authentication
13
+ * @param requestTimeoutMs - Request timeout in milliseconds (default: 30000)
14
+ */
15
+ constructor(baseUrl, apiKey, requestTimeoutMs = 30000) {
16
+ this.baseUrl = baseUrl.replace(/\/$/, "");
17
+ this.apiKey = apiKey;
18
+ this.requestTimeoutMs = requestTimeoutMs;
19
+ }
20
+ /**
21
+ * Make an authenticated request to the API
22
+ */
23
+ async request(endpoint, options = {}) {
24
+ const url = `${this.baseUrl}${endpoint}`;
25
+ const headers = {
26
+ Authorization: `ApiKey ${this.apiKey}`,
27
+ "Content-Type": "application/json",
28
+ Accept: "application/json",
29
+ ...options.headers,
30
+ };
31
+ // Setup timeout using AbortController
32
+ const controller = new AbortController();
33
+ const timeoutId = setTimeout(() => controller.abort(), this.requestTimeoutMs);
34
+ try {
35
+ const response = await fetch(url, {
36
+ ...options,
37
+ headers,
38
+ signal: controller.signal,
39
+ });
40
+ if (!response.ok) {
41
+ let errorMessage = `API Error ${response.status}: ${response.statusText}`;
42
+ try {
43
+ const errorText = await response.text();
44
+ if (errorText) {
45
+ try {
46
+ const errorJson = JSON.parse(errorText);
47
+ if (errorJson.message) {
48
+ errorMessage = errorJson.message;
49
+ }
50
+ }
51
+ catch {
52
+ errorMessage = errorText;
53
+ }
54
+ }
55
+ }
56
+ catch {
57
+ // Use default error message
58
+ }
59
+ throw new Error(errorMessage);
60
+ }
61
+ // Handle redirect for file downloads
62
+ if (response.redirected) {
63
+ return { redirectUrl: response.url };
64
+ }
65
+ const contentType = response.headers.get("content-type");
66
+ if (contentType?.includes("application/json")) {
67
+ return response.json();
68
+ }
69
+ return response.text();
70
+ }
71
+ catch (error) {
72
+ if (error instanceof Error && error.name === "AbortError") {
73
+ throw new Error(`Request timeout after ${this.requestTimeoutMs}ms: ${endpoint}`);
74
+ }
75
+ throw error;
76
+ }
77
+ finally {
78
+ clearTimeout(timeoutId);
79
+ }
80
+ }
81
+ /**
82
+ * Make an authenticated request that doesn't expect a response body
83
+ */
84
+ async requestVoid(endpoint, options = {}) {
85
+ const url = `${this.baseUrl}${endpoint}`;
86
+ const headers = {
87
+ Authorization: `ApiKey ${this.apiKey}`,
88
+ "Content-Type": "application/json",
89
+ Accept: "application/json",
90
+ ...options.headers,
91
+ };
92
+ const controller = new AbortController();
93
+ const timeoutId = setTimeout(() => controller.abort(), this.requestTimeoutMs);
94
+ try {
95
+ const response = await fetch(url, {
96
+ ...options,
97
+ headers,
98
+ signal: controller.signal,
99
+ });
100
+ if (!response.ok) {
101
+ let errorMessage = `API Error ${response.status}: ${response.statusText}`;
102
+ try {
103
+ const errorText = await response.text();
104
+ if (errorText) {
105
+ try {
106
+ const errorJson = JSON.parse(errorText);
107
+ if (errorJson.message) {
108
+ errorMessage = errorJson.message;
109
+ }
110
+ }
111
+ catch {
112
+ errorMessage = errorText;
113
+ }
114
+ }
115
+ }
116
+ catch {
117
+ // Use default error message
118
+ }
119
+ throw new Error(errorMessage);
120
+ }
121
+ // 204 No Content or any success status - just return
122
+ }
123
+ catch (error) {
124
+ if (error instanceof Error && error.name === "AbortError") {
125
+ throw new Error(`Request timeout after ${this.requestTimeoutMs}ms: ${endpoint}`);
126
+ }
127
+ throw error;
128
+ }
129
+ finally {
130
+ clearTimeout(timeoutId);
131
+ }
132
+ }
133
+ // ==========================================
134
+ // Agent Operations
135
+ // ==========================================
136
+ /**
137
+ * Get all agents accessible to the authenticated user
138
+ * @param filters - Optional filters for the agent list
139
+ * @returns Array of agents, or paginated response if pagination params are provided
140
+ */
141
+ async getAllAgents(filters) {
142
+ const params = new URLSearchParams();
143
+ if (filters?.status !== undefined) {
144
+ params.append("status", String(filters.status));
145
+ }
146
+ if (filters?.spaceId !== undefined) {
147
+ params.append("spaceId", String(filters.spaceId));
148
+ }
149
+ if (filters?.search) {
150
+ params.append("name", filters.search);
151
+ }
152
+ if (filters?.configType) {
153
+ params.append("configType", filters.configType);
154
+ }
155
+ if (filters?.sortColumn) {
156
+ params.append("sortColumn", filters.sortColumn);
157
+ }
158
+ if (filters?.sortOrder !== undefined) {
159
+ params.append("sortOrder", String(filters.sortOrder));
160
+ }
161
+ if (filters?.pageIndex !== undefined) {
162
+ params.append("pageIndex", String(filters.pageIndex));
163
+ }
164
+ if (filters?.recordsPerPage !== undefined) {
165
+ params.append("recordsPerPage", String(filters.recordsPerPage));
166
+ }
167
+ const query = params.toString() ? `?${params.toString()}` : "";
168
+ return this.request(`/api/v1/agent/all${query}`);
169
+ }
170
+ /**
171
+ * Get detailed information about a specific agent
172
+ * @param agentId - The ID of the agent
173
+ */
174
+ async getAgent(agentId) {
175
+ return this.request(`/api/v1/agent/${agentId}`);
176
+ }
177
+ /**
178
+ * Search for agents by name or description
179
+ * @param query - The search term to match against agent names and descriptions
180
+ * @param maxRecords - Maximum number of results to return (default: 50, max: 1000)
181
+ */
182
+ async searchAgents(query, maxRecords) {
183
+ const params = new URLSearchParams();
184
+ params.append("query", query);
185
+ if (maxRecords !== undefined)
186
+ params.append("maxRecords", String(maxRecords));
187
+ const queryString = params.toString() ? `?${params.toString()}` : "";
188
+ return this.request(`/api/v1/agent/search${queryString}`);
189
+ }
190
+ // ==========================================
191
+ // Run Operations
192
+ // ==========================================
193
+ /**
194
+ * Get run history for an agent
195
+ * @param agentId - The ID of the agent
196
+ * @param maxRecords - Maximum number of records to return (default: 50)
197
+ */
198
+ async getAgentRuns(agentId, maxRecords) {
199
+ const query = maxRecords ? `?maxRecords=${maxRecords}` : "";
200
+ return this.request(`/api/v1/agent/${agentId}/runs${query}`);
201
+ }
202
+ /**
203
+ * Get the status of a specific run
204
+ * @param agentId - The ID of the agent
205
+ * @param runId - The ID of the run to check
206
+ */
207
+ async getRunStatus(agentId, runId) {
208
+ return this.request(`/api/v1/agent/${agentId}/run/${runId}/status`);
209
+ }
210
+ /**
211
+ * Start an agent execution
212
+ * @param agentId - The ID of the agent to run
213
+ * @param request - The run configuration
214
+ * @returns Run details or direct results if running synchronously
215
+ */
216
+ async startAgent(agentId, request) {
217
+ return this.request(`/api/v1/agent/${agentId}/start`, {
218
+ method: "POST",
219
+ body: JSON.stringify({
220
+ Parallelism: request.parallelism ?? 1,
221
+ ParallelMaxConcurrency: request.parallelMaxConcurrency ?? 1,
222
+ ParallelExport: request.parallelExport ?? "Combined",
223
+ ProxyPoolId: request.proxyPoolId,
224
+ InputParameters: request.inputParameters,
225
+ Timeout: request.timeout ?? 60,
226
+ IsExclusive: request.isExclusive ?? true,
227
+ IsWaitOnFailure: request.isWaitOnFailure ?? false,
228
+ IsRunSynchronously: request.isRunSynchronously ?? false,
229
+ LogLevel: request.logLevel ?? "Info",
230
+ LogMode: request.logMode ?? "Text",
231
+ }),
232
+ });
233
+ }
234
+ /**
235
+ * Stop a running agent
236
+ * @param agentId - The ID of the agent
237
+ * @param runId - The ID of the run to stop
238
+ */
239
+ async stopAgent(agentId, runId) {
240
+ await this.requestVoid(`/api/v1/agent/${agentId}/run/${runId}/stop`, {
241
+ method: "POST",
242
+ });
243
+ }
244
+ // ==========================================
245
+ // File Operations
246
+ // ==========================================
247
+ /**
248
+ * Get all output files from a run
249
+ * @param agentId - The ID of the agent
250
+ * @param runId - The ID of the run
251
+ */
252
+ async getRunFiles(agentId, runId) {
253
+ return this.request(`/api/v1/agent/${agentId}/run/${runId}/files`);
254
+ }
255
+ /**
256
+ * Get a download URL for a run file
257
+ * @param agentId - The ID of the agent
258
+ * @param runId - The ID of the run
259
+ * @param fileId - The ID of the file
260
+ */
261
+ async downloadRunFile(agentId, runId, fileId) {
262
+ return this.request(`/api/v1/agent/${agentId}/run/${runId}/file/${fileId}/download`);
263
+ }
264
+ // ==========================================
265
+ // Version Operations
266
+ // ==========================================
267
+ /**
268
+ * Get all versions of an agent
269
+ * @param agentId - The ID of the agent
270
+ */
271
+ async getAgentVersions(agentId) {
272
+ return this.request(`/api/v1/agent/${agentId}/versions`);
273
+ }
274
+ /**
275
+ * Restore an agent to a previous version
276
+ * @param agentId - The ID of the agent
277
+ * @param versionNumber - The version number to restore
278
+ * @param comments - Comments explaining the restoration
279
+ */
280
+ async restoreAgentVersion(agentId, versionNumber, comments) {
281
+ await this.requestVoid(`/api/v1/agent/${agentId}/version/${versionNumber}/restore`, {
282
+ method: "POST",
283
+ body: JSON.stringify({ content: comments }),
284
+ });
285
+ }
286
+ // ==========================================
287
+ // Schedule Operations
288
+ // ==========================================
289
+ /**
290
+ * Get all schedules for an agent
291
+ * @param agentId - The ID of the agent
292
+ */
293
+ async getAgentSchedules(agentId) {
294
+ return this.request(`/api/v1/agent/${agentId}/schedules`);
295
+ }
296
+ /**
297
+ * Create a new schedule for an agent
298
+ * @param agentId - The ID of the agent
299
+ * @param request - The schedule configuration
300
+ */
301
+ async createAgentSchedule(agentId, request) {
302
+ return this.request(`/api/v1/agent/${agentId}/schedules`, {
303
+ method: "POST",
304
+ body: JSON.stringify({
305
+ Name: request.name,
306
+ CronExpression: request.cronExpression,
307
+ Timezone: request.timezone,
308
+ StartTime: request.startTime,
309
+ InputParameters: request.inputParameters,
310
+ IsEnabled: request.isEnabled ?? true,
311
+ Parallelism: request.parallelism ?? 1,
312
+ ScheduleType: request.scheduleType,
313
+ RunEveryCount: request.runEveryCount,
314
+ RunEveryPeriod: request.runEveryPeriod,
315
+ }),
316
+ });
317
+ }
318
+ /**
319
+ * Delete a schedule from an agent
320
+ * @param agentId - The ID of the agent
321
+ * @param scheduleId - The ID of the schedule to delete
322
+ */
323
+ async deleteAgentSchedule(agentId, scheduleId) {
324
+ await this.requestVoid(`/api/v1/agent/${agentId}/schedules/${scheduleId}`, { method: "DELETE" });
325
+ }
326
+ /**
327
+ * Get upcoming scheduled runs
328
+ * @param startDate - Optional start date (ISO format)
329
+ * @param endDate - Optional end date (ISO format)
330
+ */
331
+ async getUpcomingSchedules(startDate, endDate) {
332
+ const params = new URLSearchParams();
333
+ if (startDate)
334
+ params.append("startDate", startDate);
335
+ if (endDate)
336
+ params.append("endDate", endDate);
337
+ const query = params.toString() ? `?${params.toString()}` : "";
338
+ return this.request(`/api/v1/analytics/schedules/upcoming${query}`);
339
+ }
340
+ // ==========================================
341
+ // Billing/Credits Operations
342
+ // ==========================================
343
+ /**
344
+ * Get the current credits balance
345
+ */
346
+ async getCreditsBalance() {
347
+ return this.request("/api/v1/billing/credits");
348
+ }
349
+ /**
350
+ * Get spending summary for a date range
351
+ * @param startDate - Optional start date (ISO format)
352
+ * @param endDate - Optional end date (ISO format)
353
+ */
354
+ async getSpendingSummary(startDate, endDate) {
355
+ const params = new URLSearchParams();
356
+ if (startDate)
357
+ params.append("startDate", startDate);
358
+ if (endDate)
359
+ params.append("endDate", endDate);
360
+ const query = params.toString() ? `?${params.toString()}` : "";
361
+ return this.request(`/api/v1/billing/spending${query}`);
362
+ }
363
+ /**
364
+ * Get credit transaction history
365
+ * @param pageIndex - Page number (1-based, default: 1)
366
+ * @param recordsPerPage - Records per page (default: 50, max: 100)
367
+ */
368
+ async getCreditHistory(pageIndex, recordsPerPage) {
369
+ const params = new URLSearchParams();
370
+ if (pageIndex !== undefined)
371
+ params.append("pageIndex", String(pageIndex));
372
+ if (recordsPerPage !== undefined)
373
+ params.append("recordsPerPage", String(recordsPerPage));
374
+ const query = params.toString() ? `?${params.toString()}` : "";
375
+ return this.request(`/api/v1/billing/history${query}`);
376
+ }
377
+ // ==========================================
378
+ // Space Operations
379
+ // ==========================================
380
+ /**
381
+ * Get all spaces accessible to the user
382
+ */
383
+ async getAllSpaces() {
384
+ return this.request("/api/v1/spaces");
385
+ }
386
+ /**
387
+ * Get a specific space by ID
388
+ * @param spaceId - The ID of the space
389
+ */
390
+ async getSpace(spaceId) {
391
+ return this.request(`/api/v1/spaces/${spaceId}`);
392
+ }
393
+ /**
394
+ * Get all agents in a space
395
+ * @param spaceId - The ID of the space
396
+ */
397
+ async getSpaceAgents(spaceId) {
398
+ return this.request(`/api/v1/spaces/${spaceId}/agents`);
399
+ }
400
+ /**
401
+ * Search for a space by name
402
+ * @param name - The name of the space to search for
403
+ */
404
+ async searchSpaceByName(name) {
405
+ return this.request(`/api/v1/spaces/search?name=${encodeURIComponent(name)}`);
406
+ }
407
+ /**
408
+ * Run all agents in a space
409
+ * @param spaceId - The ID of the space
410
+ * @param inputParameters - Optional JSON input parameters
411
+ */
412
+ async runSpaceAgents(spaceId, inputParameters) {
413
+ return this.request(`/api/v1/spaces/${spaceId}/run-all`, {
414
+ method: "POST",
415
+ body: JSON.stringify({
416
+ InputParameters: inputParameters,
417
+ }),
418
+ });
419
+ }
420
+ // ==========================================
421
+ // Analytics Operations
422
+ // ==========================================
423
+ /**
424
+ * Get runs summary for a date range
425
+ * @param startDate - Optional start date (ISO format)
426
+ * @param endDate - Optional end date (ISO format)
427
+ * @param status - Optional status filter
428
+ * @param includeDetails - Whether to include failed run details
429
+ */
430
+ async getRunsSummary(startDate, endDate, status, includeDetails) {
431
+ const params = new URLSearchParams();
432
+ if (startDate)
433
+ params.append("startDate", startDate);
434
+ if (endDate)
435
+ params.append("endDate", endDate);
436
+ if (status)
437
+ params.append("status", status);
438
+ if (includeDetails !== undefined)
439
+ params.append("includeDetails", String(includeDetails));
440
+ const query = params.toString() ? `?${params.toString()}` : "";
441
+ return this.request(`/api/v1/analytics/runs/summary${query}`);
442
+ }
443
+ /**
444
+ * Get records summary for a date range
445
+ * @param startDate - Optional start date (ISO format)
446
+ * @param endDate - Optional end date (ISO format)
447
+ * @param agentId - Optional agent ID filter
448
+ */
449
+ async getRecordsSummary(startDate, endDate, agentId) {
450
+ const params = new URLSearchParams();
451
+ if (startDate)
452
+ params.append("startDate", startDate);
453
+ if (endDate)
454
+ params.append("endDate", endDate);
455
+ if (agentId)
456
+ params.append("agentId", String(agentId));
457
+ const query = params.toString() ? `?${params.toString()}` : "";
458
+ return this.request(`/api/v1/analytics/records/summary${query}`);
459
+ }
460
+ /**
461
+ * Get diagnostics for a specific run
462
+ * @param agentId - The ID of the agent
463
+ * @param runId - The ID of the run
464
+ */
465
+ async getRunDiagnostics(agentId, runId) {
466
+ return this.request(`/api/v1/analytics/agents/${agentId}/runs/${runId}/diagnostics`);
467
+ }
468
+ /**
469
+ * Get the latest failure for an agent
470
+ * @param agentId - The ID of the agent
471
+ */
472
+ async getLatestFailure(agentId) {
473
+ return this.request(`/api/v1/analytics/agents/${agentId}/latest-failure`);
474
+ }
475
+ }
476
+ //# sourceMappingURL=api-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAyBH,MAAM,OAAO,kBAAkB;IACrB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,gBAAgB,CAAS;IAEjC;;;;;OAKG;IACH,YAAY,OAAe,EAAE,MAAc,EAAE,mBAA2B,KAAK;QAC3E,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAC3C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,OAAO,CACnB,QAAgB,EAChB,UAAuB,EAAE;QAEzB,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC;QACzC,MAAM,OAAO,GAA2B;YACtC,aAAa,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;YACtC,cAAc,EAAE,kBAAkB;YAClC,MAAM,EAAE,kBAAkB;YAC1B,G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AAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC,OAAO,CACjB,oCAAoC,KAAK,EAAE,CAC5C,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAAe,EACf,KAAa;QAEb,OAAO,IAAI,CAAC,OAAO,CACjB,4BAA4B,OAAO,SAAS,KAAK,cAAc,CAChE,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CAAC,OAAe;QACpC,OAAO,IAAI,CAAC,OAAO,CACjB,4BAA4B,OAAO,iBAAiB,CACrD,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Sequentum MCP Server
4
+ *
5
+ * A Model Context Protocol (MCP) server that enables AI assistants to interact
6
+ * with the Sequentum web scraping platform.
7
+ *
8
+ * Environment Variables:
9
+ * SEQUENTUM_API_URL - The base URL of the Sequentum API (required)
10
+ * SEQUENTUM_API_KEY - Your API key (required, format: sk-...)
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;GASG"}