refactor: migrate server provisioning to Cloud Orchestrator service
- Remove Queue-based server provisioning (moved to cloud-orchestrator) - Add manage_server tool with Service Binding to Cloud Orchestrator - Add CDN cache hit rate estimation based on tech_stack - Always display bandwidth info (show "포함 범위 내" when no overage) - Add language auto-detection (ko, ja, zh, en) - Update system prompt to always call tools fresh - Add Server System documentation to CLAUDE.md BREAKING: Server provisioning now requires cloud-orchestrator service Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,18 +56,17 @@ const SuggestDomainsArgsSchema = z.object({
|
||||
});
|
||||
|
||||
const ManageServerArgsSchema = z.object({
|
||||
action: z.enum(['recommend', 'list_specs', 'order', 'my_servers', 'server_info', 'cancel_order']),
|
||||
purpose: z.string().max(500).optional(),
|
||||
budget: z.number().positive().max(100000000).optional(),
|
||||
spec_id: z.number().int().positive().optional(),
|
||||
order_id: z.number().int().positive().optional(),
|
||||
region: z.string().max(50).optional(),
|
||||
label: z.string().max(100).optional(),
|
||||
provider: z.enum(['linode', 'vultr']).optional(),
|
||||
expected_users: z.number().int().positive().max(1000000).optional(),
|
||||
daily_traffic: z.number().int().positive().max(100000000).optional(),
|
||||
storage_needs_gb: z.number().positive().max(10000).optional(),
|
||||
tech_stack: z.string().max(200).optional(),
|
||||
action: z.enum(['recommend', 'order', 'start', 'stop', 'delete', 'list']),
|
||||
tech_stack: z.array(z.string().min(1).max(100)).max(20).optional(),
|
||||
expected_users: z.number().int().positive().optional(),
|
||||
use_case: z.string().min(1).max(500).optional(),
|
||||
traffic_pattern: z.enum(['steady', 'burst', 'high']).optional(),
|
||||
region_preference: z.array(z.string().min(1).max(50)).max(10).optional(),
|
||||
budget_limit: z.number().positive().optional(),
|
||||
lang: z.enum(['ko', 'en']).optional(),
|
||||
server_id: z.string().min(1).max(100).optional(),
|
||||
region_code: z.string().min(1).max(50).optional(),
|
||||
label: z.string().min(1).max(100).optional(),
|
||||
});
|
||||
|
||||
// All tools array (used by OpenAI API)
|
||||
@@ -97,7 +96,7 @@ export const TOOL_CATEGORIES: Record<string, string[]> = {
|
||||
export const CATEGORY_PATTERNS: Record<string, RegExp> = {
|
||||
domain: /도메인|네임서버|whois|dns|tld|등록|\.com|\.net|\.io|\.kr|\.org/i,
|
||||
deposit: /입금|충전|잔액|계좌|예치금|송금|돈/i,
|
||||
server: /서버|VPS|호스팅|클라우드|리눅스|우분투|인스턴스|가상서버|Linode|Vultr|VM/i,
|
||||
server: /서버|VPS|클라우드|호스팅|인스턴스|linode|vultr/i,
|
||||
weather: /날씨|기온|비|눈|맑|흐림|더워|추워/i,
|
||||
search: /검색|찾아|뭐야|뉴스|최신/i,
|
||||
};
|
||||
@@ -221,7 +220,7 @@ export async function executeTool(
|
||||
logger.error('Invalid server args', new Error(result.error.message), { args });
|
||||
return `❌ Invalid arguments: ${result.error.issues.map(e => e.message).join(', ')}`;
|
||||
}
|
||||
return executeManageServer(result.data, env, telegramUserId, db, env?.CLOUD_DB);
|
||||
return executeManageServer(result.data, env, telegramUserId);
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user