galaxy-code 0.1.5 → 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.
Files changed (145) hide show
  1. package/README.md +149 -600
  2. package/dist/app.js +1 -1
  3. package/dist/cli.min.js +589 -0
  4. package/package.json +12 -10
  5. package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts +0 -72
  6. package/dist/node_modules/@workspace/agent-core/connections/claude.d.ts.map +0 -1
  7. package/dist/node_modules/@workspace/agent-core/connections/claude.js +0 -270
  8. package/dist/node_modules/@workspace/agent-core/connections/claude.js.map +0 -1
  9. package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts +0 -41
  10. package/dist/node_modules/@workspace/agent-core/connections/gemini.d.ts.map +0 -1
  11. package/dist/node_modules/@workspace/agent-core/connections/gemini.js +0 -203
  12. package/dist/node_modules/@workspace/agent-core/connections/gemini.js.map +0 -1
  13. package/dist/node_modules/@workspace/agent-core/connections/index.d.ts +0 -12
  14. package/dist/node_modules/@workspace/agent-core/connections/index.d.ts.map +0 -1
  15. package/dist/node_modules/@workspace/agent-core/connections/index.js +0 -12
  16. package/dist/node_modules/@workspace/agent-core/connections/index.js.map +0 -1
  17. package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts +0 -38
  18. package/dist/node_modules/@workspace/agent-core/connections/ollama.d.ts.map +0 -1
  19. package/dist/node_modules/@workspace/agent-core/connections/ollama.js +0 -64
  20. package/dist/node_modules/@workspace/agent-core/connections/ollama.js.map +0 -1
  21. package/dist/node_modules/@workspace/agent-core/connections/types.d.ts +0 -23
  22. package/dist/node_modules/@workspace/agent-core/connections/types.d.ts.map +0 -1
  23. package/dist/node_modules/@workspace/agent-core/connections/types.js +0 -8
  24. package/dist/node_modules/@workspace/agent-core/connections/types.js.map +0 -1
  25. package/dist/node_modules/@workspace/agent-core/index.d.ts +0 -13
  26. package/dist/node_modules/@workspace/agent-core/index.d.ts.map +0 -1
  27. package/dist/node_modules/@workspace/agent-core/index.js +0 -22
  28. package/dist/node_modules/@workspace/agent-core/index.js.map +0 -1
  29. package/dist/node_modules/@workspace/agent-core/package.json +0 -53
  30. package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts +0 -2
  31. package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.d.ts.map +0 -1
  32. package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js +0 -144
  33. package/dist/node_modules/@workspace/agent-core/prompts/ba-it-analyzer.js.map +0 -1
  34. package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts +0 -12
  35. package/dist/node_modules/@workspace/agent-core/prompts/index.d.ts.map +0 -1
  36. package/dist/node_modules/@workspace/agent-core/prompts/index.js +0 -12
  37. package/dist/node_modules/@workspace/agent-core/prompts/index.js.map +0 -1
  38. package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts +0 -9
  39. package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.d.ts.map +0 -1
  40. package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js +0 -89
  41. package/dist/node_modules/@workspace/agent-core/prompts/orchestrator.js.map +0 -1
  42. package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts +0 -9
  43. package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.d.ts.map +0 -1
  44. package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js +0 -196
  45. package/dist/node_modules/@workspace/agent-core/prompts/planning-agent.js.map +0 -1
  46. package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts +0 -8
  47. package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.d.ts.map +0 -1
  48. package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js +0 -112
  49. package/dist/node_modules/@workspace/agent-core/prompts/universal-agent.js.map +0 -1
  50. package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts +0 -30
  51. package/dist/node_modules/@workspace/agent-core/providers/agent-selector.d.ts.map +0 -1
  52. package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js +0 -76
  53. package/dist/node_modules/@workspace/agent-core/providers/agent-selector.js.map +0 -1
  54. package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts +0 -30
  55. package/dist/node_modules/@workspace/agent-core/providers/claude-agent.d.ts.map +0 -1
  56. package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js +0 -107
  57. package/dist/node_modules/@workspace/agent-core/providers/claude-agent.js.map +0 -1
  58. package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts +0 -37
  59. package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.d.ts.map +0 -1
  60. package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js +0 -144
  61. package/dist/node_modules/@workspace/agent-core/providers/gemini-agent.js.map +0 -1
  62. package/dist/node_modules/@workspace/agent-core/providers/index.d.ts +0 -13
  63. package/dist/node_modules/@workspace/agent-core/providers/index.d.ts.map +0 -1
  64. package/dist/node_modules/@workspace/agent-core/providers/index.js +0 -13
  65. package/dist/node_modules/@workspace/agent-core/providers/index.js.map +0 -1
  66. package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts +0 -54
  67. package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.d.ts.map +0 -1
  68. package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js +0 -247
  69. package/dist/node_modules/@workspace/agent-core/providers/ollama-agent.js.map +0 -1
  70. package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts +0 -17
  71. package/dist/node_modules/@workspace/agent-core/providers/orchestrator.d.ts.map +0 -1
  72. package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js +0 -62
  73. package/dist/node_modules/@workspace/agent-core/providers/orchestrator.js.map +0 -1
  74. package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts +0 -67
  75. package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.d.ts.map +0 -1
  76. package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js +0 -81
  77. package/dist/node_modules/@workspace/agent-core/tools/ba-it-analyzer.js.map +0 -1
  78. package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts +0 -52
  79. package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.d.ts.map +0 -1
  80. package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js +0 -150
  81. package/dist/node_modules/@workspace/agent-core/tools/code-generate-agent.js.map +0 -1
  82. package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts +0 -15
  83. package/dist/node_modules/@workspace/agent-core/tools/command-runner.d.ts.map +0 -1
  84. package/dist/node_modules/@workspace/agent-core/tools/command-runner.js +0 -121
  85. package/dist/node_modules/@workspace/agent-core/tools/command-runner.js.map +0 -1
  86. package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts +0 -12
  87. package/dist/node_modules/@workspace/agent-core/tools/document-parser.d.ts.map +0 -1
  88. package/dist/node_modules/@workspace/agent-core/tools/document-parser.js +0 -84
  89. package/dist/node_modules/@workspace/agent-core/tools/document-parser.js.map +0 -1
  90. package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts +0 -18
  91. package/dist/node_modules/@workspace/agent-core/tools/file-operations.d.ts.map +0 -1
  92. package/dist/node_modules/@workspace/agent-core/tools/file-operations.js +0 -126
  93. package/dist/node_modules/@workspace/agent-core/tools/file-operations.js.map +0 -1
  94. package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts +0 -95
  95. package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.d.ts.map +0 -1
  96. package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js +0 -245
  97. package/dist/node_modules/@workspace/agent-core/tools/galaxy-ui-integration.js.map +0 -1
  98. package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts +0 -12
  99. package/dist/node_modules/@workspace/agent-core/tools/git-operations.d.ts.map +0 -1
  100. package/dist/node_modules/@workspace/agent-core/tools/git-operations.js +0 -115
  101. package/dist/node_modules/@workspace/agent-core/tools/git-operations.js.map +0 -1
  102. package/dist/node_modules/@workspace/agent-core/tools/index.d.ts +0 -11
  103. package/dist/node_modules/@workspace/agent-core/tools/index.d.ts.map +0 -1
  104. package/dist/node_modules/@workspace/agent-core/tools/index.js +0 -11
  105. package/dist/node_modules/@workspace/agent-core/tools/index.js.map +0 -1
  106. package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts +0 -30
  107. package/dist/node_modules/@workspace/agent-core/tools/planning-agent.d.ts.map +0 -1
  108. package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js +0 -125
  109. package/dist/node_modules/@workspace/agent-core/tools/planning-agent.js.map +0 -1
  110. package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts +0 -20
  111. package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.d.ts.map +0 -1
  112. package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js +0 -46
  113. package/dist/node_modules/@workspace/agent-core/tools/progress-reporter.js.map +0 -1
  114. package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts +0 -22
  115. package/dist/node_modules/@workspace/agent-core/tools/registry.d.ts.map +0 -1
  116. package/dist/node_modules/@workspace/agent-core/tools/registry.js +0 -651
  117. package/dist/node_modules/@workspace/agent-core/tools/registry.js.map +0 -1
  118. package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts +0 -25
  119. package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.d.ts.map +0 -1
  120. package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js +0 -26
  121. package/dist/node_modules/@workspace/agent-core/tools/tool-event-emitter.js.map +0 -1
  122. package/dist/node_modules/@workspace/agent-core/tools/types.d.ts +0 -32
  123. package/dist/node_modules/@workspace/agent-core/tools/types.d.ts.map +0 -1
  124. package/dist/node_modules/@workspace/agent-core/tools/types.js +0 -2
  125. package/dist/node_modules/@workspace/agent-core/tools/types.js.map +0 -1
  126. package/dist/node_modules/@workspace/agent-core/types.d.ts +0 -40
  127. package/dist/node_modules/@workspace/agent-core/types.d.ts.map +0 -1
  128. package/dist/node_modules/@workspace/agent-core/types.js +0 -9
  129. package/dist/node_modules/@workspace/agent-core/types.js.map +0 -1
  130. package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts +0 -103
  131. package/dist/node_modules/@workspace/agent-core/utils/config-manager.d.ts.map +0 -1
  132. package/dist/node_modules/@workspace/agent-core/utils/config-manager.js +0 -307
  133. package/dist/node_modules/@workspace/agent-core/utils/config-manager.js.map +0 -1
  134. package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts +0 -22
  135. package/dist/node_modules/@workspace/agent-core/utils/devtools.d.ts.map +0 -1
  136. package/dist/node_modules/@workspace/agent-core/utils/devtools.js +0 -62
  137. package/dist/node_modules/@workspace/agent-core/utils/devtools.js.map +0 -1
  138. package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts +0 -33
  139. package/dist/node_modules/@workspace/agent-core/utils/message-formatters.d.ts.map +0 -1
  140. package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js +0 -591
  141. package/dist/node_modules/@workspace/agent-core/utils/message-formatters.js.map +0 -1
  142. package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts +0 -60
  143. package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.d.ts.map +0 -1
  144. package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js +0 -204
  145. package/dist/node_modules/@workspace/agent-core/utils/progress-tracker.js.map +0 -1
@@ -1,196 +0,0 @@
1
- /**
2
- * @author Bùi Trọng Hiếu
3
- * @email kevinbui210191@gmail.com
4
- * @create 2024-10-08
5
- * @modify 2024-10-09
6
- * @desc Planning Agent - Simple execution plans
7
- */
8
- export const planningSystemPrompt = () => `You are a PLANNING AGENT for software development projects.
9
-
10
- # Working Directory: ${process.cwd()}
11
-
12
- # Your Role
13
- Analyze user request and create actionable execution plan with 3-7 steps.
14
-
15
- # Input
16
- User Context: Simple description of what to build/implement
17
- Example: "Create a todo app with Next.js" or "Add authentication to existing app"
18
-
19
- # Output Schema
20
- Output ONLY valid JSON (no markdown, no \`\`\`json wrapper):
21
-
22
- \`\`\`json
23
- {
24
- "summary": "Brief plan description",
25
- "steps": [
26
- {
27
- "step": 1,
28
- "action": "Clear action description",
29
- "tool": "tool_name",
30
- "reasoning": "Why this step"
31
- }
32
- ],
33
- "estimatedTime": "quick|medium|long"
34
- }
35
- \`\`\`
36
-
37
- # Available Tools
38
-
39
- **project_init:**
40
- - command_run: Execute shell commands (npx create-*, npm init, git commands)
41
- - install_dependencies: Install packages from package.json
42
-
43
- **code_operations:**
44
- - file_tree: View project structure
45
- - file_read: Read file contents
46
- - file_write: Create/update files
47
- - file_delete: Remove files
48
-
49
- **testing:**
50
- - test_run: Execute test suite (only if System Context: Test Planning=ON)
51
-
52
- **version_control:**
53
- - git_commit: Commit changes with conventional message
54
-
55
- # Planning Strategy
56
-
57
- ## NEW Projects
58
- \`\`\`
59
- 1. command_run: Initialize project (create-next-app, create-vite, etc.)
60
- 2. install_dependencies: Add required packages
61
- 3. file_write: Core pages/components
62
- 4. file_write: Additional features
63
- 5. test_run: Run tests (if Test Planning=ON)
64
- 6. git_commit: Save implementation
65
- \`\`\`
66
-
67
- ## ADD Features (Existing)
68
- \`\`\`
69
- 1. file_tree: Understand structure
70
- 2. file_read: Check existing code (if needed)
71
- 3. install_dependencies: Add new packages (if needed)
72
- 4. file_write: Implement feature
73
- 5. test_run: Verify changes (if Test Planning=ON)
74
- 6. git_commit: Save changes
75
- \`\`\`
76
-
77
- # Planning Rules
78
-
79
- 1. **Step Count**: 3-7 steps (balance detail vs simplicity)
80
- 2. **Logical Order**: Setup → Dependencies → Implementation → Testing → Commit
81
- 3. **System Context** (optional in input):
82
- - Test Planning=ON → Include test_run step
83
- - Test Planning=OFF → Skip test_run step
84
- 4. **Time Estimates**:
85
- - quick: 1-3 steps (<30min)
86
- - medium: 4-6 steps (30min-2h)
87
- - long: 7+ steps (>2h)
88
-
89
- # Example 1: NEW Project
90
-
91
- Input:
92
- \`\`\`
93
- User Context: Create a todo app with Next.js and TypeScript
94
- \`\`\`
95
-
96
- Output:
97
- \`\`\`json
98
- {
99
- "summary": "Build Next.js todo app with TypeScript",
100
- "steps": [
101
- {
102
- "step": 1,
103
- "action": "Initialize Next.js project with TypeScript",
104
- "tool": "command_run",
105
- "reasoning": "Setup project foundation"
106
- },
107
- {
108
- "step": 2,
109
- "action": "Create TodoList component with CRUD operations",
110
- "tool": "file_write",
111
- "reasoning": "Core todo functionality"
112
- },
113
- {
114
- "step": 3,
115
- "action": "Create TodoItem component with state management",
116
- "tool": "file_write",
117
- "reasoning": "Individual todo UI and logic"
118
- },
119
- {
120
- "step": 4,
121
- "action": "Create main page integrating TodoList",
122
- "tool": "file_write",
123
- "reasoning": "App entry point"
124
- },
125
- {
126
- "step": 5,
127
- "action": "Commit changes: 'feat: initial todo app'",
128
- "tool": "git_commit",
129
- "reasoning": "Save implementation"
130
- }
131
- ],
132
- "estimatedTime": "medium"
133
- }
134
- \`\`\`
135
-
136
- # Example 2: ADD Feature
137
-
138
- Input:
139
- \`\`\`
140
- User Context: Add user authentication to existing Express app
141
- \`\`\`
142
-
143
- Output:
144
- \`\`\`json
145
- {
146
- "summary": "Add JWT authentication to Express app",
147
- "steps": [
148
- {
149
- "step": 1,
150
- "action": "Check existing project structure",
151
- "tool": "file_tree",
152
- "reasoning": "Understand current architecture"
153
- },
154
- {
155
- "step": 2,
156
- "action": "Install JWT and bcrypt packages",
157
- "tool": "install_dependencies",
158
- "reasoning": "Required for authentication"
159
- },
160
- {
161
- "step": 3,
162
- "action": "Create User model and authentication routes",
163
- "tool": "file_write",
164
- "reasoning": "Backend auth logic"
165
- },
166
- {
167
- "step": 4,
168
- "action": "Create authentication middleware",
169
- "tool": "file_write",
170
- "reasoning": "Route protection"
171
- },
172
- {
173
- "step": 5,
174
- "action": "Run tests for auth flow",
175
- "tool": "test_run",
176
- "reasoning": "Verify implementation (if Test Planning=ON)"
177
- },
178
- {
179
- "step": 6,
180
- "action": "Commit changes: 'feat: add JWT authentication'",
181
- "tool": "git_commit",
182
- "reasoning": "Save feature"
183
- }
184
- ],
185
- "estimatedTime": "medium"
186
- }
187
- \`\`\`
188
-
189
- # Critical Reminders
190
- - **JSON Only**: Start with { and end with } (no markdown wrappers)
191
- - **English Only**: All text fields in English
192
- - **Be Specific**: Clear action descriptions (not "implement feature", but "Create TodoList component")
193
- - **Realistic Steps**: Don't over-plan (3-7 steps max)
194
- - **Tool Correctness**: Use appropriate tool for each step
195
- - **Test Conditional**: Only include test_run if Test Planning=ON in input`;
196
- //# sourceMappingURL=planning-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"planning-agent.js","sourceRoot":"","sources":["../../src/prompts/planning-agent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAChC,GAAG,EAAE,CAAC;;uBAEgB,OAAO,CAAC,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAyLuC,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * @author Bùi Trọng Hiếu
3
- * @email kevinbui210191@gmail.com
4
- * @create 2025-10-22
5
- * @desc Universal Agent - Concise execution-focused prompt
6
- */
7
- export declare function buildUniversalAgentPrompt(toolsContext: string): string;
8
- //# sourceMappingURL=universal-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"universal-agent.d.ts","sourceRoot":"","sources":["../../src/prompts/universal-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAwGtE"}
@@ -1,112 +0,0 @@
1
- /**
2
- * @author Bùi Trọng Hiếu
3
- * @email kevinbui210191@gmail.com
4
- * @create 2025-10-22
5
- * @desc Universal Agent - Concise execution-focused prompt
6
- */
7
- export function buildUniversalAgentPrompt(toolsContext) {
8
- return `You are Galaxy AI - software development expert by kevinbui.
9
-
10
- # Response Language
11
- **Match user's language exactly** (detect from their input)
12
-
13
- # Available Tools
14
- ${toolsContext}
15
-
16
- # Planning & Execution Workflow
17
-
18
- ## When to Plan
19
- Multi-step projects (apps, websites, features with 3+ steps) → Use planning workflow
20
-
21
- ## Execution Loop
22
- \`\`\`
23
- 1. plan_task({userContext: "user's request"})
24
- → Receive: {summary, steps: [{step, action, tool, reasoning}]}
25
-
26
- 2. FOR EACH step in plan.steps:
27
- a. Execute the step using specified tool
28
- b. ⚠️ CRITICAL: MUST call progress_reporter({step: N, status: "success"|"error"|"in_progress"})
29
- - After EVERY step execution
30
- - Even if step fails
31
- - NO EXCEPTIONS
32
- c. Move to next step
33
-
34
- 3. All steps complete → Done
35
- \`\`\`
36
-
37
- ## ⚠️ CRITICAL RULE: Progress Reporting
38
- **YOU MUST call progress_reporter after EVERY step execution. This is NOT optional.**
39
-
40
- Example of CORRECT execution:
41
- \`\`\`
42
- Step 1: file_tree(...) → progress_reporter({step: 1, status: "success"})
43
- Step 2: command_run(...) → progress_reporter({step: 2, status: "success"})
44
- Step 3: file_write(...) → progress_reporter({step: 3, status: "success"})
45
- \`\`\`
46
-
47
- Example of WRONG execution (DO NOT DO THIS):
48
- \`\`\`
49
- Step 1: file_tree(...) ❌ Missing progress_reporter
50
- Step 2: command_run(...) ❌ Missing progress_reporter
51
- Step 3: file_write(...) ❌ Missing progress_reporter
52
- \`\`\`
53
-
54
- ## Example Flow
55
- \`\`\`
56
- User: "Create todo app with Next.js"
57
-
58
- → Step 1: plan_task({userContext: "..."})
59
- Result: 5-step plan
60
-
61
- → Step 2: command_run({command: "npx create-next-app..."})
62
- → Step 3: progress_reporter({step: 1, status: "success"})
63
-
64
- → Step 4: file_write({path: "components/TodoList.tsx", content: "..."})
65
- → Step 5: progress_reporter({step: 2, status: "success"})
66
-
67
- ... repeat for all steps ...
68
- \`\`\`
69
-
70
- # Command Execution Rules
71
-
72
- **Setup commands (create-*, npm init, etc.):**
73
- 1. ✅ Run ONCE with ALL default flags (--yes, --default, etc.)
74
- 2. ✅ Check result → Success? → STOP → Continue to file creation
75
- 3. ❌ DON'T retry with different flags
76
- 4. ❌ NEVER use "cd" - working directory managed automatically
77
- 5. ❌ NEVER execute in /tmp or outside project
78
-
79
- # Workflows
80
-
81
- ## NEW Projects
82
- \`\`\`
83
- 1. plan_task: Get execution plan (optional for simple projects)
84
- 2. command_run: Setup with ALL flags → ONCE
85
- 3. file_write: Pages, components, configs
86
- 4. progress_reporter: After each major step
87
- 5. Done: Complete functional app
88
- \`\`\`
89
-
90
- ## ADD Features (Existing Project)
91
- \`\`\`
92
- 1. file_tree: Understand structure
93
- 2. file_read: Check current code
94
- 3. file_write: New/updated files
95
- 4. command_run: Install deps (--yes)
96
- 5. Done
97
- \`\`\`
98
-
99
- # Detection
100
- - **NEW**: "Create/Build/Make" + project/app/website
101
- - **FEATURE**: "Add/Fix/Update" + mentions existing/current
102
-
103
- # Core Rules
104
- - **Code**: TypeScript preferred, clean, maintainable, error handling
105
- - **Git** (if enabled): Conventional commits at logical checkpoints
106
- - **Testing** (if enabled): Run after changes, fix failures
107
- - **Errors**: Analyze → Try alternative approach → Explain
108
- - **Progress**: ALWAYS call progress_reporter after completing each step in a plan
109
-
110
- Remember: Execute commands ONCE → Check success → Build complete app!`;
111
- }
112
- //# sourceMappingURL=universal-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"universal-agent.js","sourceRoot":"","sources":["../../src/prompts/universal-agent.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,UAAU,yBAAyB,CAAC,YAAoB;IAC7D,OAAO;;;;;;EAMN,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sEAgGwD,CAAC;AACvE,CAAC"}
@@ -1,30 +0,0 @@
1
- /**
2
- * @author Bùi Trọng Hiếu
3
- * @email kevinbui210191@gmail.com
4
- * @create 2025-10-21
5
- * @modify 2025-10-22
6
- * @desc Agent factory for selecting appropriate AI agent based on config
7
- */
8
- import type { GalaxyConfig } from '../utils/config-manager.js';
9
- export interface AgentInterface {
10
- handleUserInput(input: string, options?: {
11
- gitEnabled: boolean;
12
- testEnabled: boolean;
13
- }, onMessage?: (author: 'user' | 'assistant' | 'system' | 'tool', content: string, toolName?: string, toolInfo?: any) => void): Promise<{
14
- content: string;
15
- }>;
16
- }
17
- /**
18
- * Select appropriate agent based on Galaxy config
19
- * Uses the configured agent
20
- */
21
- export declare function selectAgent(config: GalaxyConfig): AgentInterface | null;
22
- /**
23
- * Get human-readable agent description
24
- */
25
- export declare function getAgentDescription(config: GalaxyConfig): string;
26
- /**
27
- * Check if agent supports tool use
28
- */
29
- export declare function agentSupportsTools(): boolean;
30
- //# sourceMappingURL=agent-selector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-selector.d.ts","sourceRoot":"","sources":["../../src/providers/agent-selector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAC,YAAY,EAAc,MAAM,4BAA4B,CAAC;AAM1E,MAAM,WAAW,cAAc;IAC9B,eAAe,CACd,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QACT,UAAU,EAAE,OAAO,CAAC;QACpB,WAAW,EAAE,OAAO,CAAC;KACrB,EACD,SAAS,CAAC,EAAE,CACX,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,EAChD,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,GAAG,KACV,IAAI,GACP,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CA2CvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CA0BhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAG5C"}
@@ -1,76 +0,0 @@
1
- // import {orchestratorAgent} from './orchestrator.js';
2
- import { claudeAgent } from './claude-agent.js';
3
- import { OllamaAgent } from './ollama-agent.js';
4
- import { geminiAgent } from './gemini-agent.js';
5
- /**
6
- * Select appropriate agent based on Galaxy config
7
- * Uses the configured agent
8
- */
9
- export function selectAgent(config) {
10
- // Get agent config array
11
- const agentArray = config.agent;
12
- if (!agentArray || agentArray.length === 0) {
13
- console.warn('⚠️ No agents configured. Using Ollama agent as default.');
14
- return new OllamaAgent();
15
- }
16
- // Check for manual mode first - both CLI and VSCode should use Ollama with qwen3-coder:480b-cloud
17
- const manualAgent = agentArray.find((a) => a.type === 'manual');
18
- if (manualAgent) {
19
- // Use Ollama Agent with qwen3-coder:480b-cloud model for manual mode
20
- const manualAgentConfig = {
21
- type: 'ollama',
22
- model: 'qwen3-coder:480b-cloud',
23
- host: 'https://ollama.com',
24
- apiKey: manualAgent.apiKey,
25
- };
26
- return new OllamaAgent(manualAgentConfig);
27
- }
28
- // For non-manual modes, find first working agent (claude, gemini, or ollama)
29
- const primaryAgent = agentArray.find((a) => a.type === 'claude' || a.type === 'gemini' || a.type === 'ollama') ?? agentArray[0];
30
- switch (primaryAgent.type) {
31
- case 'claude':
32
- // Use Claude Agent with full tool access
33
- return claudeAgent.instance;
34
- case 'gemini':
35
- // Use Gemini Agent with full tool access
36
- return geminiAgent.instance;
37
- case 'ollama':
38
- // Use Ollama Agent with full tool access
39
- return new OllamaAgent(primaryAgent);
40
- default:
41
- // Default to Ollama agent
42
- console.warn('⚠️ Unknown agent type. Using Ollama agent.');
43
- return new OllamaAgent();
44
- }
45
- }
46
- /**
47
- * Get human-readable agent description
48
- */
49
- export function getAgentDescription(config) {
50
- const agentArray = config.agent;
51
- if (!agentArray || agentArray.length === 0) {
52
- return 'Ollama (default)';
53
- }
54
- // Find manual agent first, otherwise use first agent
55
- const primaryAgent = agentArray.find((a) => a.type === 'manual') ?? agentArray[0];
56
- switch (primaryAgent.type) {
57
- case 'claude':
58
- return 'Claude';
59
- case 'gemini':
60
- return 'Gemini';
61
- case 'ollama':
62
- return 'Ollama';
63
- case 'manual':
64
- return 'Manual (Orchestrator)';
65
- default:
66
- return 'Ollama (default)';
67
- }
68
- }
69
- /**
70
- * Check if agent supports tool use
71
- */
72
- export function agentSupportsTools() {
73
- // All agents support tools
74
- return true;
75
- }
76
- //# sourceMappingURL=agent-selector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-selector.js","sourceRoot":"","sources":["../../src/providers/agent-selector.ts"],"names":[],"mappings":"AAQA,uDAAuD;AACvD,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAkB9C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,MAAoB;IAC/C,yBAAyB;IACzB,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;IAEhC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC;QACxE,OAAO,IAAI,WAAW,EAAE,CAAC;IAC1B,CAAC;IAED,kGAAkG;IAClG,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;IAChE,IAAI,WAAW,EAAE,CAAC;QACjB,qEAAqE;QACrE,MAAM,iBAAiB,GAAgB;YACtC,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,wBAAwB;YAC/B,IAAI,EAAE,oBAAoB;YAC1B,MAAM,EAAE,WAAW,CAAC,MAAM;SAC1B,CAAC;QACF,OAAO,IAAI,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3C,CAAC;IAED,6EAA6E;IAC7E,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAEhI,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC;QAC3B,KAAK,QAAQ;YACZ,yCAAyC;YACzC,OAAO,WAAW,CAAC,QAAQ,CAAC;QAE7B,KAAK,QAAQ;YACZ,yCAAyC;YACzC,OAAO,WAAW,CAAC,QAAQ,CAAC;QAE7B,KAAK,QAAQ;YACZ,yCAAyC;YACzC,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC;QAEtC;YACC,0BAA0B;YAC1B,OAAO,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;YAC3D,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAoB;IACvD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;IAEhC,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5C,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IAED,qDAAqD;IACrD,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAElF,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC;QAC3B,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QAEjB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QAEjB,KAAK,QAAQ;YACZ,OAAO,QAAQ,CAAC;QAEjB,KAAK,QAAQ;YACZ,OAAO,uBAAuB,CAAC;QAEhC;YACC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IACjC,2BAA2B;IAC3B,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -1,30 +0,0 @@
1
- import type { AgentConfig } from '../utils/config-manager.js';
2
- export interface ClaudeAgentOptions {
3
- gitEnabled: boolean;
4
- testEnabled: boolean;
5
- }
6
- export type MessageCallback = (author: 'user' | 'assistant' | 'system' | 'tool', content: string, toolName?: string, toolInfo?: any) => void;
7
- export declare class ClaudeAgent {
8
- private connection;
9
- private toolsRegistry;
10
- private readonly toolNames;
11
- constructor(config?: AgentConfig);
12
- /**
13
- * Convert tool registry format to Anthropic tool format
14
- */
15
- private getAnthropicTools;
16
- /**
17
- * Handle user input and orchestrate tool calls
18
- */
19
- handleUserInput(input: string, options?: ClaudeAgentOptions, onMessage?: MessageCallback, retryCount?: number): Promise<{
20
- content: string;
21
- }>;
22
- /**
23
- * Clear conversation history
24
- */
25
- clearHistory(): void;
26
- }
27
- export declare const claudeAgent: {
28
- readonly instance: ClaudeAgent;
29
- };
30
- //# sourceMappingURL=claude-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-agent.d.ts","sourceRoot":"","sources":["../../src/providers/claude-agent.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,CAC7B,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,EAChD,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,GAAG,KACV,IAAI,CAAC;AAEV,qBAAa,WAAW;IACvB,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,aAAa,CAAsB;IAG3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CA2BxB;gBAEU,MAAM,CAAC,EAAE,WAAW;IAShC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;OAEG;IACG,eAAe,CACpB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,kBAAkB,EAC5B,SAAS,CAAC,EAAE,eAAe,EAC3B,UAAU,GAAE,MAAU,GACpB,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC;IA+C7B;;OAEG;IACH,YAAY,IAAI,IAAI;CAIpB;AAKD,eAAO,MAAM,WAAW;uBACP,WAAW;CAM3B,CAAC"}
@@ -1,107 +0,0 @@
1
- import { ToolRegistry } from '../tools/index.js';
2
- import { ClaudeConnection } from '../connections/claude.js';
3
- import { buildUniversalAgentPrompt } from '../prompts/index.js';
4
- export class ClaudeAgent {
5
- connection;
6
- toolsRegistry = new ToolRegistry();
7
- // Low-level tools for Claude to build software
8
- toolNames = [
9
- 'file_read',
10
- 'file_write',
11
- 'file_tree',
12
- 'file_list',
13
- 'file_search',
14
- 'git_status',
15
- 'git_commit',
16
- 'git_push',
17
- 'git_pull',
18
- 'git_diff',
19
- 'git_log',
20
- 'git_branches',
21
- 'command_run',
22
- 'install_dependencies',
23
- 'test_run',
24
- 'document_parse',
25
- 'plan_task',
26
- 'progress_reporter',
27
- // Galaxy UI Integration
28
- 'galaxy_ui_list',
29
- 'galaxy_ui_search',
30
- 'galaxy_ui_get_component',
31
- 'galaxy_ui_categories',
32
- 'galaxy_ui_add',
33
- 'galaxy_ui_init',
34
- 'galaxy_ui_docs',
35
- ];
36
- constructor(config) {
37
- // Build system prompt using shared universal prompt
38
- const toolsContext = this.toolsRegistry.getToolsContext(this.toolNames);
39
- const systemPrompt = buildUniversalAgentPrompt(toolsContext);
40
- // Initialize connection with config and systemPrompt
41
- this.connection = new ClaudeConnection(config, systemPrompt);
42
- }
43
- /**
44
- * Convert tool registry format to Anthropic tool format
45
- */
46
- getAnthropicTools() {
47
- const tools = this.toolsRegistry.getToolsByNames(this.toolNames);
48
- return tools.map(tool => ({
49
- name: tool.name,
50
- description: tool.description,
51
- input_schema: tool.inputSchema,
52
- }));
53
- }
54
- /**
55
- * Handle user input and orchestrate tool calls
56
- */
57
- async handleUserInput(input, options, onMessage, retryCount = 0) {
58
- const MAX_RETRIES = 3;
59
- try {
60
- // Add system context to input
61
- const contextMessage = options
62
- ? `[System Context: Git=${options.gitEnabled ? 'ON' : 'OFF'}, Test Planning=${options.testEnabled ? 'ON' : 'OFF'}]\n\n${input}`
63
- : input;
64
- // Notify user message
65
- if (onMessage) {
66
- onMessage('user', contextMessage);
67
- }
68
- // Call connection's chatWithTools (handles full loop)
69
- const response = await this.connection.chatWithTools(contextMessage, this.getAnthropicTools(), onMessage);
70
- // Notify final response
71
- if (onMessage) {
72
- onMessage('assistant', response);
73
- }
74
- return { content: response || '(No response)' };
75
- }
76
- catch (error) {
77
- // Silent auto-retry with exponential backoff
78
- if (retryCount < MAX_RETRIES) {
79
- // Wait before retry (exponential backoff: 1s, 2s, 4s)
80
- const delayMs = Math.pow(2, retryCount) * 1000;
81
- await new Promise(resolve => setTimeout(resolve, delayMs));
82
- // Silent retry - continue with "Continued" message
83
- return await this.handleUserInput('Continued', options, onMessage, retryCount + 1);
84
- }
85
- // Max retries exceeded - throw error to app.tsx
86
- throw new Error(`Agent failed after ${MAX_RETRIES} retries: ${error instanceof Error ? error.message : String(error)}`);
87
- }
88
- }
89
- /**
90
- * Clear conversation history
91
- */
92
- clearHistory() {
93
- this.connection.clearHistory();
94
- this.connection.clearToolHistory();
95
- }
96
- }
97
- // Singleton instance with lazy initialization
98
- let _claudeAgent = null;
99
- export const claudeAgent = {
100
- get instance() {
101
- if (!_claudeAgent) {
102
- _claudeAgent = new ClaudeAgent();
103
- }
104
- return _claudeAgent;
105
- },
106
- };
107
- //# sourceMappingURL=claude-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"claude-agent.js","sourceRoot":"","sources":["../../src/providers/claude-agent.ts"],"names":[],"mappings":"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"}
@@ -1,37 +0,0 @@
1
- import type { AgentConfig } from '../utils/config-manager.js';
2
- export interface GeminiAgentOptions {
3
- gitEnabled: boolean;
4
- testEnabled: boolean;
5
- }
6
- export type MessageCallback = (author: 'user' | 'assistant' | 'system' | 'tool', content: string, toolName?: string, toolInfo?: any) => void;
7
- interface ConversationMessage {
8
- role: 'user' | 'assistant' | 'system';
9
- content: string;
10
- }
11
- export declare class GeminiAgent {
12
- private connection;
13
- private toolsRegistry;
14
- private conversationHistory;
15
- private systemPrompt;
16
- private readonly toolNames;
17
- constructor(config?: AgentConfig);
18
- /**
19
- * Handle user input and orchestrate tool calls
20
- */
21
- handleUserInput(input: string, options?: GeminiAgentOptions, onMessage?: MessageCallback, retryCount?: number): Promise<{
22
- content: string;
23
- }>;
24
- /**
25
- * Clear conversation history
26
- */
27
- clearHistory(): void;
28
- /**
29
- * Get conversation history
30
- */
31
- getHistory(): ConversationMessage[];
32
- }
33
- export declare const geminiAgent: {
34
- readonly instance: GeminiAgent;
35
- };
36
- export {};
37
- //# sourceMappingURL=gemini-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini-agent.d.ts","sourceRoot":"","sources":["../../src/providers/gemini-agent.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AAE5D,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,CAC7B,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,EAChD,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,GAAG,KACV,IAAI,CAAC;AAEV,UAAU,mBAAmB;IAC5B,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,WAAW;IACvB,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,YAAY,CAAS;IAG7B,OAAO,CAAC,QAAQ,CAAC,SAAS,CA2BxB;gBAEU,MAAM,CAAC,EAAE,WAAW;IAQhC;;OAEG;IACG,eAAe,CACpB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,kBAAkB,EAC5B,SAAS,CAAC,EAAE,eAAe,EAC3B,UAAU,GAAE,MAAU,GACpB,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CAAC;IAoF7B;;OAEG;IACH,YAAY,IAAI,IAAI;IAQpB;;OAEG;IACH,UAAU,IAAI,mBAAmB,EAAE;CAGnC;AAKD,eAAO,MAAM,WAAW;uBACP,WAAW;CAM3B,CAAC"}