chore: bump version to v2.33.4 and apply manual stabilization updates

This commit is contained in:
g1nation
2026-05-01 19:23:30 +09:00
parent ddb96e6407
commit fad4725008
7 changed files with 387 additions and 87 deletions
+73 -2
View File
@@ -12,6 +12,15 @@ export interface BrainProfile {
description?: string;
}
export type MultiAgentStageInput = 'original' | 'previous' | 'combined';
export interface MultiAgentStageConfig {
id: string;
name: string;
prompt: string;
input?: MultiAgentStageInput;
}
// ─── 에이전트 설정 인터페이스 (통합 버전) ───
export interface IAgentConfig {
ollamaUrl: string;
@@ -26,8 +35,46 @@ export interface IAgentConfig {
maxAutoSteps: number;
dryRun: boolean;
multiAgentEnabled: boolean;
multiAgentWorkflow: MultiAgentStageConfig[];
memoryEnabled: boolean;
memoryShortTermMessages: number;
memoryMediumTermSessions: number;
memoryLongTermFiles: number;
}
export const DEFAULT_MULTI_AGENT_WORKFLOW: MultiAgentStageConfig[] = [
{
id: 'planner',
name: 'Planner',
input: 'original',
prompt: [
'You are the [Master Strategist & Planner].',
'Transform the user request into a precise execution blueprint.',
'Output Markdown with Objective, Core Challenges, Data Requirements, and Step-by-Step Tasks.'
].join('\n')
},
{
id: 'researcher',
name: 'Researcher',
input: 'combined',
prompt: [
'You are the [Senior Technical Researcher].',
'Extract, filter, and synthesize high-signal facts from the plan and available context.',
'Output Key Facts, Technical Deep-Dive, Gaps, and Summary of Knowledge.'
].join('\n')
},
{
id: 'writer',
name: 'Writer',
input: 'combined',
prompt: [
'You are the [Lead Synthesis Writer & Editor].',
'Produce the final response in the user language with a clear conclusion and actionable recommendation.',
'Preserve important technical nuance without padding.'
].join('\n')
}
];
// ─── 경로 정규화 유틸리티 ───
function normalizePath(p: string): string {
if (!p) return p;
@@ -50,6 +97,21 @@ function toBrainProfile(raw: Partial<BrainProfile> | undefined, fallbackIndex: n
};
}
function toMultiAgentStage(raw: Partial<MultiAgentStageConfig> | undefined, fallbackIndex: number): MultiAgentStageConfig | null {
if (!raw) return null;
const prompt = typeof raw.prompt === 'string' ? raw.prompt.trim() : '';
if (!prompt) return null;
const input = raw.input === 'original' || raw.input === 'previous' || raw.input === 'combined'
? raw.input
: 'combined';
return {
id: (raw.id || `stage-${fallbackIndex + 1}`).trim(),
name: (raw.name || `Stage ${fallbackIndex + 1}`).trim(),
prompt,
input
};
}
// ─── VS Code 설정에서 읽어오는 값 (통합 구현) ───
export function getConfig(): IAgentConfig {
const cfg = vscode.workspace.getConfiguration('g1nation');
@@ -58,9 +120,13 @@ export function getConfig(): IAgentConfig {
const legacyBrainPath = cfg.get<string>('localBrainPath', '');
const legacyBrainRepo = cfg.get<string>('secondBrainRepo', '');
const configuredProfiles = cfg.get<Partial<BrainProfile>[]>('brainProfiles', []);
const configuredWorkflow = cfg.get<Partial<MultiAgentStageConfig>[]>('multiAgentWorkflow', DEFAULT_MULTI_AGENT_WORKFLOW);
const profiles = configuredProfiles
.map((profile, index) => toBrainProfile(profile, index))
.filter((profile): profile is BrainProfile => !!profile);
const multiAgentWorkflow = configuredWorkflow
.map((stage, index) => toMultiAgentStage(stage, index))
.filter((stage): stage is MultiAgentStageConfig => !!stage);
if (profiles.length === 0) {
const fallbackPath = normalizePath(legacyBrainPath) || path.join(os.homedir(), '.g1nation-brain');
@@ -99,7 +165,12 @@ export function getConfig(): IAgentConfig {
maxContextSize: cfg.get<number>('maxContextSize', 12000),
maxAutoSteps: cfg.get<number>('maxAutoSteps', 50),
dryRun: cfg.get<boolean>('dryRun', false),
multiAgentEnabled: cfg.get<boolean>('multiAgentEnabled', true)
multiAgentEnabled: cfg.get<boolean>('multiAgentEnabled', true),
multiAgentWorkflow: multiAgentWorkflow.length > 0 ? multiAgentWorkflow : DEFAULT_MULTI_AGENT_WORKFLOW,
memoryEnabled: cfg.get<boolean>('memoryEnabled', true),
memoryShortTermMessages: Math.max(0, cfg.get<number>('memoryShortTermMessages', 8)),
memoryMediumTermSessions: Math.max(0, cfg.get<number>('memoryMediumTermSessions', 5)),
memoryLongTermFiles: Math.max(0, cfg.get<number>('memoryLongTermFiles', 6))
};
}
@@ -154,4 +225,4 @@ export const EXCLUDED_DIRS = new Set([
'node_modules', '.git', '.vscode', 'out', 'dist', 'build',
'.next', '.cache', '__pycache__', '.DS_Store', 'coverage',
'.turbo', '.nuxt', '.output', 'vendor', 'target'
]);
]);