CoDEVX / lib /work-package-types.ts
CodexMacTiger
feat: live package-scoped chat and thinking logs
837e3ac
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.";