/** * L3 Progressive Disclosure — Programmatic SDK API. * * Provides a code-level interface for controlling SEVO pipelines. * Users can create pipelines, advance stages, query status, and * manage the full lifecycle programmatically. * * (spec §FR-15, AC-15.4) */ import type { StageId, TaskLevel, ArtifactRef } from '../types/index.js'; import type { ActionLevelConfig, ActionLevel } from '../config.js'; import { PipelineEngineFacade, type AdvanceResult, type PipelineEngineOptions, type PipelineLifecycle } from '../pipeline-engine/pipeline-engine.js'; import { CustomStageRegistry, type CustomStageDefinition } from './custom-stage.js'; /** Options for creating a pipeline via the SDK. */ export interface CreatePipelineOptions { slug: string; description: string; level: TaskLevel; } /** Options for completing a stage via the SDK. */ export interface CompleteStageOptions { pipelineId: string; stageId: StageId; outcome: 'passed' | 'failed'; artifacts?: ArtifactRef[]; failureReason?: string; } /** Pipeline status returned by the SDK. */ export interface PipelineStatusInfo { pipelineId: string; slug: string; description: string; level: TaskLevel; lifecycle: PipelineLifecycle; currentStage: StageId | null; stages: StageId[]; createdAt: string; updatedAt: string; } /** SDK configuration options. */ export interface SevoSDKOptions { /** Options passed to the underlying PipelineEngine. */ engineOptions?: PipelineEngineOptions; } /** * Programmatic SDK for controlling SEVO pipelines (L3 Progressive Disclosure). * * Wraps PipelineEngineFacade and CustomStageRegistry into a unified, * user-facing API surface. * * Core operations: * - createPipeline(): Create a new pipeline * - advanceStage(): Advance to the next stage * - completeStage(): Complete a stage with a result * - getStatus(): Query pipeline status * - pause() / resume() / cancel(): Lifecycle management * - registerCustomStage(): L2 custom stage registration */ export declare class SevoSDK { private readonly engine; private readonly customStages; constructor(options?: SevoSDKOptions); /** * Create a new pipeline. * Routes the task based on level and initializes the stage queue. */ createPipeline(options: CreatePipelineOptions): PipelineStatusInfo; /** * Advance a pipeline to the next stage. * If the pipeline is in 'created' state, activates the first stage. * If running, evaluates the current gate and advances if passed. */ advanceStage(pipelineId: string): AdvanceResult; /** * Complete a stage with a result, then auto-advance. * This is the primary API for driving the pipeline forward. */ completeStage(options: CompleteStageOptions): AdvanceResult; /** * Get the current status of a pipeline. */ getStatus(pipelineId: string): PipelineStatusInfo; /** * List all pipelines. */ listPipelines(): PipelineStatusInfo[]; /** * Pause a running pipeline. */ pause(pipelineId: string): PipelineStatusInfo; /** * Resume a paused pipeline. */ resume(pipelineId: string): PipelineStatusInfo; /** * Cancel a pipeline. */ cancel(pipelineId: string): PipelineStatusInfo; /** * Register a custom stage (L2 capability exposed via L3 API). */ registerCustomStage(definition: CustomStageDefinition): import("./custom-stage.js").CustomStageRegistrationResult; /** * Unregister a custom stage. */ unregisterCustomStage(stageId: string): boolean; /** * List all registered custom stages. */ listCustomStages(): CustomStageDefinition[]; /** * AC-15.7: Classify an operation into an action level. * Returns the level (L0/L1/L2) and whether confirmation is required. */ classifyAction(operation: string, customLevels?: ActionLevelConfig): { level: ActionLevel; requiresConfirmation: boolean; notifyAfter: boolean; }; /** * Get the underlying PipelineEngineFacade for advanced operations. */ getEngine(): PipelineEngineFacade; /** * Get the custom stage registry for direct manipulation. */ getCustomStageRegistry(): CustomStageRegistry; private toStatusInfo; } //# sourceMappingURL=sdk.d.ts.map