-
Notifications
You must be signed in to change notification settings - Fork 490
Multi cli integration #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bdaf811
f6bd4d8
493d3f1
370dbbf
b78a144
631a0d1
68d58d6
c011037
f2955d4
500f262
b9cef6d
464b159
2d1df93
e0e9baf
3514998
9840d58
69a4a44
3fd50c8
a56d3da
aaa4d58
837cb56
64cf974
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ import { createModelsRoutes } from './routes/models/index.js'; | |
| import { createRunningAgentsRoutes } from './routes/running-agents/index.js'; | ||
| import { createWorkspaceRoutes } from './routes/workspace/index.js'; | ||
| import { createTemplatesRoutes } from './routes/templates/index.js'; | ||
| import { createBacklogPlanRoutes } from './routes/backlog-plan/index.js'; | ||
| import { | ||
| createTerminalRoutes, | ||
| validateTerminalToken, | ||
|
|
@@ -52,7 +53,6 @@ import { createClaudeRoutes } from './routes/claude/index.js'; | |
| import { ClaudeUsageService } from './services/claude-usage-service.js'; | ||
| import { createGitHubRoutes } from './routes/github/index.js'; | ||
| import { createContextRoutes } from './routes/context/index.js'; | ||
| import { createBacklogPlanRoutes } from './routes/backlog-plan/index.js'; | ||
| import { cleanupStaleValidations } from './routes/github/routes/validation-common.js'; | ||
| import { createMCPRoutes } from './routes/mcp/index.js'; | ||
| import { MCPTestService } from './services/mcp-test-service.js'; | ||
|
|
@@ -155,7 +155,6 @@ app.use(cookieParser()); | |
| const events: EventEmitter = createEventEmitter(); | ||
|
|
||
| // Create services | ||
| // Note: settingsService is created first so it can be injected into other services | ||
| const settingsService = new SettingsService(DATA_DIR); | ||
| const agentService = new AgentService(DATA_DIR, events, settingsService); | ||
| const featureLoader = new FeatureLoader(); | ||
|
|
@@ -165,13 +164,18 @@ const mcpTestService = new MCPTestService(settingsService); | |
|
|
||
| // Initialize services | ||
| (async () => { | ||
| await agentService.initialize(); | ||
| console.log('[Server] Agent service initialized'); | ||
| try { | ||
| await agentService.initialize(); | ||
| console.log('[Server] Agent service initialized'); | ||
| } catch (error) { | ||
| console.error('[Server] Agent service initialization failed:', error); | ||
| process.exit(1); | ||
| } | ||
| })(); | ||
|
|
||
| // Run stale validation cleanup every hour to prevent memory leaks from crashed validations | ||
| const VALIDATION_CLEANUP_INTERVAL_MS = 60 * 60 * 1000; // 1 hour | ||
| setInterval(() => { | ||
| const validationCleanupInterval = setInterval(() => { | ||
| const cleaned = cleanupStaleValidations(); | ||
| if (cleaned > 0) { | ||
| console.log(`[Server] Cleaned up ${cleaned} stale validation entries`); | ||
|
|
@@ -196,6 +200,7 @@ app.use('/api/fs', createFsRoutes(events)); | |
| app.use('/api/agent', createAgentRoutes(agentService, events)); | ||
| app.use('/api/sessions', createSessionsRoutes(agentService)); | ||
| app.use('/api/features', createFeaturesRoutes(featureLoader)); | ||
| app.use('/api/backlog-plan', createBacklogPlanRoutes(events, settingsService)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate route mounting detected. The 🔎 Proposed fixRemove one of the duplicate mounts. Keep only line 154 since it appears earlier in the logical grouping: app.use('/api/context', createContextRoutes(settingsService));
-app.use('/api/backlog-plan', createBacklogPlanRoutes(events, settingsService));
app.use('/api/pipeline', createPipelineRoutes(pipelineService));
🤖 Prompt for AI Agents |
||
| app.use('/api/auto-mode', createAutoModeRoutes(autoModeService)); | ||
| app.use('/api/enhance-prompt', createEnhancePromptRoutes(settingsService)); | ||
| app.use('/api/worktree', createWorktreeRoutes()); | ||
|
|
@@ -583,6 +588,7 @@ startServer(PORT); | |
| // Graceful shutdown | ||
| process.on('SIGTERM', () => { | ||
| console.log('SIGTERM received, shutting down...'); | ||
| clearInterval(validationCleanupInterval); | ||
| terminalService.cleanup(); | ||
| server.close(() => { | ||
| console.log('Server closed'); | ||
|
|
@@ -592,6 +598,7 @@ process.on('SIGTERM', () => { | |
|
|
||
| process.on('SIGINT', () => { | ||
| console.log('SIGINT received, shutting down...'); | ||
| clearInterval(validationCleanupInterval); | ||
| terminalService.cleanup(); | ||
| server.close(() => { | ||
| console.log('Server closed'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent dependency versioning for internal monorepo package.
All other
@automaker/*dependencies use exact version pins ("1.0.0"), but@automaker/promptsnow uses a caret range ("^1.0.0"). In a monorepo with internal packages, exact version pins (or workspace protocol) are recommended to:🔎 Proposed fix to align with other internal dependencies
📝 Committable suggestion
🤖 Prompt for AI Agents