Integrates main branch changes (headquarters dashboard, task retry count, agent prompt persistence, remote sync improvements) with the initiative's errand agent feature. Both features coexist in the merged result. Key resolutions: - Schema: take main's errands table (nullable projectId, no conflictFiles, with errandsRelations); migrate to 0035_faulty_human_fly - Router: keep both errandProcedures and headquartersProcedures - Errand prompt: take main's simpler version (no question-asking flow) - Manager: take main's status check (running|idle only, no waiting_for_input) - Tests: update to match removed conflictFiles field and undefined vs null
16 lines
718 B
TypeScript
16 lines
718 B
TypeScript
import type { Errand, NewErrand } from '../schema.js';
|
|
|
|
export type ErrandStatus = 'active' | 'pending_review' | 'conflict' | 'merged' | 'abandoned';
|
|
export type ErrandWithAlias = Errand & { agentAlias: string | null };
|
|
|
|
export type CreateErrandData = Omit<NewErrand, 'createdAt' | 'updatedAt'>;
|
|
export type UpdateErrandData = Partial<Omit<NewErrand, 'id' | 'createdAt'>>;
|
|
|
|
export interface ErrandRepository {
|
|
create(data: CreateErrandData): Promise<Errand>;
|
|
findById(id: string): Promise<ErrandWithAlias | undefined>;
|
|
findAll(opts?: { projectId?: string; status?: ErrandStatus }): Promise<ErrandWithAlias[]>;
|
|
update(id: string, data: UpdateErrandData): Promise<Errand>;
|
|
delete(id: string): Promise<void>;
|
|
}
|