/** * Task-file read-back (file → server), the other half of the two-way sync for * BOTH task files: * - SECURITY_TASKS.md (kind=secret) → POST /api/secrets/tasks/status * - CODE_TASKS.md (kind=code) → POST /api/code/tasks/status * * The server renders each file and enqueues its write (intent-drain); here we * parse the user's/AI's edits and push status changes back. One generalized * parser + push handles both kinds (routed by the anchor's `kind`), so there is * no duplicated read-back logic. Runs on the same cadence as the intent drain. * * The only machine-parsed line per task is the anchor: * - [x] status: `rotated` … (secret) * - [x] status: `done` … (code) * We read the checkbox, the `status:` token, the id, and the original `was=`, * and only push tasks the user actually changed (intent !== was). Robust to * hand edits: reordering, extra prose, and malformed lines are all tolerated. */ export type TaskKind = 'secret' | 'code' | 'team'; export interface TaskEdit { kind: TaskKind; id: string; was: string; intent: string; } export declare function isTeamTaskStatus(v: string | undefined): boolean; /** Parse one anchor line into a TaskEdit, or null if it isn't a task anchor. */ export declare function parseAnchorLine(line: string): TaskEdit | null; /** All tasks the user actually changed in the file (intent !== was). */ export declare function parseTaskFile(content: string): TaskEdit[]; export interface PushResult { files: number; pushedTasks: number; } /** * For one logged-in server: for each task-file kind, ask which project paths are * tracked, and for each that has a locally-edited task file, parse and push the * changes. Best-effort — errors on one file never abort the others. */ export declare function pushProjectTaskStatuses(base: string, authHeaders: Record, opts?: { verbose?: boolean; }): Promise; export interface TeamTaskLite { id: string; title: string; status: string; assigneeSub?: string | null; projectId?: string; } /** Render assigned team tasks as TEAM_TASKS.md (anchored for push-back). */ export declare function renderTeamTasksMd(tasks: TeamTaskLite[]): string; /** Parse a TEAM_TASKS.md and return the team-task edits the user actually made. */ export declare function parseTeamTasksFile(content: string): TaskEdit[]; //# sourceMappingURL=project-tasks.d.ts.map