v4.3.5: gateway 폴더 구조 정리 — routes/channels/mocks/errors/tasks/automation 서브디렉토리 분리
- src/gateway/ 76개 .ts 파일 중 55개를 종류별 서브디렉토리로 이동 (routes/ 35, channels/ 4, mocks/ 3, errors/ 5, tasks/ 8, automation/ 3) - 루트엔 server.ts(server-v2.ts에서 개명) 포함 21개 핵심 인프라 파일만 유지 - gateway 내부 상대경로 import 101곳 + 외부 참조 5곳(cli/index.ts, tools/kakao.ts, tools/pptx.ts, tools/shell.ts, tools/task-control.ts)을 스크립트로 재계산, 빌드/재시작/26개 엔드포인트 스모크테스트로 검증 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import fs from 'fs';
|
||||
import { ToolResult } from '../types.js';
|
||||
import { getConfig } from '../config/config.js';
|
||||
import { getVault } from '../security/vault.js';
|
||||
import { KakaoNotify, registerKakaoImageToken } from '../gateway/kakao-notify.js';
|
||||
import { KakaoNotify, registerKakaoImageToken } from '../gateway/channels/kakao-notify.js';
|
||||
|
||||
const KAKAO_IMAGE_EXTS: Record<string, string> = {
|
||||
'.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg',
|
||||
|
||||
+2
-2
@@ -446,9 +446,9 @@ async function searchPixabay(query: string, apiKey: string): Promise<ImageHit |
|
||||
* Korean queries. Lazy-imported so pptx.ts doesn't pull Playwright at boot.
|
||||
*/
|
||||
async function searchBrowser(query: string): Promise<ImageHit | null> {
|
||||
let bt: typeof import('../gateway/browser-tools.js');
|
||||
let bt: typeof import('../gateway/automation/browser-tools.js');
|
||||
try {
|
||||
bt = await import('../gateway/browser-tools.js');
|
||||
bt = await import('../gateway/automation/browser-tools.js');
|
||||
} catch (e: any) {
|
||||
console.log(`[pptx] Browser fallback: import failed: ${e.message}`);
|
||||
return null;
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ export async function executeShell(args: ShellToolArgs): Promise<ToolResult> {
|
||||
|
||||
try {
|
||||
// Lazy-load node-pty (63MB native module) only when shell is actually invoked
|
||||
const { default: PTYManager } = await import('../gateway/pty-manager.js');
|
||||
const { default: PTYManager } = await import('../gateway/automation/pty-manager.js');
|
||||
const pty = PTYManager.getInstance();
|
||||
const output = await pty.runCommand(args.command);
|
||||
return {
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
deleteTask,
|
||||
type TaskRecord,
|
||||
type TaskStatus,
|
||||
} from '../gateway/task-store.js';
|
||||
} from '../gateway/tasks/task-store.js';
|
||||
|
||||
const VALID_STATUSES: TaskStatus[] = [
|
||||
'queued', 'running', 'paused', 'stalled', 'needs_assistance',
|
||||
|
||||
Reference in New Issue
Block a user