File size: 2,872 Bytes
3f76ff4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
837e3ac
 
 
 
 
 
 
3f76ff4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
837e3ac
 
 
 
 
 
 
 
 
3f76ff4
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
export type WorkPackagePhase =
  | "Stakeholder Needs"
  | "Specify Product"
  | "Design Product"
  | "Verify and Validate Product";

export type WorkPackageStatus = "todo" | "in_progress" | "done";
export type WorkPackagePriority = "low" | "medium" | "high";

export type TaskType =
  | "research"
  | "planning"
  | "generation"
  | "testing"
  | "design"
  | "analysis"
  | "review"
  | "compliance"
  | "risk";

export type OutputType =
  | "text"
  | "table"
  | "code"
  | "image_prompt"
  | "design_brief"
  | "test_case"
  | "checklist"
  | "risk_table"
  | "bom"
  | "sbom"
  | "feature_list";

export type ExecutionMode = "simulated" | "real";

export type WorkPackageTask = {
  id: string;
  title: string;
  description: string;
  type: TaskType;
  executable: boolean;
  status: WorkPackageStatus;
};

export type WorkPackageOutput = {
  id: string;
  title: string;
  type: OutputType;
  content: string;
  createdAt: string;
  sourceTaskId?: string | null;
  executionMode: ExecutionMode;
  disclaimer: string;
};

export type WorkPackageDeliverable = {
  name: string;
  required: boolean | string;
  description?: string;
};

export type WorkPackage = {
  id: string;
  title: string;
  shortName: string;
  phase: WorkPackagePhase;
  objective: string;
  inputFiles: string[];
  outputFiles: string[];
  coreSections: string[];
  deliverables?: WorkPackageDeliverable[];
  tasks: WorkPackageTask[];
  outputs: WorkPackageOutput[];
  status: WorkPackageStatus;
  priority: WorkPackagePriority;
};

export type CommandMode = "ask" | "plan" | "change" | "execute";
export type ResolvedCommandMode = CommandMode | "board_automation";
export type ChatScope = "global" | "package";
export type ChatProvider = "mock" | "live";
export type BoardMutationPolicy =
  | "none"
  | "selected_package_only"
  | "replace_all";

export type ParsedCommand = {
  referencedPackageName?: string;
  mode?: CommandMode;
  instruction: string;
};

export type ChatRole = "user" | "assistant";

export type ChatMessage = {
  id: string;
  role: ChatRole;
  content: string;
  createdAt: string;
};

export type AgentLogLevel = "info" | "success" | "warn" | "error";

export type AgentLogEntry = {
  id: string;
  title: string;
  detail: string;
  level: AgentLogLevel;
  createdAt: string;
};

export type ResolvedChatContext = {
  scope: ChatScope;
  workPackageId: string | null;
  workPackageTitle: string | null;
  mode: ResolvedCommandMode;
  provider: ChatProvider;
  boardMutationPolicy: BoardMutationPolicy;
};

export type ConnectionStatus =
  | "idle"
  | "checking"
  | "connected"
  | "error";

export const SIMULATED_EXECUTION_DISCLAIMER =
  "This is a simulated execution result generated for demo purposes. No real external tool, engineering review, certification approval, user database, image generation service, patent search, or test system was executed.";