Contracts crate — shared domain types #2
Labels
No labels
area:config
area:contracts
area:engine
area:eventsourcing
area:frontend
area:git
area:ipc
area:persistence
area:provider
area:scaffold
area:terminal
type:user-story
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/peon#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As a backend or frontend developer, I want a
contractscrate containing all shared domain types (Project, Thread, Turn, Message, Checkpoint, enums, read model, git types, terminal types, keybinding types), so that both sides of the application use a single source of truth for data structures.Acceptance criteria
Orchestration types (
orchestration.rs)Projectstruct with fields:id: Uuid,name: String,path: String,created_at: DateTime<Utc>Threadstruct with fields:id,project_id,title: Option<String>,provider: Provider,model: String,runtime_mode: RuntimeMode,status: ThreadStatus,created_at,updated_atProviderenum:Claude,CodexRuntimeModeenum:FullAccess,SupervisedThreadStatusenum:Idle,Running,AwaitingApproval,Error(String),CompletedTurnstruct with all fields from spec §4.1TurnStatusenum:Running,Completed,Interrupted,Failed(String)Messagestruct withid,turn_id,role: MessageRole,content: MessageContent,created_atMessageRoleenum:User,Assistant,Tool,SystemMessageContentenum:Text,ToolCall,ToolResult,ThinkingBlockCheckpointstruct with all fields from spec §4.1OrchestrationReadModelstruct withprojects,threads,turns_by_thread,checkpoints_by_thread,active_thread_id,active_project_idGit types (
git.rs)GitStatus,FileChange,FileChangeStatus,FileDiff,DiffHunk,DiffLine,CommitInfo,BranchInfo— all as per spec §8.3Terminal types (
terminal.rs)TerminalStatusenum:Starting,Running,StoppedKeybinding types (
keybindings.rs)Keybinding,KeySpec,KeyScopestructs/enums as per spec §11.1Quality
Debug, Clone, Serialize, Deserializeserde,uuid,chrono,serde_jsonas dependencies (no heavy deps)Out of scope
AppCommand,AppEvent) — those live inbackend::ipc(see issue for IPC/bootstrap)OrchestrationEvent) — see event sourcing storyReferences