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
|
@@ -8,13 +8,43 @@
|
|
|
8
8
|
import Anthropic from '@anthropic-ai/sdk';
|
|
9
9
|
import { ToolRegistry } from '../tools/index.js';
|
|
10
10
|
export class ClaudeConnection {
|
|
11
|
-
client;
|
|
12
|
-
model;
|
|
13
|
-
conversationHistory = [];
|
|
14
|
-
conversationHistoryWithTools = [];
|
|
15
|
-
systemPrompt;
|
|
16
|
-
toolsRegistry = new ToolRegistry();
|
|
17
11
|
constructor(config, systemPrompt) {
|
|
12
|
+
Object.defineProperty(this, "client", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: void 0
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(this, "model", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true,
|
|
22
|
+
value: void 0
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, "conversationHistory", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: []
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "conversationHistoryWithTools", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: []
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "systemPrompt", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "toolsRegistry", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: new ToolRegistry()
|
|
47
|
+
});
|
|
18
48
|
// Only get apiKey from config - no fallback to env
|
|
19
49
|
const apiKey = config?.apiKey;
|
|
20
50
|
// if (!apiKey) {
|
|
@@ -25,7 +55,8 @@ export class ClaudeConnection {
|
|
|
25
55
|
this.client = new Anthropic({
|
|
26
56
|
apiKey,
|
|
27
57
|
});
|
|
28
|
-
this.model =
|
|
58
|
+
this.model =
|
|
59
|
+
config?.model || 'claude-sonnet-4.5-20250929';
|
|
29
60
|
this.systemPrompt = systemPrompt;
|
|
30
61
|
}
|
|
31
62
|
/**
|
|
@@ -76,7 +107,8 @@ export class ClaudeConnection {
|
|
|
76
107
|
});
|
|
77
108
|
let fullResponse = '';
|
|
78
109
|
for await (const chunk of stream) {
|
|
79
|
-
if (chunk.type === 'content_block_delta' &&
|
|
110
|
+
if (chunk.type === 'content_block_delta' &&
|
|
111
|
+
chunk.delta.type === 'text_delta') {
|
|
80
112
|
const text = chunk.delta.text || '';
|
|
81
113
|
fullResponse += text;
|
|
82
114
|
yield text;
|
|
@@ -109,7 +141,9 @@ export class ClaudeConnection {
|
|
|
109
141
|
},
|
|
110
142
|
],
|
|
111
143
|
});
|
|
112
|
-
return response.content[0]?.type === 'text'
|
|
144
|
+
return response.content[0]?.type === 'text'
|
|
145
|
+
? response.content[0].text
|
|
146
|
+
: '';
|
|
113
147
|
}
|
|
114
148
|
catch (error) {
|
|
115
149
|
console.error('Claude Generate Error:', error);
|
|
@@ -267,4 +301,3 @@ export class ClaudeConnection {
|
|
|
267
301
|
this.conversationHistoryWithTools = [];
|
|
268
302
|
}
|
|
269
303
|
}
|
|
270
|
-
//# sourceMappingURL=claude.js.map
|
|
@@ -9,13 +9,43 @@ import { GoogleGenAI, Type, } from '@google/genai';
|
|
|
9
9
|
import { globalToolRegistry } from '../tools/registry.js';
|
|
10
10
|
const geminiModel = 'gemini-2.5-flash';
|
|
11
11
|
export class GeminiConnection {
|
|
12
|
-
client;
|
|
13
|
-
apiKey;
|
|
14
|
-
chatSession;
|
|
15
|
-
systemInstruction;
|
|
16
|
-
model;
|
|
17
|
-
toolsRegistry = globalToolRegistry;
|
|
18
12
|
constructor(config, systemPrompt) {
|
|
13
|
+
Object.defineProperty(this, "client", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
configurable: true,
|
|
16
|
+
writable: true,
|
|
17
|
+
value: void 0
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(this, "apiKey", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: void 0
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "chatSession", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: void 0
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "systemInstruction", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: void 0
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(this, "model", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: void 0
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(this, "toolsRegistry", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
value: globalToolRegistry
|
|
48
|
+
});
|
|
19
49
|
// Only get apiKey from config - no fallback to env
|
|
20
50
|
this.apiKey = config?.apiKey;
|
|
21
51
|
this.model = config?.model ?? 'gemini-2.5-flash';
|
|
@@ -200,4 +230,3 @@ export class GeminiConnection {
|
|
|
200
230
|
return typeMap[type.toLowerCase()] || Type.STRING;
|
|
201
231
|
}
|
|
202
232
|
}
|
|
203
|
-
//# sourceMappingURL=gemini.js.map
|
|
@@ -12,9 +12,19 @@ export const ollamaModels = [
|
|
|
12
12
|
'qwen3-coder:480b-cloud',
|
|
13
13
|
];
|
|
14
14
|
export class OllamaConnection {
|
|
15
|
-
ollama;
|
|
16
|
-
model = 'deepseek-v3.1:671b-cloud';
|
|
17
15
|
constructor(config) {
|
|
16
|
+
Object.defineProperty(this, "ollama", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(this, "model", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: 'deepseek-v3.1:671b-cloud'
|
|
27
|
+
});
|
|
18
28
|
this.model = config?.model ?? this.model;
|
|
19
29
|
const host = config?.host ?? 'https://ollama.com';
|
|
20
30
|
// If using ollama.com cloud, need API key
|
|
@@ -61,4 +71,3 @@ export class OllamaConnection {
|
|
|
61
71
|
});
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
|
-
//# sourceMappingURL=ollama.js.map
|
|
@@ -20,4 +20,3 @@ export interface ToolExecutionInfo {
|
|
|
20
20
|
* Message callback type for agent notifications
|
|
21
21
|
*/
|
|
22
22
|
export type MessageCallback = (author: 'user' | 'assistant' | 'system' | 'tool', content: string, toolName?: string, toolInfo?: ToolExecutionInfo) => void;
|
|
23
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export declare const systemBAITAnalyzerPrompt = "You are an EXPERT BUSINESS ANALYST for IT projects.\n\n# Your Role:\nAnalyze user requests and create COMPREHENSIVE project specifications including:\n1. Type: create_project (new) or update_project (add feature to existing)\n2. Core Features (must-have vs nice-to-have)\n3. Technical Stack recommendations\n4. User Stories with acceptance criteria\n5. Data Model (entities, attributes, relationships)\n6. API endpoints for backend systems\n7. Complexity + time estimate\n8. Best practices & recommendations\n9. Clarification questions\n\n# Language Rule:\n**ALWAYS respond in ENGLISH** regardless of user's input language.\n- All field values (descriptions, names, recommendations, etc.) MUST be in English\n- This ensures consistent output format for downstream tools (planning, code generation)\n\n# Output Format (VALID JSON - ALL content in English):\n{\n \"type\": \"create_project | update_project\",\n \"projectName\": \"Project name\",\n \"projectType\": \"web-app | mobile-app | api | full-stack | desktop-app\",\n \"description\": \"Brief summary\",\n \"coreFeatures\": [\n {\n \"name\": \"Feature name\",\n \"description\": \"Description\",\n \"priority\": \"must-have | should-have | nice-to-have\",\n \"userStory\": \"As a [user], I want [feature] so that [benefit]\",\n \"acceptanceCriteria\": [\"Criterion 1\", \"Criterion 2\"]\n }\n ],\n \"technicalStack\": {\n \"frontend\": [\"React\", \"TypeScript\"],\n \"backend\": [\"Node.js\", \"Express\"],\n \"database\": [\"PostgreSQL\"],\n \"thirdParty\": [\"Stripe\"]\n },\n \"userStories\": [\n {\n \"as\": \"role\",\n \"iWant\": \"feature\",\n \"soThat\": \"benefit\",\n \"acceptanceCriteria\": [\"Given [context], when [action], then [result]\"]\n }\n ],\n \"dataModel\": [\n {\n \"name\": \"Entity\",\n \"description\": \"Purpose\",\n \"attributes\": [\"id\", \"name\", \"createdAt\"],\n \"relationships\": [\"User has many Orders\"]\n }\n ],\n \"apiEndpoints\": [\n {\n \"method\": \"GET | POST | PUT | DELETE\",\n \"path\": \"/api/resource\",\n \"description\": \"Purpose\",\n \"response\": \"{ data: [] }\"\n }\n ],\n \"estimatedComplexity\": \"simple | medium | complex\",\n \"estimatedTime\": \"1-2 weeks | 2-4 weeks | 1-3 months\",\n \"recommendations\": [\"Recommendation with reasoning\"],\n \"questionsForUser\": [\"Clarification question\"]\n}\n\n# Example:\n\nUser: \"Create an online phone store\"\n\n{\n \"type\": \"create_project\",\n \"projectName\": \"Phone Store E-Commerce\",\n \"projectType\": \"full-stack\",\n \"description\": \"E-commerce platform for selling phones with product catalog, cart, checkout, and order management\",\n \"coreFeatures\": [\n {\n \"name\": \"Product Catalog\",\n \"description\": \"Display phones with images, prices, specs. Filter by brand, price, features. Search by name.\",\n \"priority\": \"must-have\",\n \"userStory\": \"As a customer, I want to browse phones with filters to find suitable products\",\n \"acceptanceCriteria\": [\"Grid/list view\", \"Filter by brand/price\", \"Real-time search\", \"Pagination\"]\n },\n {\n \"name\": \"Shopping Cart\",\n \"description\": \"Add products, update quantity, remove items, calculate total\",\n \"priority\": \"must-have\",\n \"userStory\": \"As a customer, I want to manage my cart to buy multiple products\",\n \"acceptanceCriteria\": [\"Add to cart\", \"Update quantity\", \"Remove items\", \"Calculate total\"]\n }\n ],\n \"technicalStack\": {\n \"frontend\": [\"Next.js\", \"TypeScript\", \"Tailwind\"],\n \"backend\": [\"Node.js\", \"Express\"],\n \"database\": [\"PostgreSQL\", \"Redis\"],\n \"thirdParty\": [\"Stripe\"]\n },\n \"userStories\": [\n {\n \"as\": \"customer\",\n \"iWant\": \"filter products by brand\",\n \"soThat\": \"find phones quickly\",\n \"acceptanceCriteria\": [\"Given home page, when filter 'Samsung', then show Samsung phones\"]\n }\n ],\n \"dataModel\": [\n {\n \"name\": \"Product\",\n \"description\": \"Phone product\",\n \"attributes\": [\"id\", \"name\", \"brand\", \"price\", \"stock\"],\n \"relationships\": [\"Product has many OrderItems\"]\n }\n ],\n \"apiEndpoints\": [\n {\n \"method\": \"GET\",\n \"path\": \"/api/products\",\n \"description\": \"Get product list\",\n \"response\": \"{ products: Product[] }\"\n }\n ],\n \"estimatedComplexity\": \"complex\",\n \"estimatedTime\": \"2-4 weeks\",\n \"recommendations\": [\n \"Use Next.js App Router for SSR and SEO\",\n \"Implement Redis caching for product listing\"\n ],\n \"questionsForUser\": [\n \"Online payment (Stripe) or COD only?\",\n \"Multi-language support needed?\"\n ]\n}\n\nCRITICAL:\n- VALID JSON ONLY (no markdown)\n- COMPREHENSIVE MVP features\n- Use user's language throughout\n- SPECIFIC technical recommendations\n- Realistic feature prioritization";
|
|
2
|
-
//# sourceMappingURL=ba-it-analyzer.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// import {orchestratorAgent} from './orchestrator.js';
|
|
2
2
|
import { claudeAgent } from './claude-agent.js';
|
|
3
|
-
import {
|
|
3
|
+
import { OllamaAgent } from './ollama-agent.js';
|
|
4
4
|
import { geminiAgent } from './gemini-agent.js';
|
|
5
5
|
/**
|
|
6
6
|
* Select appropriate agent based on Galaxy config
|
|
@@ -11,13 +11,27 @@ export function selectAgent(config) {
|
|
|
11
11
|
const agentArray = config.agent;
|
|
12
12
|
if (!agentArray || agentArray.length === 0) {
|
|
13
13
|
console.warn('⚠️ No agents configured. Using Ollama agent as default.');
|
|
14
|
-
return
|
|
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
|
+
// Check if primaryAgent is defined
|
|
31
|
+
if (!primaryAgent) {
|
|
32
|
+
console.warn('⚠️ No valid agent found. Using Ollama agent as default.');
|
|
33
|
+
return new OllamaAgent();
|
|
15
34
|
}
|
|
16
|
-
// For VSCode: skip 'manual' and find first working agent (claude, gemini, or ollama)
|
|
17
|
-
// For CLI: 'manual' is preferred and orchestrator is used
|
|
18
|
-
const primaryAgent = agentArray.find((a) => a.type === 'claude' || a.type === 'gemini' || a.type === 'ollama') ??
|
|
19
|
-
agentArray.find((a) => a.type === 'manual') ??
|
|
20
|
-
agentArray[0];
|
|
21
35
|
switch (primaryAgent.type) {
|
|
22
36
|
case 'claude':
|
|
23
37
|
// Use Claude Agent with full tool access
|
|
@@ -27,20 +41,11 @@ export function selectAgent(config) {
|
|
|
27
41
|
return geminiAgent.instance;
|
|
28
42
|
case 'ollama':
|
|
29
43
|
// Use Ollama Agent with full tool access
|
|
30
|
-
return
|
|
31
|
-
case 'manual':
|
|
32
|
-
// Manual mode - orchestrator not implemented for VSCode yet
|
|
33
|
-
// Fall back to Gemini if available
|
|
34
|
-
const fallbackAgent = agentArray.find((a) => a.type === 'gemini' || a.type === 'claude' || a.type === 'ollama');
|
|
35
|
-
if (fallbackAgent) {
|
|
36
|
-
console.warn('⚠️ Manual mode not supported in VSCode. Using', fallbackAgent.type);
|
|
37
|
-
return selectAgent({ ...config, agent: [fallbackAgent] });
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
44
|
+
return new OllamaAgent(primaryAgent);
|
|
40
45
|
default:
|
|
41
46
|
// Default to Ollama agent
|
|
42
47
|
console.warn('⚠️ Unknown agent type. Using Ollama agent.');
|
|
43
|
-
return
|
|
48
|
+
return new OllamaAgent();
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -53,6 +58,10 @@ export function getAgentDescription(config) {
|
|
|
53
58
|
}
|
|
54
59
|
// Find manual agent first, otherwise use first agent
|
|
55
60
|
const primaryAgent = agentArray.find((a) => a.type === 'manual') ?? agentArray[0];
|
|
61
|
+
// Check if primaryAgent is defined
|
|
62
|
+
if (!primaryAgent) {
|
|
63
|
+
return 'Ollama (default)';
|
|
64
|
+
}
|
|
56
65
|
switch (primaryAgent.type) {
|
|
57
66
|
case 'claude':
|
|
58
67
|
return 'Claude';
|
|
@@ -73,4 +82,3 @@ export function agentSupportsTools() {
|
|
|
73
82
|
// All agents support tools
|
|
74
83
|
return true;
|
|
75
84
|
}
|
|
76
|
-
//# sourceMappingURL=agent-selector.js.map
|
|
@@ -2,38 +2,53 @@ import { ToolRegistry } from '../tools/index.js';
|
|
|
2
2
|
import { ClaudeConnection } from '../connections/claude.js';
|
|
3
3
|
import { buildUniversalAgentPrompt } from '../prompts/index.js';
|
|
4
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
5
|
constructor(config) {
|
|
6
|
+
Object.defineProperty(this, "connection", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: void 0
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(this, "toolsRegistry", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
configurable: true,
|
|
15
|
+
writable: true,
|
|
16
|
+
value: new ToolRegistry()
|
|
17
|
+
});
|
|
18
|
+
// Low-level tools for Claude to build software
|
|
19
|
+
Object.defineProperty(this, "toolNames", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: [
|
|
24
|
+
'file_read',
|
|
25
|
+
'file_write',
|
|
26
|
+
'file_tree',
|
|
27
|
+
'file_list',
|
|
28
|
+
'file_search',
|
|
29
|
+
'git_status',
|
|
30
|
+
'git_commit',
|
|
31
|
+
'git_push',
|
|
32
|
+
'git_pull',
|
|
33
|
+
'git_diff',
|
|
34
|
+
'git_log',
|
|
35
|
+
'git_branches',
|
|
36
|
+
'command_run',
|
|
37
|
+
'install_dependencies',
|
|
38
|
+
'test_run',
|
|
39
|
+
'document_parse',
|
|
40
|
+
'plan_task',
|
|
41
|
+
'progress_reporter',
|
|
42
|
+
// Galaxy UI Integration
|
|
43
|
+
'galaxy_ui_list',
|
|
44
|
+
'galaxy_ui_search',
|
|
45
|
+
'galaxy_ui_get_component',
|
|
46
|
+
'galaxy_ui_categories',
|
|
47
|
+
'galaxy_ui_add',
|
|
48
|
+
'galaxy_ui_init',
|
|
49
|
+
'galaxy_ui_docs',
|
|
50
|
+
]
|
|
51
|
+
});
|
|
37
52
|
// Build system prompt using shared universal prompt
|
|
38
53
|
const toolsContext = this.toolsRegistry.getToolsContext(this.toolNames);
|
|
39
54
|
const systemPrompt = buildUniversalAgentPrompt(toolsContext);
|
|
@@ -104,4 +119,3 @@ export const claudeAgent = {
|
|
|
104
119
|
return _claudeAgent;
|
|
105
120
|
},
|
|
106
121
|
};
|
|
107
|
-
//# sourceMappingURL=claude-agent.js.map
|
|
@@ -9,40 +9,65 @@ import { GeminiConnection } from '../connections/gemini.js';
|
|
|
9
9
|
import { ToolRegistry } from '../tools/index.js';
|
|
10
10
|
import { buildUniversalAgentPrompt } from '../prompts/index.js';
|
|
11
11
|
export class GeminiAgent {
|
|
12
|
-
connection;
|
|
13
|
-
toolsRegistry = new ToolRegistry();
|
|
14
|
-
conversationHistory = [];
|
|
15
|
-
systemPrompt;
|
|
16
|
-
// Low-level tools for Gemini to build software
|
|
17
|
-
toolNames = [
|
|
18
|
-
'file_read',
|
|
19
|
-
'file_write',
|
|
20
|
-
'file_tree',
|
|
21
|
-
'file_list',
|
|
22
|
-
'file_search',
|
|
23
|
-
'git_status',
|
|
24
|
-
'git_commit',
|
|
25
|
-
'git_push',
|
|
26
|
-
'git_pull',
|
|
27
|
-
'git_diff',
|
|
28
|
-
'git_log',
|
|
29
|
-
'git_branches',
|
|
30
|
-
'command_run',
|
|
31
|
-
'install_dependencies',
|
|
32
|
-
'test_run',
|
|
33
|
-
'document_parse',
|
|
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, "toolsRegistry", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
configurable: true,
|
|
22
|
+
writable: true,
|
|
23
|
+
value: new ToolRegistry()
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(this, "conversationHistory", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
configurable: true,
|
|
28
|
+
writable: true,
|
|
29
|
+
value: []
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(this, "systemPrompt", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: void 0
|
|
36
|
+
});
|
|
37
|
+
// Low-level tools for Gemini to build software
|
|
38
|
+
Object.defineProperty(this, "toolNames", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
configurable: true,
|
|
41
|
+
writable: true,
|
|
42
|
+
value: [
|
|
43
|
+
'file_read',
|
|
44
|
+
'file_write',
|
|
45
|
+
'file_tree',
|
|
46
|
+
'file_list',
|
|
47
|
+
'file_search',
|
|
48
|
+
'git_status',
|
|
49
|
+
'git_commit',
|
|
50
|
+
'git_push',
|
|
51
|
+
'git_pull',
|
|
52
|
+
'git_diff',
|
|
53
|
+
'git_log',
|
|
54
|
+
'git_branches',
|
|
55
|
+
'command_run',
|
|
56
|
+
'install_dependencies',
|
|
57
|
+
'test_run',
|
|
58
|
+
'document_parse',
|
|
59
|
+
'plan_task',
|
|
60
|
+
'progress_reporter',
|
|
61
|
+
// Galaxy UI Integration
|
|
62
|
+
'galaxy_ui_list',
|
|
63
|
+
'galaxy_ui_search',
|
|
64
|
+
'galaxy_ui_get_component',
|
|
65
|
+
'galaxy_ui_categories',
|
|
66
|
+
'galaxy_ui_add',
|
|
67
|
+
'galaxy_ui_init',
|
|
68
|
+
'galaxy_ui_docs',
|
|
69
|
+
]
|
|
70
|
+
});
|
|
46
71
|
// Build system prompt using shared universal prompt
|
|
47
72
|
const toolsContext = this.toolsRegistry.getToolsContext(this.toolNames);
|
|
48
73
|
this.systemPrompt = buildUniversalAgentPrompt(toolsContext);
|
|
@@ -141,4 +166,3 @@ export const geminiAgent = {
|
|
|
141
166
|
return _geminiAgent;
|
|
142
167
|
},
|
|
143
168
|
};
|
|
144
|
-
//# sourceMappingURL=gemini-agent.js.map
|
|
@@ -10,4 +10,3 @@ export { ClaudeAgent } from './claude-agent.js';
|
|
|
10
10
|
export { OllamaAgent } from './ollama-agent.js';
|
|
11
11
|
export { GeminiAgent } from './gemini-agent.js';
|
|
12
12
|
export { selectAgent, getAgentDescription, agentSupportsTools, type AgentInterface, } from './agent-selector.js';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -10,4 +10,3 @@ export { ClaudeAgent } from './claude-agent.js';
|
|
|
10
10
|
export { OllamaAgent } from './ollama-agent.js';
|
|
11
11
|
export { GeminiAgent } from './gemini-agent.js';
|
|
12
12
|
export { selectAgent, getAgentDescription, agentSupportsTools, } from './agent-selector.js';
|
|
13
|
-
//# sourceMappingURL=index.js.map
|