/** * Workflow authoring (2026-10): reply to a workflow comment that mentions the * agent, planning + drafting + validating the definition iteratively. * * Mirrors the board assistant (`board-reply.ts`): a full harness run with the * agent's workflow authoring MCP tools (`workflow_spec`, `read_workflow`, * `create_workflow`, `update_workflow`, `validate_workflow`, * `enable_workflow`, `run_workflow`, `add_comment`). The agent edits the * definition itself and posts its reply as a comment on the workflow; this * loop only guarantees a fallback acknowledgement if the harness never posted * one. */ import type { TeamshareApi } from '../api'; import type { HarnessName } from '../harness/harness-adapter'; export interface WorkflowAuthorLlm { baseUrl: string; apiKey: string; model: string; temperature?: number; maxTokens?: number; } export interface WorkflowAuthorOptions { harness: HarnessName; echo?: boolean; effort?: string; onLog: (line: string, stream?: 'stdout' | 'stderr') => void; cwd?: string; sessionId?: string; agentId: string; timeoutMin?: number; commentId?: string; llm: WorkflowAuthorLlm; } /** * Runs the workflow author for one waking comment. Returns how many replies * were produced (0 = nothing to answer / already answered). */ export declare function runWorkflowAuthorReply(api: TeamshareApi, agentId: string, workflowId: string, mention: string, opts: WorkflowAuthorOptions): Promise<{ replied: number; skipped: number; }>;