summaryrefslogtreecommitdiff
path: root/frontend/src/types.ts
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-27 11:04:20 +0000
committerGitHub <noreply@github.com>2026-01-27 11:04:20 +0000
commitc618174e60e4632d36d7352d83399508c72b2f42 (patch)
treefbca74b921a57165aea046b959a44ab00589532f /frontend/src/types.ts
parentb6f239c19f0d3130515f3745f842e17a69212295 (diff)
downloadsoryu-c618174e60e4632d36d7352d83399508c72b2f42.tar.gz
soryu-c618174e60e4632d36d7352d83399508c72b2f42.zip
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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> * [WIP] Heartbeat checkpoint - 2026-01-27 03:07:28 UTC --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'frontend/src/types.ts')
-rw-r--r--frontend/src/types.ts95
1 files changed, 95 insertions, 0 deletions
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<string, string[]>
+ 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
+}