import type { AccountRef, AgentPermissionMode, AgentProvider, AgentSandbox, AgentWorktreeMode, CreateWorkflowInput, LoopTemplateSource, LoopTemplateSummary, TimeoutMs } from "../types.js"; export { BOUNDED_AGENT_WORKER_VERIFIER_TEMPLATE_ID, DETERMINISTIC_CHECK_CREATE_TASK_TEMPLATE_ID, EVENT_WORKER_VERIFIER_TEMPLATE_ID, INCIDENT_RESPONSE_TEMPLATE_ID, KNOWLEDGE_REFRESH_TEMPLATE_ID, PR_REVIEW_TEMPLATE_ID, REPORT_ONLY_TEMPLATE_ID, ROUTING_REMEDIATION_TEMPLATE_ID, SCHEDULED_AUDIT_TEMPLATE_ID, TASK_LIFECYCLE_TEMPLATE_ID, TODOS_TASK_WORKER_VERIFIER_TEMPLATE_ID, } from "./template-kit.js"; import type { CustomLoopTemplateImportOptions, CustomLoopTemplateImportResult } from "./templates-custom.js"; export type { CustomLoopTemplateImportOptions, CustomLoopTemplateImportResult } from "./templates-custom.js"; /** Agent/account/worktree fields shared by every agent-backed builtin template input. */ export interface AgentWorkflowTemplateBaseInput { projectPath: string; routeProjectPath?: string; projectGroup?: string; routeScope?: string; routeThrottleLimits?: { maxActive?: number; maxActiveScope?: string; maxActivePerProject?: number; maxActivePerProjectGroup?: number; maxPerProfile?: number; }; provider?: AgentProvider; authProfile?: string; authProfilePool?: string[]; triageAuthProfile?: string; plannerAuthProfile?: string; workerAuthProfile?: string; verifierAuthProfile?: string; account?: AccountRef; accountPool?: AccountRef[]; triageAccount?: AccountRef; plannerAccount?: AccountRef; workerAccount?: AccountRef; verifierAccount?: AccountRef; model?: string; variant?: string; agent?: string; addDirs?: string[]; permissionMode?: AgentPermissionMode; sandbox?: AgentSandbox; allowTools?: string[]; allowCommands?: string[]; safetyReason?: string; manualBreakGlass?: boolean; worktreeMode?: AgentWorktreeMode; worktreeRoot?: string; worktreeBranchPrefix?: string; timeoutMs?: TimeoutMs; verifierIdleTimeoutMs?: number; } export interface TodosTaskWorkflowTemplateInput extends AgentWorkflowTemplateBaseInput { taskId: string; taskTitle?: string; taskDescription?: string; todosProjectPath?: string; prHandoff?: boolean; prReviewRouting?: PrReviewRoutingTemplateContext; eventId?: string; eventType?: string; } export interface PrReviewRoutingTemplateContext { required?: boolean; allowed?: boolean; reason?: string; author?: string; reviewers?: string[]; selectedReviewer?: string; signals?: string[]; } export interface EventWorkflowTemplateInput extends AgentWorkflowTemplateBaseInput { eventId: string; eventType: string; eventSource: string; eventSubject?: string; eventMessage?: string; eventJson: string; } export interface BoundedAgentWorkflowTemplateInput extends AgentWorkflowTemplateBaseInput { name?: string; objective: string; prompt?: string; } export interface RoutingRemediationWorkflowTemplateInput extends AgentWorkflowTemplateBaseInput { todosProjectPath?: string; doctorJsonPath?: string; doctorProject?: string; tag?: string; status?: string; shard?: string; limit?: string; maxRepairs?: number; dryRun?: boolean; idempotencyKey?: string; evidenceDir?: string; undoDir?: string; /** * Conversations channel that routing-health blocker findings are summarised to. * Defaults to {@link ROUTING_REMEDIATION_ALERT_CHANNEL}. They are never filed as tasks. */ alertChannel?: string; } export type LoopTemplateSourceFilter = LoopTemplateSource | "all"; export interface ListLoopTemplatesOptions { source?: LoopTemplateSourceFilter; } export declare function loopTemplatesDir(): string; export declare function validateCustomLoopTemplateFile(file: string): LoopTemplateSummary; export declare function importCustomLoopTemplate(file: string, opts?: CustomLoopTemplateImportOptions): CustomLoopTemplateImportResult; export declare function validateLoopTemplateRegistry(opts?: ListLoopTemplatesOptions): { ok: true; templates: LoopTemplateSummary[]; customDir: string; }; export declare function listLoopTemplates(opts?: ListLoopTemplatesOptions): LoopTemplateSummary[]; export declare function getLoopTemplate(id: string, opts?: ListLoopTemplatesOptions): LoopTemplateSummary | undefined; export declare function renderTodosTaskWorkerVerifierWorkflow(input: TodosTaskWorkflowTemplateInput): CreateWorkflowInput; export declare function renderTaskLifecycleWorkflow(input: TodosTaskWorkflowTemplateInput): CreateWorkflowInput; export declare function renderRoutingRemediationWorkflow(input: RoutingRemediationWorkflowTemplateInput): CreateWorkflowInput; export declare function renderEventWorkerVerifierWorkflow(input: EventWorkflowTemplateInput): CreateWorkflowInput; export declare function renderBoundedAgentWorkerVerifierWorkflow(input: BoundedAgentWorkflowTemplateInput): CreateWorkflowInput; export declare function renderLoopTemplate(id: string, values: Record, opts?: ListLoopTemplatesOptions): CreateWorkflowInput;