import { TeamshareApi } from './api'; import type { StashResult } from './git/git-runner'; export interface RunReportInput { api: TeamshareApi; projectId: string; taskId: string; agentId: string; taskTitle: string; /** 'orchestrator' = required per policy; 'build' = advisory. */ kind: 'orchestrator' | 'build'; status: string; summary: string; /** Extra fact lines (branch, worktree, exit codes, attempts, git outcome). */ details?: string[]; gitLine?: string; /** Stash results from git-runner — displayed in ## Git Stash section. */ stashResults?: StashResult[]; log?: (text: string, level?: 'stdout' | 'stderr') => void; } /** Per-task report path: ~/.teamshare/reports/.md */ export declare function getReportPath(taskId: string): string; /** Success, or the final sanitized error so callers can surface WHY the * report never landed in Documents (previously console-only). */ export type RunReportResult = { ok: true; id: string; name: string; } | { ok: false; error: string; }; /** * Reads the agent-written report.md (or falls back to a template) and * saves it as a note document. Never throws - orchestrator callers treat * `{ ok: false }` as mandatory-failure and post the reason to the task. */ export declare function saveRunReport(input: RunReportInput): Promise;