galaxy-code 0.1.6 → 0.1.7
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/dist/cli.bundle.js +588 -0
- package/package.json +6 -6
- package/dist/app.d.ts +0 -7
- package/dist/app.js +0 -597
- package/dist/auto-updater.d.ts +0 -21
- package/dist/auto-updater.js +0 -144
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -159
- package/dist/cli.min.js +0 -589
- package/dist/connections/claude.d.ts +0 -71
- package/dist/connections/claude.js +0 -303
- package/dist/connections/gemini.d.ts +0 -40
- package/dist/connections/gemini.js +0 -232
- package/dist/connections/index.d.ts +0 -11
- package/dist/connections/index.js +0 -11
- package/dist/connections/ollama.d.ts +0 -37
- package/dist/connections/ollama.js +0 -73
- package/dist/connections/types.d.ts +0 -22
- package/dist/connections/types.js +0 -7
- package/dist/env.d.ts +0 -1
- package/dist/env.js +0 -29
- package/dist/prompts/ba-it-analyzer.d.ts +0 -1
- package/dist/prompts/ba-it-analyzer.js +0 -143
- package/dist/prompts/index.d.ts +0 -11
- package/dist/prompts/index.js +0 -11
- package/dist/prompts/orchestrator.d.ts +0 -8
- package/dist/prompts/orchestrator.js +0 -88
- package/dist/prompts/planning-agent.d.ts +0 -8
- package/dist/prompts/planning-agent.js +0 -195
- package/dist/prompts/universal-agent.d.ts +0 -7
- package/dist/prompts/universal-agent.js +0 -111
- package/dist/providers/agent-selector.d.ts +0 -29
- package/dist/providers/agent-selector.js +0 -84
- package/dist/providers/claude-agent.d.ts +0 -29
- package/dist/providers/claude-agent.js +0 -121
- package/dist/providers/gemini-agent.d.ts +0 -36
- package/dist/providers/gemini-agent.js +0 -168
- package/dist/providers/index.d.ts +0 -12
- package/dist/providers/index.js +0 -12
- package/dist/providers/ollama-agent.d.ts +0 -53
- package/dist/providers/ollama-agent.js +0 -276
- package/dist/providers/orchestrator.d.ts +0 -16
- package/dist/providers/orchestrator.js +0 -76
- package/dist/tools/ba-it-analyzer.d.ts +0 -66
- package/dist/tools/ba-it-analyzer.js +0 -90
- package/dist/tools/code-generate-agent.d.ts +0 -51
- package/dist/tools/code-generate-agent.js +0 -159
- package/dist/tools/command-runner.d.ts +0 -14
- package/dist/tools/command-runner.js +0 -120
- package/dist/tools/document-parser.d.ts +0 -11
- package/dist/tools/document-parser.js +0 -83
- package/dist/tools/file-operations.d.ts +0 -17
- package/dist/tools/file-operations.js +0 -127
- package/dist/tools/galaxy-ui-integration.d.ts +0 -94
- package/dist/tools/galaxy-ui-integration.js +0 -244
- package/dist/tools/git-operations.d.ts +0 -11
- package/dist/tools/git-operations.js +0 -114
- package/dist/tools/index.d.ts +0 -10
- package/dist/tools/index.js +0 -10
- package/dist/tools/planning-agent.d.ts +0 -29
- package/dist/tools/planning-agent.js +0 -134
- package/dist/tools/progress-reporter.d.ts +0 -19
- package/dist/tools/progress-reporter.js +0 -52
- package/dist/tools/registry.d.ts +0 -21
- package/dist/tools/registry.js +0 -695
- package/dist/tools/tool-event-emitter.d.ts +0 -24
- package/dist/tools/tool-event-emitter.js +0 -25
- package/dist/tools/types.d.ts +0 -31
- package/dist/tools/types.js +0 -1
- package/dist/types.d.ts +0 -39
- package/dist/types.js +0 -8
- package/dist/update-checker.d.ts +0 -22
- package/dist/update-checker.js +0 -85
- package/dist/utils/config-manager.d.ts +0 -102
- package/dist/utils/config-manager.js +0 -326
- package/dist/utils/devtools.d.ts +0 -21
- package/dist/utils/devtools.js +0 -61
- package/dist/utils/message-formatters.d.ts +0 -32
- package/dist/utils/message-formatters.js +0 -590
- package/dist/utils/progress-tracker.d.ts +0 -59
- package/dist/utils/progress-tracker.js +0 -213
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export interface ProgressStep {
|
|
2
|
-
step: number;
|
|
3
|
-
action: string;
|
|
4
|
-
status: 'pending' | 'in-progress' | 'completed' | 'failed';
|
|
5
|
-
startTime?: Date;
|
|
6
|
-
endTime?: Date;
|
|
7
|
-
error?: string;
|
|
8
|
-
filesCreated?: string[];
|
|
9
|
-
}
|
|
10
|
-
export interface ProjectProgress {
|
|
11
|
-
projectName: string;
|
|
12
|
-
startTime: Date;
|
|
13
|
-
lastUpdated: Date;
|
|
14
|
-
currentStep: number;
|
|
15
|
-
totalSteps: number;
|
|
16
|
-
steps: ProgressStep[];
|
|
17
|
-
}
|
|
18
|
-
export declare class ProgressTracker {
|
|
19
|
-
private progressFilePath;
|
|
20
|
-
private progress;
|
|
21
|
-
constructor(workingDir?: string);
|
|
22
|
-
/**
|
|
23
|
-
* Initialize new progress tracking
|
|
24
|
-
*/
|
|
25
|
-
initializeProgress(projectName: string, steps: ProgressStep[]): void;
|
|
26
|
-
/**
|
|
27
|
-
* Load existing progress
|
|
28
|
-
*/
|
|
29
|
-
loadProgress(): ProjectProgress | null;
|
|
30
|
-
/**
|
|
31
|
-
* Update step status
|
|
32
|
-
*/
|
|
33
|
-
updateStepStatus(stepNum: number, status: ProgressStep['status'], error?: string, filesCreated?: string[]): void;
|
|
34
|
-
/**
|
|
35
|
-
* Generate markdown content
|
|
36
|
-
*/
|
|
37
|
-
private generateMarkdown;
|
|
38
|
-
/**
|
|
39
|
-
* Save progress to markdown file
|
|
40
|
-
*/
|
|
41
|
-
saveProgress(): void;
|
|
42
|
-
/**
|
|
43
|
-
* Get current progress
|
|
44
|
-
*/
|
|
45
|
-
getProgress(): ProjectProgress | null;
|
|
46
|
-
/**
|
|
47
|
-
* Check if progress file exists
|
|
48
|
-
*/
|
|
49
|
-
hasProgress(): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Clear progress (delete file)
|
|
52
|
-
*/
|
|
53
|
-
clearProgress(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Get progress file path
|
|
56
|
-
*/
|
|
57
|
-
getProgressFilePath(): string;
|
|
58
|
-
}
|
|
59
|
-
export declare const progressTracker: ProgressTracker;
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Bùi Trọng Hiếu
|
|
3
|
-
* @email kevinbui210191@gmail.com
|
|
4
|
-
* @create 2024-10-13
|
|
5
|
-
* @modify 2024-10-13
|
|
6
|
-
* @desc Progress tracker for Galaxy CLI
|
|
7
|
-
*/
|
|
8
|
-
import fs from 'node:fs';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
export class ProgressTracker {
|
|
11
|
-
constructor(workingDir = process.cwd()) {
|
|
12
|
-
Object.defineProperty(this, "progressFilePath", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
configurable: true,
|
|
15
|
-
writable: true,
|
|
16
|
-
value: void 0
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(this, "progress", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
configurable: true,
|
|
21
|
-
writable: true,
|
|
22
|
-
value: null
|
|
23
|
-
});
|
|
24
|
-
this.progressFilePath = path.join(workingDir, 'Improgress.md');
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Initialize new progress tracking
|
|
28
|
-
*/
|
|
29
|
-
initializeProgress(projectName, steps) {
|
|
30
|
-
this.progress = {
|
|
31
|
-
projectName,
|
|
32
|
-
startTime: new Date(),
|
|
33
|
-
lastUpdated: new Date(),
|
|
34
|
-
currentStep: 1,
|
|
35
|
-
totalSteps: steps.length,
|
|
36
|
-
steps: steps.map((step, index) => ({
|
|
37
|
-
...step,
|
|
38
|
-
status: index === 0 ? 'in-progress' : 'pending',
|
|
39
|
-
})),
|
|
40
|
-
};
|
|
41
|
-
this.saveProgress();
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Load existing progress
|
|
45
|
-
*/
|
|
46
|
-
loadProgress() {
|
|
47
|
-
try {
|
|
48
|
-
if (!fs.existsSync(this.progressFilePath)) {
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
const content = fs.readFileSync(this.progressFilePath, 'utf-8');
|
|
52
|
-
// Parse markdown to extract progress data
|
|
53
|
-
// For simplicity, we'll store JSON in a comment at the end
|
|
54
|
-
const jsonMatch = content.match(/<!-- PROGRESS_DATA\n([\s\S]*?)\n-->/);
|
|
55
|
-
if (jsonMatch && jsonMatch[1]) {
|
|
56
|
-
this.progress = JSON.parse(jsonMatch[1]);
|
|
57
|
-
return this.progress;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
catch (error) {
|
|
62
|
-
console.warn('⚠️ Failed to load progress:', error instanceof Error ? error.message : String(error));
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Update step status
|
|
68
|
-
*/
|
|
69
|
-
updateStepStatus(stepNum, status, error, filesCreated) {
|
|
70
|
-
if (!this.progress)
|
|
71
|
-
return;
|
|
72
|
-
const stepIndex = this.progress.steps.findIndex(s => s.step === stepNum);
|
|
73
|
-
if (stepIndex === -1)
|
|
74
|
-
return;
|
|
75
|
-
const now = new Date();
|
|
76
|
-
const currentStep = this.progress.steps[stepIndex];
|
|
77
|
-
if (!currentStep)
|
|
78
|
-
return;
|
|
79
|
-
// Update current step
|
|
80
|
-
this.progress.steps[stepIndex] = {
|
|
81
|
-
step: currentStep.step,
|
|
82
|
-
action: currentStep.action,
|
|
83
|
-
status,
|
|
84
|
-
startTime: currentStep.startTime,
|
|
85
|
-
endTime: status === 'completed' || status === 'failed' ? now : undefined,
|
|
86
|
-
error,
|
|
87
|
-
filesCreated,
|
|
88
|
-
};
|
|
89
|
-
// Update progress metadata
|
|
90
|
-
this.progress.lastUpdated = now;
|
|
91
|
-
if (status === 'completed' && stepNum < this.progress.totalSteps) {
|
|
92
|
-
this.progress.currentStep = stepNum + 1;
|
|
93
|
-
// Mark next step as in-progress
|
|
94
|
-
const nextStep = this.progress.steps[stepIndex + 1];
|
|
95
|
-
if (nextStep) {
|
|
96
|
-
nextStep.status = 'in-progress';
|
|
97
|
-
nextStep.startTime = now;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
this.saveProgress();
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Generate markdown content
|
|
104
|
-
*/
|
|
105
|
-
generateMarkdown() {
|
|
106
|
-
if (!this.progress)
|
|
107
|
-
return '';
|
|
108
|
-
const { projectName, startTime, lastUpdated, currentStep, totalSteps, steps } = this.progress;
|
|
109
|
-
let md = `# 🚀 ${projectName} - Implementation Progress\n\n`;
|
|
110
|
-
// Metadata
|
|
111
|
-
md += `**Started**: ${startTime.toLocaleString()}\n`;
|
|
112
|
-
md += `**Last Updated**: ${lastUpdated.toLocaleString()}\n`;
|
|
113
|
-
md += `**Progress**: ${currentStep - 1}/${totalSteps} steps completed\n\n`;
|
|
114
|
-
// Progress bar
|
|
115
|
-
const completed = steps.filter(s => s.status === 'completed').length;
|
|
116
|
-
const percentage = Math.round((completed / totalSteps) * 100);
|
|
117
|
-
const barLength = 30;
|
|
118
|
-
const filled = Math.round((completed / totalSteps) * barLength);
|
|
119
|
-
const bar = '█'.repeat(filled) + '░'.repeat(barLength - filled);
|
|
120
|
-
md += `\`\`\`\n[${bar}] ${percentage}%\n\`\`\`\n\n`;
|
|
121
|
-
// Steps
|
|
122
|
-
md += `## 📋 Implementation Steps\n\n`;
|
|
123
|
-
for (const step of steps) {
|
|
124
|
-
const icon = step.status === 'completed'
|
|
125
|
-
? '✅'
|
|
126
|
-
: step.status === 'in-progress'
|
|
127
|
-
? '🔄'
|
|
128
|
-
: step.status === 'failed'
|
|
129
|
-
? '❌'
|
|
130
|
-
: '⏳';
|
|
131
|
-
md += `### ${icon} Step ${step.step}: ${step.action}\n\n`;
|
|
132
|
-
md += `**Status**: ${step.status.toUpperCase()}\n`;
|
|
133
|
-
if (step.startTime) {
|
|
134
|
-
md += `**Started**: ${step.startTime.toLocaleString()}\n`;
|
|
135
|
-
}
|
|
136
|
-
if (step.endTime) {
|
|
137
|
-
md += `**Completed**: ${step.endTime.toLocaleString()}\n`;
|
|
138
|
-
if (step.startTime) {
|
|
139
|
-
const duration = step.endTime.getTime() - step.startTime.getTime();
|
|
140
|
-
md += `**Duration**: ${Math.round(duration / 1000)}s\n`;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (step.filesCreated && step.filesCreated.length > 0) {
|
|
144
|
-
md += `\n**Files Created**:\n`;
|
|
145
|
-
for (const file of step.filesCreated) {
|
|
146
|
-
md += `- \`${file}\`\n`;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
if (step.error) {
|
|
150
|
-
md += `\n**Error**: \`\`\`\n${step.error}\n\`\`\`\n`;
|
|
151
|
-
}
|
|
152
|
-
md += '\n';
|
|
153
|
-
}
|
|
154
|
-
// Summary
|
|
155
|
-
md += `## 📊 Summary\n\n`;
|
|
156
|
-
md += `- Total Steps: ${totalSteps}\n`;
|
|
157
|
-
md += `- Completed: ${steps.filter(s => s.status === 'completed').length}\n`;
|
|
158
|
-
md += `- In Progress: ${steps.filter(s => s.status === 'in-progress').length}\n`;
|
|
159
|
-
md += `- Pending: ${steps.filter(s => s.status === 'pending').length}\n`;
|
|
160
|
-
md += `- Failed: ${steps.filter(s => s.status === 'failed').length}\n\n`;
|
|
161
|
-
// Add JSON data as HTML comment for parsing
|
|
162
|
-
md += `<!-- PROGRESS_DATA\n${JSON.stringify(this.progress, null, 2)}\n-->\n`;
|
|
163
|
-
return md;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Save progress to markdown file
|
|
167
|
-
*/
|
|
168
|
-
saveProgress() {
|
|
169
|
-
if (!this.progress)
|
|
170
|
-
return;
|
|
171
|
-
try {
|
|
172
|
-
const markdown = this.generateMarkdown();
|
|
173
|
-
fs.writeFileSync(this.progressFilePath, markdown, 'utf-8');
|
|
174
|
-
}
|
|
175
|
-
catch (error) {
|
|
176
|
-
console.error('❌ Failed to save progress:', error instanceof Error ? error.message : String(error));
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Get current progress
|
|
181
|
-
*/
|
|
182
|
-
getProgress() {
|
|
183
|
-
return this.progress;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Check if progress file exists
|
|
187
|
-
*/
|
|
188
|
-
hasProgress() {
|
|
189
|
-
return fs.existsSync(this.progressFilePath);
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Clear progress (delete file)
|
|
193
|
-
*/
|
|
194
|
-
clearProgress() {
|
|
195
|
-
try {
|
|
196
|
-
if (fs.existsSync(this.progressFilePath)) {
|
|
197
|
-
fs.unlinkSync(this.progressFilePath);
|
|
198
|
-
}
|
|
199
|
-
this.progress = null;
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
console.error('❌ Failed to clear progress:', error instanceof Error ? error.message : String(error));
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Get progress file path
|
|
207
|
-
*/
|
|
208
|
-
getProgressFilePath() {
|
|
209
|
-
return this.progressFilePath;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// Create instance
|
|
213
|
-
export const progressTracker = new ProgressTracker();
|