@172ai/containers-mcp-server 1.12.3 → 1.12.5

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,108 @@
1
+ import { ExportContainerParams, ExportJobStatus, ExportJobListResponse, ListExportJobsParams } from '../types.js';
2
+ /**
3
+ * Export management service with real-time streaming support
4
+ * Handles container exports to Docker Hub, GitHub repositories, and archive downloads
5
+ */
6
+ interface StreamAnalytics {
7
+ totalExports: number;
8
+ activeExports: number;
9
+ completedExports: number;
10
+ failedExports: number;
11
+ averageExportTime: number;
12
+ notificationsSent: number;
13
+ errorsEncountered: number;
14
+ lastActivity: string;
15
+ }
16
+ interface ActiveExportStream {
17
+ jobId: string;
18
+ destinationType: string;
19
+ containerId: string;
20
+ containerName?: string;
21
+ progressToken: string;
22
+ streamId: string;
23
+ startTime: number;
24
+ lastProgress: number;
25
+ status: 'active' | 'completed' | 'failed' | 'cancelled' | 'error';
26
+ }
27
+ export declare class ExportService {
28
+ private httpClient;
29
+ private mcpServer;
30
+ private activeStreams;
31
+ private progressUpdates;
32
+ private streamAnalytics;
33
+ constructor();
34
+ /**
35
+ * Set MCP server reference for progress notifications
36
+ */
37
+ setMCPServer(server: any): void;
38
+ /**
39
+ * Get stream analytics and monitoring information
40
+ */
41
+ getStreamAnalytics(): StreamAnalytics & {
42
+ activeStreams: ActiveExportStream[];
43
+ };
44
+ /**
45
+ * Get progress update for a specific token
46
+ */
47
+ getProgressUpdate(progressToken: string): any | null;
48
+ /**
49
+ * Cancel export monitoring for a specific token
50
+ */
51
+ cancelExportMonitoring(progressToken: string, reason?: string): Promise<boolean>;
52
+ /**
53
+ * Start a container export with real-time streaming progress
54
+ */
55
+ exportContainer(params: ExportContainerParams, progressToken?: string): Promise<ExportJobStatus>;
56
+ /**
57
+ * Set up real-time streaming monitoring for export progress
58
+ */
59
+ private setupStreamingMonitoring;
60
+ /**
61
+ * Start fallback polling mechanism when streaming fails
62
+ */
63
+ private startFallbackProgressPolling;
64
+ /**
65
+ * Get completion message based on export result
66
+ */
67
+ private getCompletionMessage;
68
+ /**
69
+ * Handle real-time export stream events
70
+ */
71
+ private handleExportStreamEvent;
72
+ /**
73
+ * Convert stream event to progress update format
74
+ */
75
+ private convertStreamEventToProgress;
76
+ /**
77
+ * Store progress update with expiration
78
+ */
79
+ private storeProgressUpdate;
80
+ /**
81
+ * Complete stream monitoring and update analytics
82
+ */
83
+ private completeStream;
84
+ /**
85
+ * Get export job status
86
+ */
87
+ getExportStatus(jobId: string): Promise<ExportJobStatus>;
88
+ /**
89
+ * List export jobs
90
+ */
91
+ listExportJobs(params?: ListExportJobsParams): Promise<ExportJobListResponse>;
92
+ /**
93
+ * Get download URL for archive exports
94
+ */
95
+ getExportDownloadUrl(jobId: string): Promise<{
96
+ downloadUrl: string;
97
+ expiresAt: string;
98
+ format: string;
99
+ size: number;
100
+ }>;
101
+ /**
102
+ * Cancel an export job
103
+ */
104
+ cancelExportJob(jobId: string): Promise<ExportJobStatus>;
105
+ }
106
+ export declare const exportService: ExportService;
107
+ export {};
108
+ //# sourceMappingURL=exportService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportService.d.ts","sourceRoot":"","sources":["../../src/services/exportService.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAarB;;;GAGG;AAGH,UAAU,eAAe;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAGD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,e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