import type { MalformedRunInfo } from './ports/workflow-port'; import type { RecordId } from './types/validated/collection'; import type { AwaitingInputReason, ErrorKind } from './types/validated/step-outcome'; import type { z } from 'zod'; export declare function causeMessage(error: unknown): string | undefined; export declare function extractErrorMessage(err?: unknown): string | undefined; export declare abstract class WorkflowExecutorError extends Error { readonly userMessage: string; cause?: unknown; errorKind?: ErrorKind; static readonly defaultErrorKind?: ErrorKind; errorSourceStepIndex?: number; constructor(message: string, userMessage?: string); } export declare abstract class NotFoundError extends WorkflowExecutorError { } export declare abstract class AccessDeniedError extends WorkflowExecutorError { } export declare abstract class UnavailableError extends WorkflowExecutorError { } export declare abstract class WorkflowConfigurationError extends WorkflowExecutorError { static readonly defaultErrorKind: ErrorKind; } export declare abstract class WorkflowOperatorError extends WorkflowExecutorError { static readonly defaultErrorKind: ErrorKind; } export declare abstract class WorkflowCallSiteError extends WorkflowExecutorError { static readonly defaultErrorKind: ErrorKind; } export declare class MissingToolCallError extends WorkflowExecutorError { constructor(); } export declare class MalformedToolCallError extends WorkflowExecutorError { readonly toolName: string; constructor(toolName: string, details: string); } export declare class RecordNotFoundError extends WorkflowOperatorError { constructor(collectionName: string, recordId: RecordId); } export declare class NoRecordsError extends WorkflowOperatorError { constructor(); } export declare class NoReadableFieldsError extends WorkflowConfigurationError { constructor(collectionName: string); } export declare class NoResolvedFieldsError extends WorkflowExecutorError { constructor(fieldNames: string[]); } export declare class NoWritableFieldsError extends WorkflowConfigurationError { constructor(collectionName: string); } export declare class NoActionsError extends WorkflowConfigurationError { constructor(collectionName: string); } export declare class UnsupportedActionFormError extends WorkflowExecutorError { constructor(actionDisplayName: string); } export declare class ActionFormValidationError extends WorkflowOperatorError { readonly backendMessage?: string; constructor(actionName: string, cause?: unknown, backendMessage?: string); } export declare class ActionRequiresApprovalError extends WorkflowOperatorError { readonly roleIdsAllowedToApprove?: number[]; constructor(actionName: string, roleIdsAllowedToApprove?: number[]); } export declare class ApprovalRequestCreationError extends WorkflowExecutorError { constructor(actionName: string, cause?: unknown); } export declare class RunStorePortError extends UnavailableError { constructor(operation: string, cause: unknown); } export declare class NoRelationshipFieldsError extends WorkflowConfigurationError { constructor(collectionName: string); } export declare class RelatedRecordNotFoundError extends WorkflowOperatorError { constructor(collectionName: string, relationName: string); } export declare class InvalidAIResponseError extends WorkflowExecutorError { constructor(message: string); } export declare class InvalidAiRequestError extends WorkflowConfigurationError { constructor(message: string); } export declare class RelationNotFoundError extends WorkflowExecutorError { constructor(name: string, collectionName: string); } export declare class FieldNotFoundError extends WorkflowExecutorError { constructor(name: string, collectionName: string); } export declare class PinnedArgNotFoundError extends WorkflowConfigurationError { constructor(kind: 'field' | 'action', name: string, collectionName: string); } export declare class FieldTypeMissingError extends WorkflowConfigurationError { constructor(name: string, collectionName: string); } export declare class ActionNotFoundError extends WorkflowExecutorError { constructor(name: string, collectionName: string); } export declare class StepStateError extends WorkflowExecutorError { constructor(message: string); } export declare class ActivityLogCreationError extends WorkflowExecutorError { constructor(cause: unknown); } export declare class StepTimeoutError extends WorkflowExecutorError { constructor(timeoutS: number); } export declare function isAiConfigurationError(error: unknown): boolean; export declare class AiModelUnusableError extends WorkflowConfigurationError { constructor(model: string, cause: Error); } export declare class AiInvokeTimeoutError extends WorkflowExecutorError { constructor(timeoutS: number); } export declare class AiAssistUnavailableError extends WorkflowExecutorError { readonly reason: unknown; constructor(reason: unknown); } export declare class NoMcpToolsError extends WorkflowExecutorError { constructor(requestedMcpServerId: string); } export declare class McpToolsNotAllowedError extends WorkflowConfigurationError { constructor(mcpServerId: string, missingTools: string[]); } export declare class McpToolNotFoundError extends WorkflowExecutorError { constructor(name: string); } export declare class McpToolCallLimitError extends WorkflowExecutorError { constructor(limit: number); } export declare class AgentPortError extends WorkflowExecutorError { constructor(operation: string, cause: unknown, agentMessage?: string); } export type SegmentReadFailureKind = 'forbidden' | 'unreachable' | 'overloaded' | 'failed'; export declare class SegmentReadError extends Error { readonly cause: unknown; readonly failure: SegmentReadFailureKind; readonly httpStatus?: number; readonly agentDetail?: string; constructor(operation: string, cause: unknown, details: { failure: SegmentReadFailureKind; httpStatus?: number; agentDetail?: string; agentMessage?: string; }); } export declare class SchemaNotCachedError extends WorkflowExecutorError { constructor(collectionName: string); } export declare class WorkflowPortError extends UnavailableError { constructor(operation: string, cause: unknown); } export declare class AiModelPortError extends WorkflowExecutorError { constructor(operation: string, cause: unknown); } export declare class McpToolInvocationError extends WorkflowExecutorError { constructor(toolName: string, cause: unknown); } export declare class ConfigurationError extends Error { constructor(message: string); } export declare class OAuthReauthRequiredError extends WorkflowExecutorError { readonly awaitingInputReason: AwaitingInputReason; constructor(mcpServerId: string, awaitingInputReason?: AwaitingInputReason); } export declare class OAuthRefreshError extends WorkflowExecutorError { constructor(message: string, cause?: unknown); } export declare class OAuthInvalidGrantError extends WorkflowExecutorError { constructor(detail?: string); } export declare class InvalidTokenEndpointError extends WorkflowExecutorError { constructor(reason: string); } export declare class ExecutorEncryptionKeyMissingError extends Error { readonly code = "executor_encryption_key_missing"; constructor(); } export declare class RunNotFoundError extends NotFoundError { constructor(runId: string, cause?: unknown); } export declare class UserMismatchError extends AccessDeniedError { constructor(runId: string, bearerUserId: number, ownerUserId: number); } export declare class RunAlreadyInFlightError extends WorkflowExecutorError { constructor(runId: string); } export declare class PendingDataNotFoundError extends Error { constructor(runId: string, stepIndex: number); } export interface ValidationIssue { path: (string | number)[]; message: string; code: string; } export declare class InvalidPendingDataError extends WorkflowExecutorError { readonly issues: ValidationIssue[]; constructor(issues: ValidationIssue[]); } export declare class InvalidPreRecordedArgsError extends WorkflowConfigurationError { constructor(detail: string); } export declare class SourceRecordMissingError extends WorkflowExecutorError { constructor(sourceTitle?: string, options?: { errorKind?: ErrorKind; errorSourceStepIndex?: number; }); } export declare class SourceRecordCollectionMismatchError extends WorkflowCallSiteError { constructor(recordCollectionName: string, calledWorkflowCollectionName: string); } export declare class SourceRecordStepNotReachedError extends WorkflowCallSiteError { constructor(pinnedStepId: string); } export declare class AgentProbeError extends Error { readonly cause?: unknown; constructor(message: string, options?: { cause?: unknown; }); } export declare class AutomatedInboxGoneError extends Error { readonly inboxId: string; readonly operation: string; readonly detail?: string; constructor(inboxId: string, operation: string, detail?: string); } export declare class UnreadableAutomatedInboxListingError extends Error { readonly cause: z.ZodError; constructor(forestServerUrl: string, zodError: z.ZodError); } export declare class SegmentRecordIdMissingError extends Error { constructor(collectionName: string); } export declare class CompositeRecordIdMismatchError extends Error { constructor(recordId: string, expectedParts: number); } export declare class UnsupportedStepTypeError extends WorkflowExecutorError { constructor(stepType: string); } export declare class RecordIdSerializationError extends WorkflowExecutorError { constructor(part: string); } export declare class InvalidStepDefinitionError extends WorkflowExecutorError { constructor(detail: string); } export declare class HydrationFailedError extends WorkflowExecutorError { constructor(detail: string); } export declare class DomainValidationError extends WorkflowExecutorError { readonly issues: ReadonlyArray<{ path: string; message: string; }>; constructor(runId: number, zodError: z.ZodError); } export declare class MalformedRunError extends WorkflowExecutorError { readonly info: MalformedRunInfo; constructor(info: MalformedRunInfo); } //# sourceMappingURL=errors.d.ts.map