feat(agent-office): API helpers, route, Lab entry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
11
src/api.js
11
src/api.js
@@ -588,3 +588,14 @@ export function deleteBrandLink(id) {
|
|||||||
return apiDelete(`/api/blog-marketing/links/${id}`);
|
return apiDelete(`/api/blog-marketing/links/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Agent Office ──────────────────────────────────
|
||||||
|
export const getAgents = () => apiGet('/api/agent-office/agents');
|
||||||
|
export const getAgentDetail = (id) => apiGet(`/api/agent-office/agents/${id}`);
|
||||||
|
export const updateAgentConfig = (id, body) => apiPut(`/api/agent-office/agents/${id}`, body);
|
||||||
|
export const getAgentTasks = (id, limit=20) => apiGet(`/api/agent-office/agents/${id}/tasks?limit=${limit}`);
|
||||||
|
export const getAgentLogs = (id, limit=50) => apiGet(`/api/agent-office/agents/${id}/logs?limit=${limit}`);
|
||||||
|
export const getPendingTasks = () => apiGet('/api/agent-office/tasks/pending');
|
||||||
|
export const sendAgentCommand = (agent, action, params={}) => apiPost('/api/agent-office/command', { agent, action, params });
|
||||||
|
export const approveAgentTask = (agent, task_id, approved, feedback='') => apiPost('/api/agent-office/approve', { agent, task_id, approved, feedback });
|
||||||
|
export const getAgentStates = () => apiGet('/api/agent-office/states');
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,17 @@ const LAB_ITEMS = [
|
|||||||
icon: '📅',
|
icon: '📅',
|
||||||
status: 'live',
|
status: 'live',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'agent-office',
|
||||||
|
path: '/agent-office',
|
||||||
|
title: 'Agent Office',
|
||||||
|
category: 'AI · 자동화',
|
||||||
|
desc: 'AI 에이전트들이 사무실에서 자동으로 작업하는 가상 오피스',
|
||||||
|
tags: ['Canvas 2D', 'WebSocket', 'AI Agent', 'Telegram'],
|
||||||
|
accent: '#8b5cf6',
|
||||||
|
icon: '🏢',
|
||||||
|
status: 'wip',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const STATUS_LABEL = {
|
const STATUS_LABEL = {
|
||||||
|
|||||||
@@ -117,6 +117,15 @@ export const navLinks = [
|
|||||||
icon: <IconTodo />,
|
icon: <IconTodo />,
|
||||||
accent: '#f472b6',
|
accent: '#f472b6',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'agent-office',
|
||||||
|
label: 'Agent Office',
|
||||||
|
path: '/agent-office',
|
||||||
|
subtitle: 'AI LAB',
|
||||||
|
description: 'AI 에이전트 사무실',
|
||||||
|
icon: <span style={{fontSize:'1.2em'}}>🏢</span>,
|
||||||
|
accent: '#8b5cf6',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const appRoutes = [
|
export const appRoutes = [
|
||||||
@@ -172,4 +181,8 @@ export const appRoutes = [
|
|||||||
path: 'todo',
|
path: 'todo',
|
||||||
element: <Todo />,
|
element: <Todo />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'agent-office',
|
||||||
|
lazy: () => import('./pages/agent-office/AgentOffice'),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user