/**
 * @module        tick
 * @description   主 tick 循环命令，协调调度、流水线、QA 和监控引擎的周期性执行
 *
 * @author        eddy
 * @organization  wykj
 * @ownership     wykj/eddy
 *
 * @created       2026-03-19
 * @updated       2026-04-03
 *
 * @role          command
 * @layer         command
 * @boundedContext pipeline
 *
 * @trigger       sps tick <project> [--interval N] [--once] [--json]
 * @inputs        项目名、执行间隔、单次/循环模式、JSON 输出标志
 * @outputs       每轮 tick 的调度/流水线/QA/监控结果
 * @workflow      1. 获取锁 → 2. 加载引擎 → 3. 循环执行 scheduler→pipeline→QA→monitor → 4. 释放锁
 */
import { ProjectContext } from '../core/context.js';
import { Logger } from '../core/logger.js';
import { ProjectPipelineAdapter } from '../core/projectPipelineAdapter.js';
import { MonitorEngine } from '../engines/MonitorEngine.js';
import { SchedulerEngine } from '../engines/SchedulerEngine.js';
import { StageEngine } from '../engines/StageEngine.js';
import type { Notifier } from '../interfaces/Notifier.js';
import type { TaskBackend } from '../interfaces/TaskBackend.js';
import { createAgentRuntime } from '../providers/registry.js';
export interface ProjectRunner {
    project: string;
    ctx: ProjectContext;
    pipelineAdapter: ProjectPipelineAdapter;
    log: Logger;
    taskBackend: TaskBackend;
    notifier: Notifier;
    agentRuntime: ReturnType<typeof createAgentRuntime> | null;
    workerManager: import('../manager/worker-manager-impl.js').WorkerManagerImpl;
    scheduler: SchedulerEngine;
    stages: StageEngine[];
    monitor: MonitorEngine;
    done: boolean;
    fatalError: boolean;
    tickNum: number;
    idleCount: number;
}
/**
 * Execute the unified tick command.
 *
 * Supports multiple projects in a single process:
 *   sps tick project-a project-b project-c
 *
 * Each project is fully isolated (own context, providers, engines, lock, state).
 * Manager modules (Supervisor, CompletionJudge) are shared globally.
 * Projects are ticked sequentially within each cycle. One project's error
 * does not affect others.
 *
 */
export declare function executeTick(projects: string[], flags: Record<string, boolean>): Promise<void>;
/**
 * Build a one-line heartbeat string for idle ticks. Describes whether any
 * workers are active and what they're doing so operators can distinguish
 * "tick alive, just waiting on claude" from "tick died".
 *
 * Exported for unit testing. Production code calls it via the idle branch in
 * the main tick loop.
 */
export declare function buildHeartbeat(runner: ProjectRunner): string;
//# sourceMappingURL=tick.d.ts.map