refactor: remove dead code and unoptimized structures

This commit is contained in:
2026-05-06 12:12:37 +09:00
parent ef8fd086dd
commit 9115935eaf
7 changed files with 2 additions and 210 deletions
-38
View File
@@ -39,44 +39,6 @@ export function getAstraDataDir(): string {
return astraDir;
}
/**
* .astra 내부의 특정 파일 경로를 반환합니다.
*
* @param filename - 파일 이름 (예: 'project_memory.json', 'tasks.json')
* @returns 파일의 절대 경로
*/
export function getAstraFilePath(filename: string): string {
return path.join(getAstraDataDir(), filename);
}
/**
* .astra 내부의 프로젝트별 서브디렉토리 경로를 반환합니다.
* 프로젝트별 메모리 분리가 필요한 경우 사용합니다.
*
* @param projectId - 프로젝트 식별자 (hash 또는 이름)
* @returns 프로젝트별 .astra 서브디렉토리 경로
*/
export function getAstraProjectDir(projectId: string): string {
const projDir = path.join(getAstraDataDir(), 'projects', projectId);
if (!fs.existsSync(projDir)) {
fs.mkdirSync(projDir, { recursive: true });
}
return projDir;
}
/**
* AAL(Autonomous Loop) 태스크 파일의 경로를 반환합니다.
*/
export function getAstraTaskFilePath(): string {
return getAstraFilePath('tasks.json');
}
/**
* AAL 프로토콜 설정 파일 경로를 반환합니다.
*/
export function getAstraProtocolPath(): string {
return getAstraFilePath('protocol.json');
}
/**
* extensionUri가 아직 설정되지 않은 경우의 fallback.
+1 -8
View File
@@ -1,10 +1,3 @@
/**
* IDataSource: 데이터 원천에 대한 추상화 인터페이스 (DIP 준수)
*/
export interface IDataSource<T> {
fetch(): Promise<T[]>;
}
/**
* 집계 결과 타입 정의
*/
@@ -15,7 +8,7 @@ export interface AggregateResult {
average?: number;
}
export interface AggregateOptions {
interface AggregateOptions {
collectValues?: boolean;
}
+1 -5
View File
@@ -2,7 +2,7 @@
* g1nation Custom Error Classes
*/
export abstract class G1Error extends Error {
abstract class G1Error extends Error {
constructor(public message: string, public details?: any) {
super(message);
this.name = this.constructor.name;
@@ -29,10 +29,6 @@ export class APICommunicationError extends G1Error {
getTypeCode() { return 'API_COMMUNICATION_ERROR'; }
}
export class SecurityValidationError extends G1Error {
getTypeCode() { return 'SECURITY_VALIDATION_ERROR'; }
}
export class TransactionError extends G1Error {
getTypeCode() { return 'TRANSACTION_ERROR'; }
}