galaxy-code 0.1.3 → 0.1.6
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/README.md +149 -600
- package/dist/app.d.ts +1 -1
- package/dist/app.js +5 -5
- package/dist/cli.js +4 -4
- package/dist/cli.min.js +589 -0
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/claude.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/claude.js +43 -10
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/gemini.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/gemini.js +36 -7
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/ollama.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/ollama.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/types.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/connections → connections}/types.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/ba-it-analyzer.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/ba-it-analyzer.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/orchestrator.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/orchestrator.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/planning-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/planning-agent.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/universal-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/prompts → prompts}/universal-agent.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/agent-selector.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/agent-selector.js +27 -19
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/claude-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/claude-agent.js +46 -32
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/gemini-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/gemini-agent.js +58 -34
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/ollama-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/ollama-agent.js +63 -34
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/orchestrator.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/providers → providers}/orchestrator.js +31 -17
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/ba-it-analyzer.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/ba-it-analyzer.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/code-generate-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/code-generate-agent.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/command-runner.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/command-runner.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/document-parser.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/document-parser.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/file-operations.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/file-operations.js +4 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/galaxy-ui-integration.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/galaxy-ui-integration.js +1 -2
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/git-operations.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/git-operations.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/index.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/index.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/planning-agent.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/planning-agent.js +12 -3
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/progress-reporter.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/progress-reporter.js +8 -2
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/registry.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/registry.js +54 -10
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/tool-event-emitter.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/tool-event-emitter.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/tools → tools}/types.d.ts +0 -1
- package/dist/tools/types.js +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/config-manager.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/config-manager.js +22 -3
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/devtools.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/devtools.js +2 -3
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/message-formatters.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/message-formatters.js +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/progress-tracker.d.ts +0 -1
- package/dist/{node_modules/@workspace/agent-core/utils → utils}/progress-tracker.js +12 -3
- package/package.json +14 -11
- package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/claude.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/gemini.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/ollama.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/connections/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.d.ts +0 -13
- package/dist/node_modules/@workspace/agent-core/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/index.js +0 -22
- package/dist/node_modules/@workspace/agent-core/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/package.json +0 -53
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/command-runner.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/document-parser.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/file-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/git-operations.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/index.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/registry.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/tools/types.js +0 -2
- package/dist/node_modules/@workspace/agent-core/tools/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.d.ts +0 -40
- package/dist/node_modules/@workspace/agent-core/types.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/types.js +0 -9
- package/dist/node_modules/@workspace/agent-core/types.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/config-manager.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/devtools.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts.map +0 -1
- package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js.map +0 -1
|
@@ -9,40 +9,70 @@ import { OllamaConnection } from '../connections/ollama.js';
|
|
|
9
9
|
import { ToolRegistry } from '../tools/index.js';
|
|
10
10
|
import { buildUniversalAgentPrompt } from '../prompts/index.js';
|
|
11
11
|
export class OllamaAgent {
|
|
12
|
-
connection;
|
|
13
|
-
model;
|
|
14
|
-
toolsRegistry = new ToolRegistry();
|
|
15
|
-
conversationHistory = [];
|
|
16
|
-
systemPrompt;
|
|
17
|
-
// Low-level tools for Ollama to build software
|
|
18
|
-
toolNames = [
|
|
19
|
-
'file_read',
|
|
20
|
-
'file_write',
|
|
21
|
-
'file_tree',
|
|
22
|
-
'file_list',
|
|
23
|
-
'file_search',
|
|
24
|
-
'git_status',
|
|
25
|
-
'git_commit',
|
|
26
|
-
'git_push',
|
|
27
|
-
'git_pull',
|
|
28
|
-
'git_diff',
|
|
29
|
-
'git_log',
|
|
30
|
-
'git_branches',
|
|
31
|
-
'command_run',
|
|
32
|
-
'install_dependencies',
|
|
33
|
-
'test_run',
|
|
34
|
-
'plan_task',
|
|
35
|
-
'progress_reporter',
|
|
36
|
-
// Galaxy UI Integration
|
|
37
|
-
'galaxy_ui_list',
|
|
38
|
-
'galaxy_ui_search',
|
|
39
|
-
'galaxy_ui_get_component',
|
|
40
|
-
'galaxy_ui_categories',
|
|
41
|
-
'galaxy_ui_add',
|
|
42
|
-
'galaxy_ui_init',
|
|
43
|
-
'galaxy_ui_docs',
|
|
44
|
-
];
|
|
45
12
|
constructor(config) {
|
|
13
|
+
Object.defineProperty(this, "connection", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "model", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "toolsRegistry", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: new ToolRegistry()
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "conversationHistory", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: []
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(this, "systemPrompt", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: void 0
|
|
42
|
+
});
|
|
43
|
+
// Low-level tools for Ollama to build software
|
|
44
|
+
Object.defineProperty(this, "toolNames", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: [
|
|
49
|
+
'file_read',
|
|
50
|
+
'file_write',
|
|
51
|
+
'file_tree',
|
|
52
|
+
'file_list',
|
|
53
|
+
'file_search',
|
|
54
|
+
'git_status',
|
|
55
|
+
'git_commit',
|
|
56
|
+
'git_push',
|
|
57
|
+
'git_pull',
|
|
58
|
+
'git_diff',
|
|
59
|
+
'git_log',
|
|
60
|
+
'git_branches',
|
|
61
|
+
'command_run',
|
|
62
|
+
'install_dependencies',
|
|
63
|
+
'test_run',
|
|
64
|
+
'plan_task',
|
|
65
|
+
'progress_reporter',
|
|
66
|
+
// Galaxy UI Integration
|
|
67
|
+
'galaxy_ui_list',
|
|
68
|
+
'galaxy_ui_search',
|
|
69
|
+
'galaxy_ui_get_component',
|
|
70
|
+
'galaxy_ui_categories',
|
|
71
|
+
'galaxy_ui_add',
|
|
72
|
+
'galaxy_ui_init',
|
|
73
|
+
'galaxy_ui_docs',
|
|
74
|
+
]
|
|
75
|
+
});
|
|
46
76
|
this.model = config?.model || 'deepseek-v3.1:671b-cloud';
|
|
47
77
|
this.connection = new OllamaConnection(config);
|
|
48
78
|
// Build system prompt using shared universal prompt
|
|
@@ -244,4 +274,3 @@ export const ollamaAgent = {
|
|
|
244
274
|
return _ollamaAgent;
|
|
245
275
|
},
|
|
246
276
|
};
|
|
247
|
-
//# sourceMappingURL=ollama-agent.js.map
|
|
@@ -9,23 +9,38 @@ import { GeminiConnection } from '../connections/gemini.js';
|
|
|
9
9
|
import { ToolRegistry } from '../tools/index.js';
|
|
10
10
|
import { orchestratorSystemPrompt } from '../prompts/orchestrator.js';
|
|
11
11
|
export class OrchestratorAgent {
|
|
12
|
-
toolsRegistry = new ToolRegistry();
|
|
13
|
-
connection = null;
|
|
14
|
-
tools = [
|
|
15
|
-
'ba_it_analyze',
|
|
16
|
-
'code_generate',
|
|
17
|
-
'file_list',
|
|
18
|
-
'file_search',
|
|
19
|
-
'file_tree',
|
|
20
|
-
'command_run',
|
|
21
|
-
'file_read',
|
|
22
|
-
'file_write',
|
|
23
|
-
'plan_task',
|
|
24
|
-
'git_status',
|
|
25
|
-
'git_commit',
|
|
26
|
-
'git_push',
|
|
27
|
-
];
|
|
28
12
|
constructor() {
|
|
13
|
+
Object.defineProperty(this, "toolsRegistry", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: new ToolRegistry()
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "connection", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: null
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "tools", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: [
|
|
30
|
+
'ba_it_analyze',
|
|
31
|
+
'code_generate',
|
|
32
|
+
'file_list',
|
|
33
|
+
'file_search',
|
|
34
|
+
'file_tree',
|
|
35
|
+
'command_run',
|
|
36
|
+
'file_read',
|
|
37
|
+
'file_write',
|
|
38
|
+
'plan_task',
|
|
39
|
+
'git_status',
|
|
40
|
+
'git_commit',
|
|
41
|
+
'git_push',
|
|
42
|
+
]
|
|
43
|
+
});
|
|
29
44
|
// Lazy initialization - only create connection when needed
|
|
30
45
|
}
|
|
31
46
|
getConnection() {
|
|
@@ -59,4 +74,3 @@ export class OrchestratorAgent {
|
|
|
59
74
|
return { content: '(Error occurred)' }; // Fallback in case of error
|
|
60
75
|
}
|
|
61
76
|
}
|
|
62
|
-
//# sourceMappingURL=orchestrator.js.map
|
|
@@ -6,9 +6,19 @@
|
|
|
6
6
|
import { OllamaConnection } from '../connections/ollama.js';
|
|
7
7
|
import { systemBAITAnalyzerPrompt } from '../prompts/ba-it-analyzer.js';
|
|
8
8
|
export class BAITAnalyzer {
|
|
9
|
-
ollama = null;
|
|
10
|
-
model = 'gpt-oss:120b-cloud';
|
|
11
9
|
constructor() {
|
|
10
|
+
Object.defineProperty(this, "ollama", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: null
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(this, "model", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: 'gpt-oss:120b-cloud'
|
|
21
|
+
});
|
|
12
22
|
// Lazy initialization - only create connection when needed
|
|
13
23
|
}
|
|
14
24
|
getConnection() {
|
|
@@ -78,4 +88,3 @@ export class BAITAnalyzer {
|
|
|
78
88
|
return null;
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
|
-
//# sourceMappingURL=ba-it-analyzer.js.map
|
|
@@ -5,9 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { OllamaConnection } from '../connections/ollama.js';
|
|
7
7
|
export class CodeGenerateAgent {
|
|
8
|
-
ollama = null;
|
|
9
|
-
model = 'qwen3-coder:480b-cloud';
|
|
10
8
|
constructor() {
|
|
9
|
+
Object.defineProperty(this, "ollama", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: null
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "model", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: 'qwen3-coder:480b-cloud'
|
|
20
|
+
});
|
|
11
21
|
// Lazy initialization - only create connection when needed
|
|
12
22
|
}
|
|
13
23
|
getConnection() {
|
|
@@ -147,4 +157,3 @@ Generate the action plan as JSON array to implement this feature completely.`;
|
|
|
147
157
|
}
|
|
148
158
|
}
|
|
149
159
|
}
|
|
150
|
-
//# sourceMappingURL=code-generate-agent.js.map
|
|
@@ -6,7 +6,8 @@ const execAsync = promisify(exec);
|
|
|
6
6
|
export class FileOperations {
|
|
7
7
|
async readFile(filePath) {
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
10
|
+
return content;
|
|
10
11
|
}
|
|
11
12
|
catch (error) {
|
|
12
13
|
throw new Error(`Failed to read file ${filePath}: ${error.message}`);
|
|
@@ -18,7 +19,8 @@ export class FileOperations {
|
|
|
18
19
|
let isNewFile = false;
|
|
19
20
|
let oldContent;
|
|
20
21
|
try {
|
|
21
|
-
|
|
22
|
+
const fileContent = await fs.readFile(filePath, 'utf-8');
|
|
23
|
+
oldContent = fileContent;
|
|
22
24
|
}
|
|
23
25
|
catch {
|
|
24
26
|
isNewFile = true;
|
|
@@ -123,4 +125,3 @@ export class FileOperations {
|
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
|
-
//# sourceMappingURL=file-operations.js.map
|
|
@@ -31,7 +31,7 @@ async function fetchRegistry() {
|
|
|
31
31
|
const headers = {
|
|
32
32
|
'Accept': 'application/vnd.github.v3.raw',
|
|
33
33
|
};
|
|
34
|
-
const githubToken = process.env
|
|
34
|
+
const githubToken = process.env['GITHUB_TOKEN'];
|
|
35
35
|
if (githubToken) {
|
|
36
36
|
headers['Authorization'] = `Bearer ${githubToken}`;
|
|
37
37
|
}
|
|
@@ -242,4 +242,3 @@ export function galaxyUIGetDocsUrl(params) {
|
|
|
242
242
|
description: 'Galaxy UI CLI Documentation',
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
//# sourceMappingURL=galaxy-ui-integration.js.map
|
|
@@ -5,9 +5,19 @@
|
|
|
5
5
|
import { GeminiConnection } from '../connections/gemini.js';
|
|
6
6
|
import { planningSystemPrompt } from '../prompts/planning-agent.js';
|
|
7
7
|
export class PlanningAgent {
|
|
8
|
-
gemini = null;
|
|
9
|
-
model = 'gemini-2.5-flash';
|
|
10
8
|
constructor() {
|
|
9
|
+
Object.defineProperty(this, "gemini", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: null
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(this, "model", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true,
|
|
19
|
+
value: 'gemini-2.5-flash'
|
|
20
|
+
});
|
|
11
21
|
// Lazy initialization - only create connection when needed
|
|
12
22
|
}
|
|
13
23
|
getConnection(systemPrompt) {
|
|
@@ -122,4 +132,3 @@ export class PlanningAgent {
|
|
|
122
132
|
};
|
|
123
133
|
}
|
|
124
134
|
}
|
|
125
|
-
//# sourceMappingURL=planning-agent.js.map
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { toolEventEmitter } from './tool-event-emitter.js';
|
|
7
7
|
export class ProgressReporter {
|
|
8
|
-
|
|
8
|
+
constructor() {
|
|
9
|
+
Object.defineProperty(this, "reports", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: []
|
|
14
|
+
});
|
|
15
|
+
}
|
|
9
16
|
reportProgress(report) {
|
|
10
17
|
this.reports.push(report);
|
|
11
18
|
const statusEmoji = report.status === 'success' ? '✅' : report.status === 'error' ? '❌' : '⏳';
|
|
@@ -43,4 +50,3 @@ export class ProgressReporter {
|
|
|
43
50
|
this.reports = [];
|
|
44
51
|
}
|
|
45
52
|
}
|
|
46
|
-
//# sourceMappingURL=progress-reporter.js.map
|
|
@@ -16,16 +16,61 @@ import { ProgressReporter } from './progress-reporter.js';
|
|
|
16
16
|
import * as GalaxyUI from './galaxy-ui-integration.js';
|
|
17
17
|
import { toolEventEmitter } from './tool-event-emitter.js';
|
|
18
18
|
export class ToolRegistry {
|
|
19
|
-
tools = new Map();
|
|
20
|
-
fileOps = new FileOperations();
|
|
21
|
-
gitOps = new GitOperations();
|
|
22
|
-
commandRunner = new CommandRunner();
|
|
23
|
-
baAnalyzer = new BAITAnalyzer();
|
|
24
|
-
documentParser = new DocumentParser();
|
|
25
|
-
planningAgent = new PlanningAgent();
|
|
26
|
-
codeGenerateAgent = new CodeGenerateAgent();
|
|
27
|
-
progressReporter = new ProgressReporter();
|
|
28
19
|
constructor() {
|
|
20
|
+
Object.defineProperty(this, "tools", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: new Map()
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(this, "fileOps", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
configurable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
value: new FileOperations()
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(this, "gitOps", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
configurable: true,
|
|
35
|
+
writable: true,
|
|
36
|
+
value: new GitOperations()
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(this, "commandRunner", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: new CommandRunner()
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(this, "baAnalyzer", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true,
|
|
48
|
+
value: new BAITAnalyzer()
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(this, "documentParser", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
configurable: true,
|
|
53
|
+
writable: true,
|
|
54
|
+
value: new DocumentParser()
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(this, "planningAgent", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
configurable: true,
|
|
59
|
+
writable: true,
|
|
60
|
+
value: new PlanningAgent()
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(this, "codeGenerateAgent", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
configurable: true,
|
|
65
|
+
writable: true,
|
|
66
|
+
value: new CodeGenerateAgent()
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(this, "progressReporter", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
configurable: true,
|
|
71
|
+
writable: true,
|
|
72
|
+
value: new ProgressReporter()
|
|
73
|
+
});
|
|
29
74
|
this.registerAllTools();
|
|
30
75
|
}
|
|
31
76
|
registerAllTools() {
|
|
@@ -648,4 +693,3 @@ export class ToolRegistry {
|
|
|
648
693
|
}
|
|
649
694
|
}
|
|
650
695
|
export const globalToolRegistry = new ToolRegistry();
|
|
651
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -29,4 +29,3 @@ export type Tool<Input, Output> = {
|
|
|
29
29
|
};
|
|
30
30
|
export type InferToolInput<T extends Tool<unknown, unknown>> = T extends Tool<infer Input, unknown> ? Input : never;
|
|
31
31
|
export type InferToolOutput<T extends Tool<unknown, unknown>> = T extends Tool<unknown, infer Output> ? Output : never;
|
|
32
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @modify 2025-10-21
|
|
6
6
|
* @desc Type definitions for Galaxy Code
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import { ToolExecutionInfo } from './connections/types.js';
|
|
9
9
|
export type MessageAuthor = 'user' | 'assistant' | 'system' | 'tool' | 'plan';
|
|
10
10
|
export interface ConversationMessage {
|
|
11
11
|
id: string;
|
|
@@ -9,9 +9,19 @@ import path from 'node:path';
|
|
|
9
9
|
import os from 'node:os';
|
|
10
10
|
import { execSync } from 'node:child_process';
|
|
11
11
|
export class ConfigManager {
|
|
12
|
-
configPath;
|
|
13
|
-
config;
|
|
14
12
|
constructor() {
|
|
13
|
+
Object.defineProperty(this, "configPath", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "config", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
15
25
|
this.configPath = this.getConfigPath();
|
|
16
26
|
this.config = this.loadConfig();
|
|
17
27
|
}
|
|
@@ -161,6 +171,16 @@ export class ConfigManager {
|
|
|
161
171
|
}
|
|
162
172
|
// Find manual agent first, otherwise get first agent
|
|
163
173
|
let primaryAgent = this.config.agent.find(a => a.type === 'manual') ?? this.config.agent[0];
|
|
174
|
+
// Check if primaryAgent is defined
|
|
175
|
+
if (!primaryAgent) {
|
|
176
|
+
return {
|
|
177
|
+
model: 'manual',
|
|
178
|
+
git: cliFlags.git ?? this.config.git,
|
|
179
|
+
test: cliFlags.test ?? this.config.test,
|
|
180
|
+
agent: this.config.agent,
|
|
181
|
+
error: 'Không tìm thấy agent hợp lệ. Vui lòng kiểm tra lại file cấu hình.',
|
|
182
|
+
};
|
|
183
|
+
}
|
|
164
184
|
// Validate agent configuration
|
|
165
185
|
const validation = this.validateAgent(primaryAgent);
|
|
166
186
|
if (validation.error) {
|
|
@@ -304,4 +324,3 @@ export class ConfigManager {
|
|
|
304
324
|
}
|
|
305
325
|
// Singleton instance
|
|
306
326
|
export const configManager = new ConfigManager();
|
|
307
|
-
//# sourceMappingURL=config-manager.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* This may not work reliably in terminal environments
|
|
14
14
|
*/
|
|
15
15
|
export async function initDevTools() {
|
|
16
|
-
if (process.env
|
|
16
|
+
if (process.env['NODE_ENV'] !== 'development') {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
try {
|
|
@@ -54,9 +54,8 @@ export async function initDevTools() {
|
|
|
54
54
|
* Display component for DevTools status
|
|
55
55
|
*/
|
|
56
56
|
export function DevToolsStatus({ connected }) {
|
|
57
|
-
if (process.env
|
|
57
|
+
if (process.env['NODE_ENV'] !== 'development') {
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
return connected ? '🔧 DevTools Đã Kết Nối' : '⚠️ DevTools Chưa Kết Nối';
|
|
61
61
|
}
|
|
62
|
-
//# sourceMappingURL=devtools.js.map
|
|
@@ -30,4 +30,3 @@ export declare function formatCode(content: string): React.ReactNode;
|
|
|
30
30
|
* Main formatter dispatcher
|
|
31
31
|
*/
|
|
32
32
|
export declare function formatMessage(content: string | object | any[], toolName?: string, toolInfo?: ToolExecutionInfo): React.ReactNode;
|
|
33
|
-
//# sourceMappingURL=message-formatters.d.ts.map
|
|
@@ -8,9 +8,19 @@
|
|
|
8
8
|
import fs from 'node:fs';
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
export class ProgressTracker {
|
|
11
|
-
progressFilePath;
|
|
12
|
-
progress = null;
|
|
13
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
|
+
});
|
|
14
24
|
this.progressFilePath = path.join(workingDir, 'Improgress.md');
|
|
15
25
|
}
|
|
16
26
|
/**
|
|
@@ -201,4 +211,3 @@ export class ProgressTracker {
|
|
|
201
211
|
}
|
|
202
212
|
// Create instance
|
|
203
213
|
export const progressTracker = new ProgressTracker();
|
|
204
|
-
//# sourceMappingURL=progress-tracker.js.map
|