import { TeamshareApi, Task } from "./api"; export interface BriefOptions { /** Legacy: no longer used for doc content (names-only in compact brief). */ maxDocChars?: number; } /** Builds the Markdown brief the working session sees. */ export declare function fetchTaskBrief(api: TeamshareApi, taskId: string, opts?: BriefOptions): Promise; /** Best-effort heartbeat wrapper - never throws. */ export declare function reportStatus(api: TeamshareApi, agentId: string, status: "online" | "working" | "offline", taskId?: string, sessionId?: string): Promise; /** * Deterministically moves a picked-up task to `in_progress`. The bridge owns * this transition (it must not depend on the harness/LLM). Only writes when the * task is still `open`, so a resumed or already-progressing task is never * disturbed. Best-effort: never throws; returns true when the write succeeded. */ export declare function markTaskInProgress(api: TeamshareApi, taskId: string, currentStatus?: string): Promise; /** * Reopens a task after a failed / incomplete run (in_progress -> open) so it * can be retried. Best-effort and never throws; the caller guards it to tasks * the bridge itself moved to in_progress. */ export declare function reopenRunTask(api: TeamshareApi, taskId: string): Promise; /** Posts the closing summary comment - best-effort, never throws. */ export declare function postClosingComment(api: TeamshareApi, taskId: string, summary: string): Promise; /** Waits for the task to leave open/in_progress, or times out. */ export declare function waitForTaskCompletion(api: TeamshareApi, taskId: string, pollMs?: number, maxWaitMs?: number, onProgress?: (status: string) => void): Promise;