codex-linux 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.
- package/.claude/settings.local.json +10 -0
- package/.eslintrc.json +27 -0
- package/.github/workflows/ci.yml +156 -0
- package/.huskyrc +7 -0
- package/.lintstagedrc +13 -0
- package/.prettierrc +12 -0
- package/CLAUDE.md +163 -0
- package/DESIGN_SUPERIOR.md +73 -0
- package/Dockerfile +64 -0
- package/INSTALLATION.md +152 -0
- package/LICENSE +21 -0
- package/README.md +245 -0
- package/assets/skills/code-review/instructions.md +102 -0
- package/assets/skills/code-review/skill.yaml +15 -0
- package/assets/skills/refactoring/instructions.md +149 -0
- package/assets/skills/refactoring/skill.yaml +15 -0
- package/assets/skills/testing/skill.yaml +15 -0
- package/commitlint.config.js +23 -0
- package/dist/main/DatabaseManager.js +763 -0
- package/dist/main/DatabaseManager.js.map +1 -0
- package/dist/main/SettingsManager.js +61 -0
- package/dist/main/SettingsManager.js.map +1 -0
- package/dist/main/agents/AgentOrchestrator.js +787 -0
- package/dist/main/agents/AgentOrchestrator.js.map +1 -0
- package/dist/main/agents/AgentSDK.js +219 -0
- package/dist/main/agents/AgentSDK.js.map +1 -0
- package/dist/main/agents/AgentTools.js +348 -0
- package/dist/main/agents/AgentTools.js.map +1 -0
- package/dist/main/agents/CodeIndex.js +233 -0
- package/dist/main/agents/CodeIndex.js.map +1 -0
- package/dist/main/agents/EmbeddingService.js +80 -0
- package/dist/main/agents/EmbeddingService.js.map +1 -0
- package/dist/main/agents/NativeToolCalling.js +206 -0
- package/dist/main/agents/NativeToolCalling.js.map +1 -0
- package/dist/main/api/APIServer.js +278 -0
- package/dist/main/api/APIServer.js.map +1 -0
- package/dist/main/api/RateLimiter.js +138 -0
- package/dist/main/api/RateLimiter.js.map +1 -0
- package/dist/main/api/WebSocketManager.js +300 -0
- package/dist/main/api/WebSocketManager.js.map +1 -0
- package/dist/main/assistant/ContextOptimizer.js +192 -0
- package/dist/main/assistant/ContextOptimizer.js.map +1 -0
- package/dist/main/assistant/PredictedOutputManager.js +172 -0
- package/dist/main/assistant/PredictedOutputManager.js.map +1 -0
- package/dist/main/assistant/PromptCacheManager.js +193 -0
- package/dist/main/assistant/PromptCacheManager.js.map +1 -0
- package/dist/main/assistant/PromptOptimizer.js +626 -0
- package/dist/main/assistant/PromptOptimizer.js.map +1 -0
- package/dist/main/assistant/SmartCodeAssistant.js +224 -0
- package/dist/main/assistant/SmartCodeAssistant.js.map +1 -0
- package/dist/main/auth/SessionManager.js +300 -0
- package/dist/main/auth/SessionManager.js.map +1 -0
- package/dist/main/automations/AdvancedWebhookSystem.js +212 -0
- package/dist/main/automations/AdvancedWebhookSystem.js.map +1 -0
- package/dist/main/automations/AutomationScheduler.js +269 -0
- package/dist/main/automations/AutomationScheduler.js.map +1 -0
- package/dist/main/automations/BatchProcessingSystem.js +159 -0
- package/dist/main/automations/BatchProcessingSystem.js.map +1 -0
- package/dist/main/automations/BrowserAutomationManager.js +195 -0
- package/dist/main/automations/BrowserAutomationManager.js.map +1 -0
- package/dist/main/automations/GitHubActionsManager.js +129 -0
- package/dist/main/automations/GitHubActionsManager.js.map +1 -0
- package/dist/main/automations/GitLabCIManager.js +122 -0
- package/dist/main/automations/GitLabCIManager.js.map +1 -0
- package/dist/main/automations/PriorityQueueManager.js +240 -0
- package/dist/main/automations/PriorityQueueManager.js.map +1 -0
- package/dist/main/background/BackgroundModeManager.js +117 -0
- package/dist/main/background/BackgroundModeManager.js.map +1 -0
- package/dist/main/backup/BackupManager.js +254 -0
- package/dist/main/backup/BackupManager.js.map +1 -0
- package/dist/main/backup/MigrationManager.js +114 -0
- package/dist/main/backup/MigrationManager.js.map +1 -0
- package/dist/main/commands/SlashCommandManager.js +399 -0
- package/dist/main/commands/SlashCommandManager.js.map +1 -0
- package/dist/main/config/ClaudeMdParser.js +519 -0
- package/dist/main/config/ClaudeMdParser.js.map +1 -0
- package/dist/main/config/CustomizationManager.js +381 -0
- package/dist/main/config/CustomizationManager.js.map +1 -0
- package/dist/main/config/LaunchConfigManager.js +211 -0
- package/dist/main/config/LaunchConfigManager.js.map +1 -0
- package/dist/main/config/SettingsManager.js +166 -0
- package/dist/main/config/SettingsManager.js.map +1 -0
- package/dist/main/connectors/ConnectorManager.js +151 -0
- package/dist/main/connectors/ConnectorManager.js.map +1 -0
- package/dist/main/connectors/DatabaseConnector.js +222 -0
- package/dist/main/connectors/DatabaseConnector.js.map +1 -0
- package/dist/main/cowork/CoworkManager.js +324 -0
- package/dist/main/cowork/CoworkManager.js.map +1 -0
- package/dist/main/evals/AgentEvalFramework.js +538 -0
- package/dist/main/evals/AgentEvalFramework.js.map +1 -0
- package/dist/main/evals/GraderManager.js +285 -0
- package/dist/main/evals/GraderManager.js.map +1 -0
- package/dist/main/git/GitWorktreeManager.js +214 -0
- package/dist/main/git/GitWorktreeManager.js.map +1 -0
- package/dist/main/github/GitHubPRMonitor.js +244 -0
- package/dist/main/github/GitHubPRMonitor.js.map +1 -0
- package/dist/main/ide/ContinueInManager.js +181 -0
- package/dist/main/ide/ContinueInManager.js.map +1 -0
- package/dist/main/ide/IDEIntegration.js +277 -0
- package/dist/main/ide/IDEIntegration.js.map +1 -0
- package/dist/main/integrations/LinearManager.js +252 -0
- package/dist/main/integrations/LinearManager.js.map +1 -0
- package/dist/main/integrations/SlackBotManager.js +247 -0
- package/dist/main/integrations/SlackBotManager.js.map +1 -0
- package/dist/main/lsp/LSPManager.js +394 -0
- package/dist/main/lsp/LSPManager.js.map +1 -0
- package/dist/main/main.js +1087 -0
- package/dist/main/main.js.map +1 -0
- package/dist/main/mcp/MCPConfigurationManager.js +281 -0
- package/dist/main/mcp/MCPConfigurationManager.js.map +1 -0
- package/dist/main/mcp/MCPManager.js +710 -0
- package/dist/main/mcp/MCPManager.js.map +1 -0
- package/dist/main/mcp/MCPRegistry.js +272 -0
- package/dist/main/mcp/MCPRegistry.js.map +1 -0
- package/dist/main/monitoring/ErrorRecoveryManager.js +268 -0
- package/dist/main/monitoring/ErrorRecoveryManager.js.map +1 -0
- package/dist/main/monitoring/ErrorTracker.js +57 -0
- package/dist/main/monitoring/ErrorTracker.js.map +1 -0
- package/dist/main/monitoring/MetricsCollector.js +155 -0
- package/dist/main/monitoring/MetricsCollector.js.map +1 -0
- package/dist/main/monitoring/TraceGradingSystem.js +148 -0
- package/dist/main/monitoring/TraceGradingSystem.js.map +1 -0
- package/dist/main/notifications/NotificationManager.js +67 -0
- package/dist/main/notifications/NotificationManager.js.map +1 -0
- package/dist/main/pair/AIPairProgramming.js +200 -0
- package/dist/main/pair/AIPairProgramming.js.map +1 -0
- package/dist/main/plugins/PluginManager.js +222 -0
- package/dist/main/plugins/PluginManager.js.map +1 -0
- package/dist/main/plugins/PluginMarketplace.js +237 -0
- package/dist/main/plugins/PluginMarketplace.js.map +1 -0
- package/dist/main/preload.js +189 -0
- package/dist/main/preload.js.map +1 -0
- package/dist/main/preview/PreviewSessionManager.js +170 -0
- package/dist/main/preview/PreviewSessionManager.js.map +1 -0
- package/dist/main/providers/AIProviderManager.js +327 -0
- package/dist/main/providers/AIProviderManager.js.map +1 -0
- package/dist/main/providers/FineTuningManager.js +276 -0
- package/dist/main/providers/FineTuningManager.js.map +1 -0
- package/dist/main/providers/FreeModelsProvider.js +1104 -0
- package/dist/main/providers/FreeModelsProvider.js.map +1 -0
- package/dist/main/realtime/RealtimeManager.js +116 -0
- package/dist/main/realtime/RealtimeManager.js.map +1 -0
- package/dist/main/remote/CloudEnvironmentManager.js +232 -0
- package/dist/main/remote/CloudEnvironmentManager.js.map +1 -0
- package/dist/main/remote/RemoteSessionManager.js +255 -0
- package/dist/main/remote/RemoteSessionManager.js.map +1 -0
- package/dist/main/search/DeepResearchManager.js +335 -0
- package/dist/main/search/DeepResearchManager.js.map +1 -0
- package/dist/main/search/WebSearchIntegration.js +147 -0
- package/dist/main/search/WebSearchIntegration.js.map +1 -0
- package/dist/main/security/AdminConsoleManager.js +223 -0
- package/dist/main/security/AdminConsoleManager.js.map +1 -0
- package/dist/main/security/AuditLogger.js +136 -0
- package/dist/main/security/AuditLogger.js.map +1 -0
- package/dist/main/security/PermissionManager.js +144 -0
- package/dist/main/security/PermissionManager.js.map +1 -0
- package/dist/main/security/SSOManager.js +173 -0
- package/dist/main/security/SSOManager.js.map +1 -0
- package/dist/main/security/SecurityManager.js +152 -0
- package/dist/main/security/SecurityManager.js.map +1 -0
- package/dist/main/skills/SkillsManager.js +223 -0
- package/dist/main/skills/SkillsManager.js.map +1 -0
- package/dist/main/ssh/SSHManager.js +65 -0
- package/dist/main/ssh/SSHManager.js.map +1 -0
- package/dist/main/streaming/StreamingManager.js +225 -0
- package/dist/main/streaming/StreamingManager.js.map +1 -0
- package/dist/main/sync/CloudSyncManager.js +422 -0
- package/dist/main/sync/CloudSyncManager.js.map +1 -0
- package/dist/main/types.js +28 -0
- package/dist/main/types.js.map +1 -0
- package/dist/main/verification/AutoVerifyManager.js +235 -0
- package/dist/main/verification/AutoVerifyManager.js.map +1 -0
- package/dist/main/vision/ComputerUseManager.js +376 -0
- package/dist/main/vision/ComputerUseManager.js.map +1 -0
- package/dist/main/vision/ImageVideoGenerationManager.js +401 -0
- package/dist/main/vision/ImageVideoGenerationManager.js.map +1 -0
- package/dist/main/vision/VisionManager.js +172 -0
- package/dist/main/vision/VisionManager.js.map +1 -0
- package/dist/renderer/assets/main-DJlZQBCA.js +304 -0
- package/dist/renderer/assets/main-N33ZXEr8.css +1 -0
- package/dist/renderer/index.html +21 -0
- package/dist/renderer/manifest.json +42 -0
- package/dist/renderer/sw.ts +109 -0
- package/dist/shared/types.js +35 -0
- package/dist/shared/types.js.map +1 -0
- package/docker-compose.yml +65 -0
- package/docs/API.md +307 -0
- package/docs/USER_GUIDE.md +476 -0
- package/examples/plugins/sample-plugin/package.json +41 -0
- package/examples/plugins/sample-plugin/src/index.ts +75 -0
- package/index.html +20 -0
- package/jest.config.js +39 -0
- package/package.json +180 -0
- package/packages/cli/package.json +29 -0
- package/packages/cli/src/commands/agents.ts +199 -0
- package/packages/cli/src/commands/tasks.ts +61 -0
- package/packages/cli/src/index.ts +91 -0
- package/packages/cli/src/utils/api.ts +45 -0
- package/packages/cli/src/utils/config.ts +61 -0
- package/packages/npm-installer/bin/codex-linux +126 -0
- package/packages/npm-installer/lib/download.js +273 -0
- package/packages/npm-installer/package.json +42 -0
- package/packages/vscode-extension/package.json +167 -0
- package/packages/vscode-extension/src/api.ts +68 -0
- package/packages/vscode-extension/src/extension.ts +161 -0
- package/packages/vscode-extension/src/panels/chatPanel.ts +265 -0
- package/packages/vscode-extension/src/panels/createAgentPanel.ts +227 -0
- package/packages/vscode-extension/src/providers/agentsProvider.ts +80 -0
- package/postcss.config.js +6 -0
- package/public/manifest.json +42 -0
- package/public/sw.ts +109 -0
- package/scripts/install-dev.sh +103 -0
- package/scripts/install.sh +275 -0
- package/src/main/DatabaseManager.ts +950 -0
- package/src/main/SettingsManager.ts +63 -0
- package/src/main/agents/AgentOrchestrator.ts +930 -0
- package/src/main/agents/AgentSDK.ts +269 -0
- package/src/main/agents/AgentTools.ts +380 -0
- package/src/main/agents/CodeIndex.ts +240 -0
- package/src/main/agents/EmbeddingService.ts +88 -0
- package/src/main/agents/NativeToolCalling.ts +245 -0
- package/src/main/api/APIServer.ts +316 -0
- package/src/main/api/RateLimiter.ts +165 -0
- package/src/main/api/WebSocketManager.ts +398 -0
- package/src/main/assistant/ContextOptimizer.ts +214 -0
- package/src/main/assistant/PredictedOutputManager.ts +265 -0
- package/src/main/assistant/PromptCacheManager.ts +280 -0
- package/src/main/assistant/PromptOptimizer.ts +746 -0
- package/src/main/assistant/SmartCodeAssistant.ts +234 -0
- package/src/main/auth/SessionManager.ts +415 -0
- package/src/main/automations/AdvancedWebhookSystem.ts +281 -0
- package/src/main/automations/AutomationScheduler.ts +272 -0
- package/src/main/automations/BatchProcessingSystem.ts +207 -0
- package/src/main/automations/BrowserAutomationManager.ts +203 -0
- package/src/main/automations/GitHubActionsManager.ts +151 -0
- package/src/main/automations/GitLabCIManager.ts +206 -0
- package/src/main/automations/PriorityQueueManager.ts +328 -0
- package/src/main/background/BackgroundModeManager.ts +130 -0
- package/src/main/backup/BackupManager.ts +287 -0
- package/src/main/backup/MigrationManager.ts +132 -0
- package/src/main/commands/SlashCommandManager.ts +407 -0
- package/src/main/config/ClaudeMdParser.ts +539 -0
- package/src/main/config/CustomizationManager.ts +493 -0
- package/src/main/config/LaunchConfigManager.ts +212 -0
- package/src/main/config/SettingsManager.ts +163 -0
- package/src/main/connectors/ConnectorManager.ts +175 -0
- package/src/main/connectors/DatabaseConnector.ts +212 -0
- package/src/main/cowork/CoworkManager.ts +431 -0
- package/src/main/evals/AgentEvalFramework.ts +665 -0
- package/src/main/evals/GraderManager.ts +417 -0
- package/src/main/git/GitWorktreeManager.ts +211 -0
- package/src/main/github/GitHubPRMonitor.ts +317 -0
- package/src/main/ide/ContinueInManager.ts +180 -0
- package/src/main/ide/IDEIntegration.ts +288 -0
- package/src/main/integrations/LinearManager.ts +327 -0
- package/src/main/integrations/SlackBotManager.ts +312 -0
- package/src/main/lsp/LSPManager.ts +445 -0
- package/src/main/main.ts +1221 -0
- package/src/main/mcp/MCPConfigurationManager.ts +281 -0
- package/src/main/mcp/MCPManager.ts +799 -0
- package/src/main/mcp/MCPRegistry.ts +273 -0
- package/src/main/monitoring/ErrorRecoveryManager.ts +359 -0
- package/src/main/monitoring/ErrorTracker.ts +60 -0
- package/src/main/monitoring/MetricsCollector.ts +196 -0
- package/src/main/monitoring/TraceGradingSystem.ts +196 -0
- package/src/main/notifications/NotificationManager.ts +96 -0
- package/src/main/pair/AIPairProgramming.ts +290 -0
- package/src/main/plugins/PluginManager.ts +266 -0
- package/src/main/plugins/PluginMarketplace.ts +318 -0
- package/src/main/preload.ts +215 -0
- package/src/main/preview/PreviewSessionManager.ts +186 -0
- package/src/main/providers/AIProviderManager.ts +394 -0
- package/src/main/providers/FineTuningManager.ts +390 -0
- package/src/main/providers/FreeModelsProvider.ts +1156 -0
- package/src/main/realtime/RealtimeManager.ts +147 -0
- package/src/main/remote/CloudEnvironmentManager.ts +253 -0
- package/src/main/remote/RemoteSessionManager.ts +323 -0
- package/src/main/search/DeepResearchManager.ts +458 -0
- package/src/main/search/WebSearchIntegration.ts +203 -0
- package/src/main/security/AdminConsoleManager.ts +244 -0
- package/src/main/security/AuditLogger.ts +143 -0
- package/src/main/security/PermissionManager.ts +184 -0
- package/src/main/security/SSOManager.ts +241 -0
- package/src/main/security/SecurityManager.ts +139 -0
- package/src/main/skills/SkillsManager.ts +218 -0
- package/src/main/ssh/SSHManager.ts +86 -0
- package/src/main/streaming/StreamingManager.ts +306 -0
- package/src/main/sync/CloudSyncManager.ts +532 -0
- package/src/main/verification/AutoVerifyManager.ts +285 -0
- package/src/main/vision/ComputerUseManager.ts +475 -0
- package/src/main/vision/ImageVideoGenerationManager.ts +526 -0
- package/src/main/vision/VisionManager.ts +186 -0
- package/src/renderer/App.tsx +314 -0
- package/src/renderer/components/AdvancedSettingsPanel.tsx +225 -0
- package/src/renderer/components/AgentPanel.tsx +760 -0
- package/src/renderer/components/AppPreview.tsx +220 -0
- package/src/renderer/components/AuditTrailPanel.tsx +148 -0
- package/src/renderer/components/AutomationPanel.tsx +220 -0
- package/src/renderer/components/ChatInterface.tsx +595 -0
- package/src/renderer/components/ChatTab.tsx +296 -0
- package/src/renderer/components/CodeEditor.tsx +257 -0
- package/src/renderer/components/CodeReviewPanel.tsx +256 -0
- package/src/renderer/components/CodeWorkspace.tsx +192 -0
- package/src/renderer/components/CodebaseDashboard.tsx +295 -0
- package/src/renderer/components/ComputerUsePanel.tsx +262 -0
- package/src/renderer/components/ConnectorsPanel.tsx +471 -0
- package/src/renderer/components/ContextMenu.tsx +155 -0
- package/src/renderer/components/ContextUsageDisplay.tsx +248 -0
- package/src/renderer/components/CoworkPanel.tsx +415 -0
- package/src/renderer/components/DiffViewer.tsx +452 -0
- package/src/renderer/components/ErrorBoundary.tsx +273 -0
- package/src/renderer/components/ExtendedThinkingToggle.tsx +244 -0
- package/src/renderer/components/FileAttachments.tsx +247 -0
- package/src/renderer/components/FileExplorer.tsx +242 -0
- package/src/renderer/components/FileExplorerPanel.tsx +302 -0
- package/src/renderer/components/GitPanel.tsx +154 -0
- package/src/renderer/components/Header.tsx +113 -0
- package/src/renderer/components/MCPPanel.tsx +326 -0
- package/src/renderer/components/MentionAutocomplete.tsx +239 -0
- package/src/renderer/components/PermissionPanel.tsx +159 -0
- package/src/renderer/components/PermissionSelector.tsx +203 -0
- package/src/renderer/components/PluginMarketplace.tsx +325 -0
- package/src/renderer/components/PromptOptimizerPanel.tsx +399 -0
- package/src/renderer/components/SearchPanel.tsx +173 -0
- package/src/renderer/components/SearchReplace.tsx +284 -0
- package/src/renderer/components/SessionSidebar.tsx +367 -0
- package/src/renderer/components/SettingsPanel.tsx +426 -0
- package/src/renderer/components/Sidebar.tsx +100 -0
- package/src/renderer/components/SkillsPanel.tsx +245 -0
- package/src/renderer/components/SplitPane.tsx +173 -0
- package/src/renderer/components/Terminal.tsx +190 -0
- package/src/renderer/components/VoiceCommand.tsx +129 -0
- package/src/renderer/components/WorktreePanel.tsx +163 -0
- package/src/renderer/components/ui/AriaComponents.tsx +193 -0
- package/src/renderer/components/ui/Button.tsx +68 -0
- package/src/renderer/components/ui/Card.tsx +102 -0
- package/src/renderer/components/ui/Input.tsx +44 -0
- package/src/renderer/components/ui/Skeleton.tsx +55 -0
- package/src/renderer/components/ui/VirtualList.tsx +196 -0
- package/src/renderer/i18n/I18nProvider.tsx +101 -0
- package/src/renderer/i18n/de.ts +161 -0
- package/src/renderer/i18n/en.ts +163 -0
- package/src/renderer/i18n/es.ts +161 -0
- package/src/renderer/i18n/fr.ts +161 -0
- package/src/renderer/i18n/index.ts +44 -0
- package/src/renderer/index.css +129 -0
- package/src/renderer/lib/accessibility.tsx +287 -0
- package/src/renderer/lib/hooks.ts +304 -0
- package/src/renderer/lib/utils.ts +6 -0
- package/src/renderer/main.tsx +25 -0
- package/src/renderer/styles/minimalist.css +539 -0
- package/src/renderer/sw.ts +180 -0
- package/src/renderer/types.d.ts +138 -0
- package/src/shared/types.ts +813 -0
- package/supabase/schema.sql +234 -0
- package/tailwind.config.js +78 -0
- package/tests/e2e/package.json +15 -0
- package/tests/e2e/playwright.config.ts +31 -0
- package/tests/e2e/specs/app.spec.ts +194 -0
- package/tests/setup.ts +99 -0
- package/tests/unit/AgentOrchestrator.test.ts +274 -0
- package/tests/unit/DatabaseManager.test.ts +262 -0
- package/tests/unit/GitWorktreeManager.test.ts +150 -0
- package/tests/unit/SecurityManager.test.ts +110 -0
- package/tsconfig.main.json +22 -0
- package/tsconfig.renderer.json +27 -0
- package/vite.config.ts +28 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import log from 'electron-log';
|
|
3
|
+
|
|
4
|
+
interface BatchJob {
|
|
5
|
+
id: string;
|
|
6
|
+
type: 'agent' | 'task' | 'eval';
|
|
7
|
+
payload: any;
|
|
8
|
+
priority: number;
|
|
9
|
+
status: 'pending' | 'processing' | 'completed' | 'failed';
|
|
10
|
+
createdAt: number;
|
|
11
|
+
startedAt?: number;
|
|
12
|
+
completedAt?: number;
|
|
13
|
+
result?: any;
|
|
14
|
+
error?: string;
|
|
15
|
+
cost?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface BatchConfig {
|
|
19
|
+
maxConcurrent: number;
|
|
20
|
+
rateLimit: number;
|
|
21
|
+
costBudget?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class BatchProcessingSystem extends EventEmitter {
|
|
25
|
+
private queue: BatchJob[] = [];
|
|
26
|
+
private activeJobs: Map<string, BatchJob> = new Map();
|
|
27
|
+
private completedJobs: BatchJob[] = [];
|
|
28
|
+
private config: BatchConfig;
|
|
29
|
+
private processingInterval: NodeJS.Timeout | null = null;
|
|
30
|
+
private totalCost: number = 0;
|
|
31
|
+
|
|
32
|
+
constructor(config: Partial<BatchConfig> = {}) {
|
|
33
|
+
super();
|
|
34
|
+
this.config = {
|
|
35
|
+
maxConcurrent: config.maxConcurrent || 3,
|
|
36
|
+
rateLimit: config.rateLimit || 10,
|
|
37
|
+
costBudget: config.costBudget
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
start(): void {
|
|
42
|
+
if (this.processingInterval) return;
|
|
43
|
+
|
|
44
|
+
this.processingInterval = setInterval(() => {
|
|
45
|
+
this.processQueue();
|
|
46
|
+
}, 1000);
|
|
47
|
+
|
|
48
|
+
log.info('Batch processing system started');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
stop(): void {
|
|
52
|
+
if (this.processingInterval) {
|
|
53
|
+
clearInterval(this.processingInterval);
|
|
54
|
+
this.processingInterval = null;
|
|
55
|
+
}
|
|
56
|
+
log.info('Batch processing system stopped');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
addJob(type: BatchJob['type'], payload: any, priority: number = 0): string {
|
|
60
|
+
const jobId = `batch-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
61
|
+
|
|
62
|
+
const job: BatchJob = {
|
|
63
|
+
id: jobId,
|
|
64
|
+
type,
|
|
65
|
+
payload,
|
|
66
|
+
priority,
|
|
67
|
+
status: 'pending',
|
|
68
|
+
createdAt: Date.now()
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Insert based on priority
|
|
72
|
+
const insertIndex = this.queue.findIndex(j => j.priority < priority);
|
|
73
|
+
if (insertIndex === -1) {
|
|
74
|
+
this.queue.push(job);
|
|
75
|
+
} else {
|
|
76
|
+
this.queue.splice(insertIndex, 0, job);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
this.emit('job:added', job);
|
|
80
|
+
log.debug(`Batch job added: ${jobId}`);
|
|
81
|
+
|
|
82
|
+
return jobId;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private async processQueue(): Promise<void> {
|
|
86
|
+
if (this.activeJobs.size >= this.config.maxConcurrent) return;
|
|
87
|
+
if (this.queue.length === 0) return;
|
|
88
|
+
|
|
89
|
+
// Check cost budget
|
|
90
|
+
if (this.config.costBudget && this.totalCost >= this.config.costBudget) {
|
|
91
|
+
log.warn('Batch processing: Cost budget exceeded');
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const job = this.queue.shift();
|
|
96
|
+
if (!job) return;
|
|
97
|
+
|
|
98
|
+
job.status = 'processing';
|
|
99
|
+
job.startedAt = Date.now();
|
|
100
|
+
this.activeJobs.set(job.id, job);
|
|
101
|
+
|
|
102
|
+
this.emit('job:started', job);
|
|
103
|
+
|
|
104
|
+
try {
|
|
105
|
+
// Process job based on type
|
|
106
|
+
const result = await this.executeJob(job);
|
|
107
|
+
|
|
108
|
+
job.status = 'completed';
|
|
109
|
+
job.completedAt = Date.now();
|
|
110
|
+
job.result = result;
|
|
111
|
+
|
|
112
|
+
if (result.cost) {
|
|
113
|
+
job.cost = result.cost;
|
|
114
|
+
this.totalCost += result.cost;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
this.completedJobs.push(job);
|
|
118
|
+
this.emit('job:completed', job);
|
|
119
|
+
|
|
120
|
+
log.debug(`Batch job completed: ${job.id}`);
|
|
121
|
+
} catch (error) {
|
|
122
|
+
job.status = 'failed';
|
|
123
|
+
job.completedAt = Date.now();
|
|
124
|
+
job.error = error instanceof Error ? error.message : String(error);
|
|
125
|
+
|
|
126
|
+
this.completedJobs.push(job);
|
|
127
|
+
this.emit('job:failed', job);
|
|
128
|
+
|
|
129
|
+
log.error(`Batch job failed: ${job.id}`, error);
|
|
130
|
+
} finally {
|
|
131
|
+
this.activeJobs.delete(job.id);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private async executeJob(job: BatchJob): Promise<any> {
|
|
136
|
+
// Simulate job execution - in real implementation, this would call actual services
|
|
137
|
+
await this.delay(1000);
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
success: true,
|
|
141
|
+
jobId: job.id,
|
|
142
|
+
cost: Math.random() * 0.01 // Simulated cost
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
private delay(ms: number): Promise<void> {
|
|
147
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
getQueueStatus(): {
|
|
151
|
+
pending: number;
|
|
152
|
+
active: number;
|
|
153
|
+
completed: number;
|
|
154
|
+
failed: number;
|
|
155
|
+
totalCost: number;
|
|
156
|
+
} {
|
|
157
|
+
return {
|
|
158
|
+
pending: this.queue.length,
|
|
159
|
+
active: this.activeJobs.size,
|
|
160
|
+
completed: this.completedJobs.filter(j => j.status === 'completed').length,
|
|
161
|
+
failed: this.completedJobs.filter(j => j.status === 'failed').length,
|
|
162
|
+
totalCost: this.totalCost
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
getJob(jobId: string): BatchJob | undefined {
|
|
167
|
+
return this.activeJobs.get(jobId) ||
|
|
168
|
+
this.queue.find(j => j.id === jobId) ||
|
|
169
|
+
this.completedJobs.find(j => j.id === jobId);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
cancelJob(jobId: string): boolean {
|
|
173
|
+
const queueIndex = this.queue.findIndex(j => j.id === jobId);
|
|
174
|
+
if (queueIndex !== -1) {
|
|
175
|
+
this.queue.splice(queueIndex, 1);
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
estimateCost(jobsCount: number): {
|
|
182
|
+
min: number;
|
|
183
|
+
max: number;
|
|
184
|
+
average: number;
|
|
185
|
+
} {
|
|
186
|
+
// Simple cost estimation based on historical data
|
|
187
|
+
const avgCostPerJob = this.completedJobs.length > 0
|
|
188
|
+
? this.completedJobs.reduce((sum, j) => sum + (j.cost || 0), 0) / this.completedJobs.length
|
|
189
|
+
: 0.01; // Default estimate
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
min: jobsCount * avgCostPerJob * 0.5,
|
|
193
|
+
max: jobsCount * avgCostPerJob * 2,
|
|
194
|
+
average: jobsCount * avgCostPerJob
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
cleanup(): void {
|
|
199
|
+
this.stop();
|
|
200
|
+
this.queue = [];
|
|
201
|
+
this.activeJobs.clear();
|
|
202
|
+
this.completedJobs = [];
|
|
203
|
+
this.removeAllListeners();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export default BatchProcessingSystem;
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import log from 'electron-log';
|
|
3
|
+
|
|
4
|
+
export interface BrowserAutomationConfig {
|
|
5
|
+
headless?: boolean;
|
|
6
|
+
slowMo?: number;
|
|
7
|
+
viewport?: { width: number; height: number };
|
|
8
|
+
timeout?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BrowserAction {
|
|
12
|
+
type: 'goto' | 'click' | 'type' | 'screenshot' | 'evaluate' | 'wait' | 'select' | 'hover' | 'scroll';
|
|
13
|
+
selector?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
options?: Record<string, any>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface BrowserSession {
|
|
19
|
+
id: string;
|
|
20
|
+
url: string;
|
|
21
|
+
title: string;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class BrowserAutomationManager extends EventEmitter {
|
|
26
|
+
private config: BrowserAutomationConfig;
|
|
27
|
+
private sessions: Map<string, any> = new Map();
|
|
28
|
+
private browser: any = null;
|
|
29
|
+
|
|
30
|
+
constructor() {
|
|
31
|
+
super();
|
|
32
|
+
this.config = {
|
|
33
|
+
headless: false,
|
|
34
|
+
slowMo: 0,
|
|
35
|
+
viewport: { width: 1280, height: 720 },
|
|
36
|
+
timeout: 30000,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async configure(config: Partial<BrowserAutomationConfig>): Promise<void> {
|
|
41
|
+
this.config = { ...this.config, ...config };
|
|
42
|
+
log.info('Browser automation configured', this.config);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async launch(): Promise<void> {
|
|
46
|
+
try {
|
|
47
|
+
const { chromium } = await import('playwright');
|
|
48
|
+
this.browser = await chromium.launch({
|
|
49
|
+
headless: this.config.headless,
|
|
50
|
+
slowMo: this.config.slowMo,
|
|
51
|
+
});
|
|
52
|
+
log.info('Browser launched');
|
|
53
|
+
this.emit('browser:launched');
|
|
54
|
+
} catch (error) {
|
|
55
|
+
log.error('Failed to launch browser:', error);
|
|
56
|
+
throw error;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async createSession(sessionId: string): Promise<BrowserSession> {
|
|
61
|
+
if (!this.browser) {
|
|
62
|
+
await this.launch();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const context = await this.browser.newContext({
|
|
66
|
+
viewport: this.config.viewport,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const page = await context.newPage();
|
|
70
|
+
|
|
71
|
+
this.sessions.set(sessionId, { page, context, browser: 'chromium' });
|
|
72
|
+
|
|
73
|
+
const session: BrowserSession = {
|
|
74
|
+
id: sessionId,
|
|
75
|
+
url: '',
|
|
76
|
+
title: '',
|
|
77
|
+
createdAt: new Date(),
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
this.emit('session:created', session);
|
|
81
|
+
return session;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
async executeActions(sessionId: string, actions: BrowserAction[]): Promise<any[]> {
|
|
85
|
+
const session = this.sessions.get(sessionId);
|
|
86
|
+
if (!session) throw new Error(`Session ${sessionId} not found`);
|
|
87
|
+
|
|
88
|
+
const { page } = session;
|
|
89
|
+
const results: any[] = [];
|
|
90
|
+
|
|
91
|
+
for (const action of actions) {
|
|
92
|
+
try {
|
|
93
|
+
const result = await this.executeAction(page, action);
|
|
94
|
+
results.push({ action, result, success: true });
|
|
95
|
+
} catch (error: any) {
|
|
96
|
+
results.push({ action, error: error.message, success: false });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return results;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private async executeAction(page: any, action: BrowserAction): Promise<any> {
|
|
104
|
+
switch (action.type) {
|
|
105
|
+
case 'goto':
|
|
106
|
+
await page.goto(action.value!, { timeout: this.config.timeout });
|
|
107
|
+
return { url: page.url(), title: await page.title() };
|
|
108
|
+
|
|
109
|
+
case 'click':
|
|
110
|
+
await page.click(action.selector!, action.options);
|
|
111
|
+
return { clicked: true };
|
|
112
|
+
|
|
113
|
+
case 'type':
|
|
114
|
+
await page.fill(action.selector!, action.value!);
|
|
115
|
+
return { typed: action.value };
|
|
116
|
+
|
|
117
|
+
case 'screenshot':
|
|
118
|
+
return await page.screenshot({ fullPage: action.options?.fullPage });
|
|
119
|
+
|
|
120
|
+
case 'evaluate':
|
|
121
|
+
return await page.evaluate(action.value!);
|
|
122
|
+
|
|
123
|
+
case 'wait':
|
|
124
|
+
if (action.selector) {
|
|
125
|
+
await page.waitForSelector(action.selector, { timeout: this.config.timeout });
|
|
126
|
+
} else {
|
|
127
|
+
await page.waitForTimeout(parseInt(action.value!) || 1000);
|
|
128
|
+
}
|
|
129
|
+
return { waited: true };
|
|
130
|
+
|
|
131
|
+
case 'select':
|
|
132
|
+
await page.selectOption(action.selector!, action.value!);
|
|
133
|
+
return { selected: action.value };
|
|
134
|
+
|
|
135
|
+
case 'hover':
|
|
136
|
+
await page.hover(action.selector!);
|
|
137
|
+
return { hovered: true };
|
|
138
|
+
|
|
139
|
+
case 'scroll':
|
|
140
|
+
await page.evaluate(() => {
|
|
141
|
+
/*
|
|
142
|
+
* This code runs in browser context via Playwright
|
|
143
|
+
* TypeScript doesn't know about browser globals here
|
|
144
|
+
*/
|
|
145
|
+
(window as unknown as { scrollTo: (x: number, y: number) => void })
|
|
146
|
+
.scrollTo(0, (document as unknown as { body: { scrollHeight: number } }).body.scrollHeight);
|
|
147
|
+
});
|
|
148
|
+
return { scrolled: true };
|
|
149
|
+
|
|
150
|
+
default:
|
|
151
|
+
throw new Error(`Unknown action: ${action.type}`);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async getPageContent(sessionId: string): Promise<string> {
|
|
156
|
+
const session = this.sessions.get(sessionId);
|
|
157
|
+
if (!session) throw new Error(`Session ${sessionId} not found`);
|
|
158
|
+
return session.page.content();
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
async takeScreenshot(sessionId: string, fullPage: boolean = false): Promise<Buffer> {
|
|
162
|
+
const session = this.sessions.get(sessionId);
|
|
163
|
+
if (!session) throw new Error(`Session ${sessionId} not found`);
|
|
164
|
+
return session.page.screenshot({ fullPage });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async closeSession(sessionId: string): Promise<void> {
|
|
168
|
+
const session = this.sessions.get(sessionId);
|
|
169
|
+
if (!session) return;
|
|
170
|
+
|
|
171
|
+
await session.context.close();
|
|
172
|
+
this.sessions.delete(sessionId);
|
|
173
|
+
this.emit('session:closed', sessionId);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async closeAll(): Promise<void> {
|
|
177
|
+
for (const sessionId of this.sessions.keys()) {
|
|
178
|
+
await this.closeSession(sessionId);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (this.browser) {
|
|
182
|
+
await this.browser.close();
|
|
183
|
+
this.browser = null;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
this.emit('browser:closed');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
getActiveSessions(): string[] {
|
|
190
|
+
return Array.from(this.sessions.keys());
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
getConfig(): BrowserAutomationConfig {
|
|
194
|
+
return { ...this.config };
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
cleanup(): void {
|
|
198
|
+
this.closeAll();
|
|
199
|
+
this.removeAllListeners();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export default BrowserAutomationManager;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import log from 'electron-log';
|
|
3
|
+
import fetch from 'node-fetch';
|
|
4
|
+
import { CICDConfig, WorkflowRun, CIAction } from '../../shared/types';
|
|
5
|
+
|
|
6
|
+
export class GitHubActionsManager extends EventEmitter {
|
|
7
|
+
private config: CICDConfig;
|
|
8
|
+
private token: string | null = null;
|
|
9
|
+
private owner: string | null = null;
|
|
10
|
+
private repo: string | null = null;
|
|
11
|
+
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.config = {
|
|
15
|
+
provider: 'github',
|
|
16
|
+
enabled: false,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async configure(config: Partial<CICDConfig> & { token: string; owner: string; repo: string }): Promise<void> {
|
|
21
|
+
this.config = { ...this.config, ...config };
|
|
22
|
+
this.token = config.token;
|
|
23
|
+
this.owner = config.owner;
|
|
24
|
+
this.repo = config.repo;
|
|
25
|
+
this.config.enabled = true;
|
|
26
|
+
log.info('GitHub Actions configured', { owner: this.owner, repo: this.repo });
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async runWorkflow(workflowId: string, ref: string = 'main', inputs?: Record<string, string>): Promise<WorkflowRun> {
|
|
30
|
+
if (!this.token || !this.owner || !this.repo) {
|
|
31
|
+
throw new Error('GitHub Actions not configured');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const response = await fetch(
|
|
35
|
+
`https://api.github.com/repos/${this.owner}/${this.repo}/actions/workflows/${workflowId}/dispatches`,
|
|
36
|
+
{
|
|
37
|
+
method: 'POST',
|
|
38
|
+
headers: {
|
|
39
|
+
'Authorization': `Bearer ${this.token}`,
|
|
40
|
+
'Accept': 'application/vnd.github.v3+json',
|
|
41
|
+
'Content-Type': 'application/json',
|
|
42
|
+
},
|
|
43
|
+
body: JSON.stringify({
|
|
44
|
+
ref,
|
|
45
|
+
inputs: inputs || {},
|
|
46
|
+
}),
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
throw new Error(`Failed to trigger workflow: ${response.statusText}`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const run: WorkflowRun = {
|
|
55
|
+
id: `run_${Date.now()}`,
|
|
56
|
+
workflowId,
|
|
57
|
+
status: 'queued',
|
|
58
|
+
startedAt: new Date(),
|
|
59
|
+
url: `https://github.com/${this.owner}/${this.repo}/actions`,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
this.emit('workflow:started', run);
|
|
63
|
+
return run;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
async getWorkflowRuns(workflowId?: string, status?: string): Promise<WorkflowRun[]> {
|
|
67
|
+
if (!this.token || !this.owner || !this.repo) {
|
|
68
|
+
throw new Error('GitHub Actions not configured');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let url = `https://api.github.com/repos/${this.owner}/${this.repo}/actions/runs`;
|
|
72
|
+
const params = new URLSearchParams();
|
|
73
|
+
if (workflowId) params.append('workflow_id', workflowId);
|
|
74
|
+
if (status) params.append('status', status);
|
|
75
|
+
if (params.toString()) url += `?${params}`;
|
|
76
|
+
|
|
77
|
+
const response = await fetch(url, {
|
|
78
|
+
headers: {
|
|
79
|
+
'Authorization': `Bearer ${this.token}`,
|
|
80
|
+
'Accept': 'application/vnd.github.v3+json',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
if (!response.ok) {
|
|
85
|
+
throw new Error(`Failed to get workflow runs: ${response.statusText}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const data = await response.json() as any;
|
|
89
|
+
return (data.workflow_runs || []).map((run: any) => ({
|
|
90
|
+
id: String(run.id),
|
|
91
|
+
workflowId: String(run.workflow_id),
|
|
92
|
+
status: run.status,
|
|
93
|
+
conclusion: run.conclusion,
|
|
94
|
+
startedAt: new Date(run.created_at),
|
|
95
|
+
completedAt: run.completed_at ? new Date(run.completed_at) : undefined,
|
|
96
|
+
url: run.html_url,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async cancelRun(runId: string): Promise<void> {
|
|
101
|
+
if (!this.token || !this.owner || !this.repo) {
|
|
102
|
+
throw new Error('GitHub Actions not configured');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const response = await fetch(
|
|
106
|
+
`https://api.github.com/repos/${this.owner}/${this.repo}/actions/runs/${runId}/cancel`,
|
|
107
|
+
{
|
|
108
|
+
method: 'POST',
|
|
109
|
+
headers: {
|
|
110
|
+
'Authorization': `Bearer ${this.token}`,
|
|
111
|
+
'Accept': 'application/vnd.github.v3+json',
|
|
112
|
+
},
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
throw new Error(`Failed to cancel run: ${response.statusText}`);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
this.emit('run:cancelled', runId);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async getRunLogs(runId: string): Promise<string> {
|
|
124
|
+
if (!this.token || !this.owner || !this.repo) {
|
|
125
|
+
throw new Error('GitHub Actions not configured');
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const response = await fetch(
|
|
129
|
+
`https://api.github.com/repos/${this.owner}/${this.repo}/actions/runs/${runId}/logs`,
|
|
130
|
+
{
|
|
131
|
+
headers: {
|
|
132
|
+
'Authorization': `Bearer ${this.token}`,
|
|
133
|
+
'Accept': 'application/vnd.github.v3+json',
|
|
134
|
+
},
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
if (!response.ok) {
|
|
139
|
+
throw new Error(`Failed to get logs: ${response.statusText}`);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Returns a redirect URL to download logs
|
|
143
|
+
return response.url;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
getConfig(): CICDConfig {
|
|
147
|
+
return { ...this.config };
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export default GitHubActionsManager;
|