From c618174e60e4632d36d7352d83399508c72b2f42 Mon Sep 17 00:00:00 2001 From: soryu Date: Tue, 27 Jan 2026 11:04:20 +0000 Subject: Add Red Team CLI command and frontend UI (#39) * Add Red Team CLI command and frontend UI Backend additions: - Add `makima red-team notify` CLI command for red team tasks - Add RedTeamCommand enum with Notify subcommand - Add red_team API client module for notify endpoint - Add RedTeamNotifyArgs with severity, task, file, context options Frontend additions: - Add ContractCreateModal with red team toggle and prompt input - Update ContractDetail with red-team tab for notifications - Update ContractList with red team enabled badge - Add TypeScript types for RedTeamNotification and related interfaces Co-Authored-By: Claude Opus 4.5 * Add CSS styles for Red Team frontend components Add comprehensive styling for: - Contract list and detail containers - Red team badge styling with gradient backgrounds - Tab navigation with red team specific styling - Red team notifications panel with severity indicators - Contract creation modal form elements - Task badges for supervisor and red team roles Co-Authored-By: Claude Opus 4.5 * Fix missing local_only field in TUI CreateContractRequest Add the missing local_only field to the CreateContractRequest struct initialization in the TUI contract creation handler. Co-Authored-By: Claude Opus 4.5 * [WIP] Heartbeat checkpoint - 2026-01-27 03:07:28 UTC --------- Co-authored-by: Claude Opus 4.5 --- frontend/src/types.ts | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) (limited to 'frontend/src/types.ts') diff --git a/frontend/src/types.ts b/frontend/src/types.ts index c6d1263..ac8d417 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -9,3 +9,98 @@ export type Choice = { id: string label: string } + +// Contract types +export type ContractType = 'simple' | 'specification' | 'execute' +export type ContractPhase = 'research' | 'specify' | 'plan' | 'execute' | 'review' +export type ContractStatus = 'active' | 'completed' | 'archived' + +export interface ContractSummary { + id: string + name: string + description?: string + contractType: string + phase: string + status: string + supervisorTaskId?: string + localOnly: boolean + fileCount: number + taskCount: number + repositoryCount: number + version: number + createdAt: string + // Red team fields + redTeamEnabled?: boolean +} + +export interface Contract { + id: string + ownerId: string + name: string + description?: string + contractType: string + phase: string + status: string + supervisorTaskId?: string + autonomousLoop: boolean + phaseGuard: boolean + completedDeliverables: Record + localOnly: boolean + redTeamEnabled: boolean + redTeamPrompt?: string + version: number + createdAt: string + updatedAt: string +} + +export interface CreateContractRequest { + name: string + description?: string + contractType?: string + initialPhase?: string + autonomousLoop?: boolean + phaseGuard?: boolean + localOnly?: boolean + redTeamEnabled?: boolean + redTeamPrompt?: string +} + +export interface TaskSummary { + id: string + contractId?: string + contractName?: string + contractPhase?: string + contractStatus?: string + parentTaskId?: string + depth: number + name: string + status: string + priority: number + progressSummary?: string + subtaskCount: number + version: number + isSupervisor: boolean + isRedTeam: boolean + hidden: boolean + createdAt: string + updatedAt: string +} + +// Red team notification types +export type NotificationSeverity = 'info' | 'warning' | 'critical' + +export interface RedTeamNotification { + id: string + contractId: string + redTeamTaskId: string + relatedTaskId?: string + message: string + severity: NotificationSeverity + filePath?: string + context?: string + delivered: boolean + deliveredAt?: string + acknowledged: boolean + acknowledgedAt?: string + createdAt: string +} -- cgit v1.2.3