import type { RequestOptions } from "../base-client"; import type { RequestBuilder } from "../request-builder"; /** A reference to a file in Storage for multimodal agent input. */ export interface FileInput { /** The UUID of the storage file (from `storage.requestUpload`). */ storage_file_id: string; /** Optional label for this file (used in the LLM prompt as "--- File: {label} ---"). */ label?: string; } /** A pipeline resource. */ export interface Pipeline { id: string; name: string; description: string | null; application_id: string | null; workspace_id: string | null; trigger_type: "manual" | "event" | "schedule"; system_slug: string | null; is_active: boolean; workflow_type: "build" | "troubleshoot" | "security_scan" | "analyze" | "evaluate" | "custom" | null; workflow_label: string | null; pipeline_nodes_count: number; inserted_at: string; updated_at: string; } /** Attributes for creating a new pipeline. */ export interface CreatePipelineAttributes { /** Pipeline name. */ name: string; /** Optional description. */ description?: string; /** Application that owns this pipeline. */ application_id?: string; /** Workspace scope (null = application-level). */ workspace_id?: string; /** How the pipeline is triggered: manual, event, or schedule. */ trigger_type?: "manual" | "event" | "schedule"; /** Stable identifier that survives database resets. Immutable after creation. Unique per application. */ system_slug?: string; /** Workflow classification for ISV portal routing. */ workflow_type?: "build" | "troubleshoot" | "security_scan" | "analyze" | "evaluate" | "custom"; /** Human-readable workflow label for display. */ workflow_label?: string; /** DAG node graph definition. */ nodes: Record; depends_on?: string[]; /** Optional condition — when false, node is skipped. */ condition?: { /** Dot-path into execution context (e.g., "pipeline_input.input_mode") */ field: string; /** Comparison operator */ op: "eq" | "neq" | "in" | "present"; /** Expected value(s) — not required for "present" */ value?: string | number | boolean | string[]; }; } | { type: "approval"; description?: string; depends_on: string[]; }>; /** Whether the pipeline is active. */ is_active?: boolean; } /** Attributes for updating a pipeline. */ export interface UpdatePipelineAttributes { name?: string; description?: string; nodes?: CreatePipelineAttributes["nodes"]; is_active?: boolean; trigger_type?: "manual" | "event" | "schedule"; /** Workflow classification for ISV portal routing. */ workflow_type?: "build" | "troubleshoot" | "security_scan" | "analyze" | "evaluate" | "custom"; /** Human-readable workflow label for display. */ workflow_label?: string; } /** Attributes for triggering a pipeline execution. */ export interface TriggerPipelineAttributes { /** Workspace context for execution. */ workspace_id: string; /** Input data passed to the first pipeline node. */ input?: Record; /** Optional file references for multimodal pipeline input. */ file_inputs?: FileInput[]; } /** * Creates the pipelines namespace for managing agent execution pipelines. * * @param rb - The request builder used for API communication. * @returns Pipelines namespace with CRUD + trigger methods. * * @example * ```typescript * // Create a pipeline * const pipeline = await admin.pipelines.create({ * name: "Post-Session Pipeline", * application_id: appId, * nodes: { * metrics: { agent_id: metricsAgentId, inputs: {}, depends_on: [] }, * goals: { agent_id: goalsAgentId, inputs: { context: "metrics.output" }, depends_on: ["metrics"] }, * }, * }); * * // Trigger execution * const result = await admin.pipelines.trigger(pipeline.id, { * workspace_id: wsId, * input: { transcript: "..." }, * }); * ``` */ export declare function createPipelinesNamespace(rb: RequestBuilder): { /** * List all pipelines. * * @param options - Optional request options. * @returns Array of pipelines. */ list(options?: RequestOptions): Promise; /** * Get a pipeline by ID. * * @param id - Pipeline UUID. * @param options - Optional request options. * @returns Pipeline resource. */ get(id: string, options?: RequestOptions): Promise; /** * Get a pipeline by its system slug, scoped to an application. * * @param slug - Pipeline system slug. * @param options - Optional request options. * @returns Pipeline resource, or not-found error. * * @example * ```typescript * const pipeline = await admin.pipelines.getBySlug("post-session-documentation"); * ``` */ getBySlug(slug: string, options?: RequestOptions): Promise; /** * Create a new pipeline. * * @param attributes - Pipeline configuration including node DAG. * @param options - Optional request options. * @returns Created pipeline resource. */ create(attributes: CreatePipelineAttributes, options?: RequestOptions): Promise; /** * Update an existing pipeline. * * @param id - Pipeline UUID. * @param attributes - Fields to update. * @param options - Optional request options. * @returns Updated pipeline resource. */ update(id: string, attributes: UpdatePipelineAttributes, options?: RequestOptions): Promise; /** * Delete a pipeline. * * @param id - Pipeline UUID. * @param options - Optional request options. */ delete(id: string, options?: RequestOptions): Promise; /** * List pipelines filtered by workflow type. * * @param workflowType - One of: 'build' | 'troubleshoot' | 'security_scan' | 'analyze' | 'evaluate' | 'custom' * @param options - Optional request options. * @returns Array of pipelines matching the workflow type. * * @example * ```typescript * const pipelines = await admin.pipelines.listByWorkflowType('build'); * ``` */ listByWorkflowType(workflowType: "build" | "troubleshoot" | "security_scan" | "analyze" | "evaluate" | "custom", options?: RequestOptions): Promise; /** * Trigger pipeline execution. * * @param id - Pipeline UUID. * @param attributes - Execution parameters including workspace_id and input. * @param options - Optional request options. * @returns `{ execution_id: string }` — async. Use `pipelineExecutions.get()` to poll status. */ trigger(id: string, attributes: TriggerPipelineAttributes, options?: RequestOptions): Promise; }; //# sourceMappingURL=pipelines.d.ts.map