CUB-122: Scaffold Control Center React frontend
All checks were successful
Dev Build / build-test (pull_request) Successful in 1m57s
All checks were successful
Dev Build / build-test (pull_request) Successful in 1m57s
This commit is contained in:
54
frontend-legacy/src/app/models/agent.model.ts
Normal file
54
frontend-legacy/src/app/models/agent.model.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
// ============================================================================
|
||||
// Agent Status Types
|
||||
// Per spec Section 7.3: Agent Card Component Interface
|
||||
// ============================================================================
|
||||
|
||||
export type AgentStatus = 'active' | 'idle' | 'thinking' | 'error' | 'offline';
|
||||
|
||||
export interface AgentCardData {
|
||||
/** Short agent ID, e.g., "otto" */
|
||||
id: string;
|
||||
|
||||
/** Display name, e.g., "Otto" */
|
||||
displayName: string;
|
||||
|
||||
/** Role description, e.g., "Orchestrator Agent" */
|
||||
role: string;
|
||||
|
||||
/** Current agent status */
|
||||
status: AgentStatus;
|
||||
|
||||
/** Current task description, e.g., "Reviewing PR #42" */
|
||||
currentTask?: string;
|
||||
|
||||
/** Task progress percentage 0–100 */
|
||||
taskProgress?: number;
|
||||
|
||||
/** Elapsed time string, e.g., "04m 12s" */
|
||||
taskElapsed?: string;
|
||||
|
||||
/** Full session key, e.g., "agent:otto:telegram:direct:8787..." */
|
||||
sessionKey: string;
|
||||
|
||||
/** Communication channel, e.g., "telegram" */
|
||||
channel: string;
|
||||
|
||||
/** Timestamp of last activity */
|
||||
lastActivity: Date;
|
||||
|
||||
/** Error message (populated only on error status) */
|
||||
errorMessage?: string;
|
||||
}
|
||||
|
||||
export interface AgentStatusUpdate {
|
||||
agentId: string;
|
||||
status: AgentStatus;
|
||||
timestamp: Date;
|
||||
}
|
||||
|
||||
export interface TaskProgressUpdate {
|
||||
agentId: string;
|
||||
taskName?: string;
|
||||
progress: number;
|
||||
elapsed?: string;
|
||||
}
|
||||
2
frontend-legacy/src/app/models/index.ts
Normal file
2
frontend-legacy/src/app/models/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './agent.model';
|
||||
export * from './nav.model';
|
||||
19
frontend-legacy/src/app/models/nav.model.ts
Normal file
19
frontend-legacy/src/app/models/nav.model.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
// ============================================================================
|
||||
// Navigation Model
|
||||
// Per spec Section 3.5: Global Navigation Structure
|
||||
// ============================================================================
|
||||
|
||||
export interface NavDestination {
|
||||
label: string;
|
||||
icon: string;
|
||||
route: string;
|
||||
badge?: number;
|
||||
}
|
||||
|
||||
export const NAV_DESTINATIONS: NavDestination[] = [
|
||||
{ label: 'Command Hub', icon: 'bolt', route: '/hub' },
|
||||
{ label: 'Projects', icon: 'assignment', route: '/projects' },
|
||||
{ label: 'Sessions', icon: 'folder_open', route: '/sessions' },
|
||||
{ label: 'Logs', icon: 'bar_chart', route: '/logs' },
|
||||
{ label: 'Settings', icon: 'settings', route: '/settings' },
|
||||
];
|
||||
Reference in New Issue
Block a user