/**
 * @module        services/executors
 * @description   Service port 的 Production executor 实现（Phase 3）
 *
 * @layer         services
 *
 * 和 defaults.ts 同属"glue layer"——集中 Service 层伸进 Domain 的调用点。
 * 这些 executor 让 Console 和 CLI 两条 Delivery 走同一份业务逻辑：
 *   - WorkerExecutor     → 直接调 StageEngine.launchSingle / WorkerManager.kill
 *   - PipelineExecutor   → 直接调 executeStop / executeReset（绕过 CLI spawn）
 *   - ChatExecutor       → 直接用 DaemonClient
 *   - ProjectInitExecutor→ 直接调 executeProjectInit
 *
 * 这样 Console 路由再也不需要 spawn 子 CLI 进程。
 */
import type { ProcessSpawner } from '../infra/spawn.js';
import type { ChatExecutor } from './ChatService.js';
import type { PipelineExecutor, ResetPipelineOpts } from './PipelineService.js';
import type { ProjectInitExecutor, ProjectInitOpts } from './ProjectService.js';
import type { WorkerExecutor } from './WorkerService.js';
export declare class DefaultWorkerExecutor implements WorkerExecutor {
    launch(project: string, seq: number): Promise<void>;
    kill(project: string, slot: number): Promise<void>;
}
export declare class DefaultPipelineExecutor implements PipelineExecutor {
    private readonly spawner;
    constructor(spawner: ProcessSpawner);
    stop(project: string): Promise<void>;
    reset(project: string, opts: ResetPipelineOpts): Promise<void>;
    /**
     * v0.50.8：启动前回收遗孤卡片。
     *
     * 场景：上一轮 pipeline 被 stop（或 crash），state.json 里 slot 还显示 active，
     * 卡片停在 Inprogress 带 STARTED-<stage>。下一轮 start 后 MonitorEngine 会打
     * STALE-RUNTIME（SKIP_LABEL），卡片永远跑不起来。
     *
     * 这里一次性清理：移回首阶段 trigger state（通常 Todo）+ 清全部瞬态 labels +
     * reset slot 为 idle + 清 leases。下一轮 tick 就能重新 prepare + 派发。
     */
    recoverOrphans(project: string): Promise<number>;
    /**
     * v0.50.17：slot + lease 清理共用 helper（原版重复 2 次）。
     * 任何 update 异常降级为 console.warn（以前是静默 best-effort）。
     */
    private clearSlotAndLease;
}
export declare class DefaultChatExecutor implements ChatExecutor {
    stopSession(sessionId: string): Promise<void>;
    cancelRun(sessionId: string): Promise<void>;
    stopExactSlot(slot: string): Promise<void>;
}
export declare class DefaultProjectInitExecutor implements ProjectInitExecutor {
    init(project: string, opts: ProjectInitOpts): Promise<void>;
}
//# sourceMappingURL=executors.d.ts.map