/** Base error class for all cortex-cli errors */ export declare class CortexError extends Error { code: string; details?: Record; constructor(code: string, message: string, details?: Record); } /** ERR-DB-001: Parent directory does not exist */ export declare class DatabaseParentDirMissingError extends CortexError { constructor(path: string); } /** ERR-DB-002: Permission denied */ export declare class DatabasePermissionDeniedError extends CortexError { constructor(path: string, reason?: string); } /** ERR-DB-003: Disk full */ export declare class DatabaseDiskFullError extends CortexError { constructor(path: string); } /** ERR-DB-004: Database file exists but is not valid */ export declare class DatabaseCorruptError extends CortexError { constructor(path: string); } /** ERR-CONN-001: Cannot enable WAL mode */ export declare class ConnectionError extends CortexError { constructor(message: string, details?: Record); } /** ERR-CONN-002: Database busy at open time */ export declare class ConnectionBusyError extends CortexError { constructor(dbPath: string); } /** ERR-MIG-001: Migration SQL fails */ export declare class MigrationError extends CortexError { constructor(message: string, details?: Record); } /** ERR-MIG-002: Schema integrity check failed after migration */ export declare class MigrationIntegrityError extends CortexError { readonly version?: number; readonly missing?: string[]; constructor(versionOrMessage: number | string, missing?: string[]); } /** ERR-MIG-003: Checksum mismatch — blocked state */ export declare class MigrationChecksumMismatchError extends CortexError { constructor(version: number, expected: string, actual: string); } /** ERR-SCHEMA-006: Relation type would have empty from_types or to_types after array update */ export declare class SchemaRelationArrayEmptyError extends CortexError { readonly relationTypeName: string; constructor(relationTypeName: string); } /** ERR-MIGRATION-010: Cannot write YAML file during schema migration */ export declare class MigrationYamlWriteError extends CortexError { readonly filePath: string; constructor(filePath: string, reason: string); } /** ERR-MIGRATION-011: Script execution failed during migration */ export declare class MigrationScriptError extends CortexError { readonly scriptPath: string; constructor(scriptPath: string, reason: string); } /** ERR-MIGRATION-012: Post-migration validation failed */ export declare class MigrationValidationError extends CortexError { constructor(message: string); } /** ERR-LOCK-001: SQLite busy-level contention (DB-level write contention) */ export declare class DatabaseBusyError extends CortexError { constructor(message: string, details?: Record); } /** ERR-LOCK-002: Advisory lock timeout (held by another owner) */ export declare class LockTimeoutError extends CortexError { readonly lockName: string; readonly owner: string; readonly totalWaitMs: number; constructor(lockName: string, owner: string, totalWaitMs: number); } /** ERR-LOCK-003: Retry exhaustion */ export declare class LockRetryExhaustedError extends CortexError { readonly lockName: string; readonly owner: string; readonly retries: number; readonly totalWaitMs: number; constructor(lockName: string, owner: string, retries: number, totalWaitMs: number); } /** ERR-LOCK-004: Lock ordering violation */ export declare class LockOrderingError extends CortexError { readonly lockName: string; readonly earlierName: string; constructor(lockName: string, earlierName: string); } /** ERR-PROJ-001: Duplicate project name in registry */ export declare class DuplicateProjectError extends CortexError { readonly projectName: string; constructor(projectName: string); } /** ERR-PROJ-002: Path already exists (directory) */ export declare class ProjectPathExistsError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-PROJ-003: Empty or whitespace-only project name */ export declare class ProjectEmptyNameError extends CortexError { constructor(); } /** ERR-PROJ-004: Cannot create folder */ export declare class ProjectFolderCreateError extends CortexError { readonly folder: string; constructor(folder: string, reason?: string); } /** ERR-PROJ-005: Folder does not exist */ export declare class ProjectFolderNotFoundError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-PROJ-006: Existing database is corrupt */ export declare class ProjectCorruptDbError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-PROJ-007: Project not found in registry */ export declare class ProjectNotFoundError extends CortexError { readonly projectName: string; constructor(projectName: string); } /** ERR-PROJ-008: Invalid project name format */ export declare class ProjectInvalidNameError extends CortexError { readonly projectName: string; constructor(projectName: string); } /** ERR-PROJ-009: --project name not found in registry */ export declare class ProjectFlagNotFoundError extends ProjectNotFoundError { constructor(projectName: string); } /** ERR-PROJ-011: No project could be resolved */ export declare class ProjectResolutionError extends CortexError { readonly attemptedMethods: string[]; constructor(attemptedMethodsOrMessage: string[] | string); } /** ERR-PROJ-012: Database inaccessible for project */ export declare class ProjectDbInaccessibleError extends CortexError { readonly path: string; constructor(path: string, reason?: string); } /** ERR-PROJ-013: Path exists but is not a directory (file or symlink) */ export declare class ProjectPathNotDirectoryError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-SPRINT-001: Duplicate sprint ID - sprint already exists */ export declare class SprintDuplicateError extends CortexError { readonly sprintId: string; constructor(sprintId: string); } /** ERR-SPRINT-002: Sprint not found */ export declare class SprintNotFoundError extends CortexError { readonly sprintId: string; constructor(sprintId: string); } /** ERR-SPRINT-003: Sprint parameter is invalid (e.g. empty ID) */ export declare class SprintInvalidError extends CortexError { constructor(reason: string); } /** ERR-SPRINT-004: Invalid sprint status transition */ export declare class SprintTransitionError extends CortexError { readonly currentStatus: string; readonly targetStatus: string; readonly allowedTransitions: string[]; constructor(currentStatus: string, targetStatus: string, allowedTransitions: string[]); } /** ERR-SPRINT-005: Target sprint status is not a valid sprint status value */ export declare class SprintBadStatusError extends CortexError { readonly targetStatus: string; constructor(targetStatus: string); } /** ERR-SPRINT-006: No sprint could be resolved (no sprints exist in the project) */ export declare class SprintNoneError extends CortexError { constructor(); } /** ERR-TASK-001: Task not found */ export declare class TaskNotFoundError extends CortexError { readonly taskId: string; constructor(taskId: string, sprintId?: string); } /** ERR-TASK-002: Sprint does not exist or is closed when adding a task */ export declare class TaskBadSprintError extends CortexError { readonly sprintId: string; readonly reason?: string; constructor(sprintId: string, reason?: string); } /** ERR-TASK-003: Owner role is required (empty/null) */ export declare class TaskOwnerRequiredError extends CortexError { constructor(); } /** ERR-TASK-004: Owner role is not a valid role name */ export declare class TaskInvalidOwnerError extends CortexError { readonly owner: string; readonly validRoles: string[]; constructor(owner: string, validRoles: string[]); } /** ERR-TASK-005: Task type is not a valid enum value */ export declare class TaskInvalidTypeError extends CortexError { readonly typeValue: string; constructor(typeValue: string); } /** ERR-TASK-006: Task priority is not a valid enum value */ export declare class TaskInvalidPriorityError extends CortexError { readonly priorityValue: string; constructor(priorityValue: string); } /** ERR-TASK-007: Parent task not found or invalid */ export declare class TaskParentError extends CortexError { readonly parentId: string; readonly reason?: string; constructor(parentId: string, reason?: string); } /** ERR-TASK-008: Invalid task state transition */ /** ERR-TASK-009: Target status is not a valid task status value */ export declare class TaskBadStatusError extends CortexError { readonly targetStatus: string; readonly suggestions?: string[]; constructor(targetStatus: string, suggestions?: string[]); } /** ERR-STAGE-INVALID: Target stage is not a valid stage value */ export declare class StageInvalidError extends CortexError { readonly stage: string; readonly suggestions?: string[]; constructor(stage: string, suggestions?: string[]); } /** ERR-TASK-016: No-op move (task is already in the target state) */ /** ERR-TASK-010: --description is no longer supported; use --content-file */ export declare class TaskDescriptionRemovedError extends CortexError { constructor(); } /** ERR-TASK-011: Captain-only restriction — only captain can own tasks in Planning stage */ /** ERR-TASK-012: Captain-only restriction — only captain can own tasks in Release stage */ /** ERR-TASK-013: Inline content fields removed; use --content-file */ export declare class TaskInlineFieldsRemovedError extends CortexError { constructor(); } /** ERR-TASK-014: Content file not found for task */ export declare class TaskContentFileError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-TASK-NOSPRINT: --sprint required for task show */ export declare class TaskNoSprintError extends CortexError { constructor(); } /** ERR-TASK-BADSPRINT: Sprint not found for task show */ export declare class TaskBadSprintRequiredError extends CortexError { readonly sprintId: string; constructor(sprintId: string); } /** ERR-TASK-BADID: Invalid task ID format (not 4-digit NNNN) */ export declare class TaskBadIdError extends CortexError { readonly taskId: string; constructor(taskId: string); } /** ERR-TASK-DUPID: Duplicate task ID */ export declare class TaskDuplicateIdError extends CortexError { readonly taskId: string; constructor(taskId: string); } /** ERR-TASK-MISSINGID: Missing task ID (required for task add with positional ) */ export declare class TaskMissingIdError extends CortexError { constructor(); } /** ERR-TESTREPORT-NOSPRINT: --sprint required for test-report show */ export declare class TestReportNoSprintError extends CortexError { constructor(); } /** ERR-TESTREPORT-BADSPRINT: Sprint not found for test-report show */ export declare class TestReportBadSprintError extends CortexError { readonly sprintId: string; constructor(sprintId: string); } /** ERR-TESTREPORT-004: Test report not found in sprint */ export declare class TestReportNotInSprintError extends CortexError { readonly reportId: number; readonly sprintId: string; constructor(reportId: number, sprintId: string); } /** ERR-TASK-015: DB write failed; file preserved */ export declare class TaskDbWriteFilePreservedError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-TASK-INVALID-FIELD: Prohibited field passed to task update — use task move instead */ export declare class TaskInvalidFieldError extends CortexError { readonly fieldName: string; constructor(fieldName: string); } /** ERR-TASK-NOACTIVESPRINT: No active sprint — task move requires active sprint */ export declare class TaskNoActiveSprintError extends CortexError { constructor(); } /** ERR-TASK-NOTINACTIVESPRINT: Task does not belong to the active sprint */ export declare class TaskNotInActiveSprintError extends CortexError { readonly taskId: string; constructor(taskId: string); } /** ERR-TASK-MOVE-NOTARGET: task move requires at least one of --to, --stage, or --owner */ export declare class TaskMoveNoTargetError extends CortexError { constructor(); } /** ERR-TASK-BADOWNER: Invalid owner value with closest-match suggestions */ export declare class TaskBadOwnerError extends CortexError { readonly owner: string; readonly suggestions?: string[]; constructor(owner: string, suggestions?: string[]); } /** ERR-TASK-INVALIDTRANSITION: Invalid status transition from current to target */ export declare class TaskInvalidTransitionError extends CortexError { readonly currentStatus: string; readonly targetStatus: string; readonly allowedTransitions: string[]; constructor(currentStatus: string, targetStatus: string, allowedTransitions: string[]); } /** ERR-SPAWN-SPRINT: Sprint phase does not permit spawning (not IN EXECUTION) */ export declare class SpawnSprintError extends CortexError { readonly sprintId: string; readonly sprintStatus: string; constructor(sprintId: string, sprintStatus: string); } /** ERR-SPAWN-STATE: Task state does not permit spawning (not In Progress) */ export declare class SpawnStateError extends CortexError { readonly taskId: string; readonly taskStatus: string; constructor(taskId: string, taskStatus: string); } /** ERR-SPAWN-ROLE: Role mismatch for spawn operation */ export declare class SpawnRoleError extends CortexError { readonly requiredRole: string; readonly providedRole: string; constructor(requiredRole: string, providedRole: string); } /** ERR-CLI-001: Unknown subcommand */ export declare class CliCmdError extends CortexError { readonly subcommand: string; constructor(subcommand: string, availableCommands: string[]); } /** ERR-CLI-002: Unknown action for a subcommand */ export declare class CliActionError extends CortexError { readonly subcommand: string; readonly action: string; constructor(subcommand: string, action: string, availableActions: string[]); } /** ERR-CLI-003: Invalid format option */ export declare class CliFormatError extends CortexError { readonly format: string; constructor(format: string); } /** ERR-CLI-FORMAT: --format table is not valid for show commands */ export declare class CliShowFormatError extends CortexError { readonly format: string; constructor(format: string); } /** Base registry error (ERR-REG-*) — legacy compat base class */ export declare class RegistryError extends CortexError { constructor(reason: string, code?: string); } /** ERR-REG-001: Cannot create config directory */ export declare class RegistryDirCreateError extends RegistryError { constructor(reason: string); } /** ERR-REG-002: Registry file has invalid structure */ export declare class RegistryInvalidStructureError extends RegistryError { constructor(reason: string); } /** ERR-REG-003: Cannot write registry file */ export declare class RegistryWriteError extends RegistryError { constructor(reason: string); } /** ERR-REG-004: Registry file is not valid JSON */ export declare class RegistryInvalidJsonError extends RegistryError { constructor(reason: string); } /** ERR-REG-005: Cannot read registry file */ export declare class RegistryReadError extends RegistryError { constructor(reason: string); } /** Config file is corrupt or invalid */ export declare class ConfigError extends CortexError { constructor(message: string, details?: Record); } /** ERR-CFG-002: Config base directory error (missing env var or unwritable directory) */ export declare class ConfigBaseDirError extends CortexError { readonly variableName?: string; constructor(message: string, variableName?: string); } /** ERR-GRAPH-002: Entity not found */ export declare class GraphEntityNotFoundError extends CortexError { readonly entityId: string; constructor(entityId: string); } /** ERR-GRAPH-003: Duplicate entity ID */ export declare class GraphEntityDuplicateError extends CortexError { readonly entityId: string; constructor(entityId: string); } /** ERR-GRAPH-004: Relation type not found */ export declare class GraphRelationTypeNotFoundError extends CortexError { readonly typeName: string; constructor(typeName: string); } /** ERR-GRAPH-005: Self-relation not allowed */ export declare class GraphSelfRelationError extends CortexError { readonly entityId: string; readonly relType: string; constructor(entityId: string, relType: string); } /** ERR-GRAPH-006: Type constraint violation */ export declare class GraphTypeConstraintError extends CortexError { readonly relType: string; readonly direction: string; readonly actualType: string; readonly allowedTypes: string[]; constructor(relType: string, direction: string, actualType: string, allowedTypes: string[]); } /** ERR-GRAPH-007: Cardinality constraint violation */ export declare class GraphCardinalityError extends CortexError { readonly relType: string; readonly cardinality: string; readonly entityId: string; constructor(relType: string, cardinality: string, entityId: string); } /** ERR-GRAPH-008: Duplicate relation */ export declare class GraphDuplicateRelationError extends CortexError { readonly fromId: string; readonly relType: string; readonly toId: string; constructor(fromId: string, relType: string, toId: string); } /** ERR-GRAPH-009: Relation not found */ export declare class GraphRelationNotFoundError extends CortexError { readonly relationId: number; constructor(relationId: number); } /** ERR-GRAPH-010: No entity type mapping for document type (MOD-021) */ export declare class GraphDocTypeMappingNotFoundError extends CortexError { readonly docType: string; constructor(docType: string); } /** ERR-GRAPH-EXPORT-FORMAT: Unsupported graph export format */ export declare class GraphExportFormatError extends CortexError { readonly format: string; readonly supported: string[]; constructor(format: string, supported: string[]); } /** ERR-DOC-001: Duplicate document ID */ export declare class DocumentDuplicateError extends CortexError { readonly docId: string; constructor(docId: string); } /** ERR-DOC-002: Content file not found or unreadable */ export declare class DocumentFileError extends CortexError { readonly path: string; constructor(path: string, reason?: string); } /** ERR-DOC-003: Invalid JSON in metadata */ export declare class DocumentInvalidJsonError extends CortexError { constructor(field: string); } /** ERR-DOC-004: Missing required field */ export declare class DocumentMissingFieldError extends CortexError { readonly field: string; constructor(field: string); } /** ERR-DOC-005: Document not found */ export declare class DocumentNotFoundError extends CortexError { readonly docId: string; constructor(docId: string); } /** ERR-DOC-006: Vault scan error */ export declare class DocumentScanError extends CortexError { readonly vaultPath: string; constructor(vaultPath: string, reason: string); } /** ERR-DOC-TYPE-UNKNOWN: Unknown document type rejected pre-transaction (FS-SS-012-0011 v2) */ export declare class DocumentTypeUnknownError extends CortexError { readonly invalidType: string; constructor(invalidType: string); } /** ERR-DOC-SRC-STORAGE: SRC documents require filesystem storage (reject --content-file) */ export declare class DocSrcStorageError extends CortexError { constructor(); } /** ERR-DOC-SPRINT-REQUIRED: Sprint-scoped doc type registered without --sprint */ export declare class DocSprintRequiredError extends CortexError { readonly docType: string; constructor(docType: string); } /** ERR-DOC-012: Invalid order-by field for doc list/search */ export declare class DocumentInvalidOrderByError extends CortexError { readonly field: string; readonly validFields: string[]; constructor(field: string); } /** ERR-DOC-UNKNOWN-OPTION: Unsupported option rejected per URD-G001 */ export declare class DocumentUnknownOptionError extends CortexError { readonly optionName: string; readonly commandName: string; constructor(optionName: string, commandName: string); } /** ERR-DOC-011: Invalid search query (malformed FTS5 syntax) */ export declare class DocumentInvalidSearchQueryError extends CortexError { readonly query: string; constructor(query: string, reason?: string); } /** ERR-REVIEW-001: Sprint not found for review */ export declare class ReviewSprintNotFoundError extends CortexError { readonly sprintId: string; constructor(sprintId: string); } /** ERR-REVIEW-002: Review not found */ export declare class ReviewNotFoundError extends CortexError { readonly reviewId: number; constructor(reviewId: number); } /** ERR-REVIEW-005: No update fields provided for review update */ export declare class ReviewNoUpdateFieldsError extends CortexError { constructor(); } /** ERR-REVIEW-004: Content file not found for review add */ export declare class ReviewContentFileNotFoundError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-REVIEW-BADID: Invalid review ID format (not 4 digits) */ export declare class ReviewBadIdError extends CortexError { readonly reviewId: string; constructor(reviewId: string); } /** ERR-REVIEW-MISSINGID: --id is required for review add */ export declare class ReviewMissingIdError extends CortexError { constructor(); } /** ERR-REVIEW-DUPID: Duplicate review ID in the same sprint */ export declare class ReviewDuplicateIdError extends CortexError { readonly reviewId: string; readonly sprintId: string; constructor(reviewId: string, sprintId: string); } /** ERR-REVIEW-006: Review not found in specified sprint */ export declare class ReviewNotInSprintError extends CortexError { readonly reviewNum: number; readonly sprintId: string; constructor(reviewNum: number, sprintId: string); } /** ERR-REVIEW-007: --sprint option required for review show */ export declare class ReviewSprintRequiredError extends CortexError { constructor(); } /** ERR-REVIEW-008: --content is no longer supported */ export declare class ReviewContentRemovedError extends CortexError { constructor(); } /** ERR-REVIEW-009: Content file not found (legacy compat) */ export declare class ReviewContentFileError extends CortexError { readonly path: string; constructor(path: string, reason?: string); } /** ERR-TESTREPORT-001: --report-path is no longer supported */ export declare class TestReportReportPathRejectedError extends CortexError { constructor(); } /** ERR-REPORT-001: Module not found */ export declare class ReportModuleNotFoundError extends CortexError { readonly moduleId: string; constructor(moduleId: string); } /** ERR-REPORT-002: Test report not found */ export declare class ReportNotFoundError extends CortexError { readonly reportId: number; constructor(reportId: number); } /** ERR-TESTREPORT-002: Content file not found */ export declare class TestReportContentFileError extends CortexError { readonly path: string; constructor(path: string); } /** ERR-TESTREPORT-BADID: Invalid test-report ID format (not 4 digits) */ export declare class TestReportBadIdError extends CortexError { readonly testReportId: string; constructor(testReportId: string); } /** ERR-TESTREPORT-MISSINGID: --id is required for test-report add */ export declare class TestReportMissingIdError extends CortexError { constructor(); } /** ERR-TESTREPORT-DUPID: Duplicate test-report ID in the same sprint */ export declare class TestReportDuplicateIdError extends CortexError { readonly testReportId: string; readonly sprintId: string; constructor(testReportId: string, sprintId: string); } /** ERR-TESTREPORT-005: No update fields provided for test report update */ export declare class TestReportNoUpdateFieldsError extends CortexError { constructor(); } /** ERR-LESSON-001: No lesson has been recorded for this project (singleton) */ export declare class LessonNotFoundError extends CortexError { constructor(); } /** ERR-LESSON-002: No update fields provided */ export declare class LessonNoUpdateFieldsError extends CortexError { constructor(); } /** ERR-LESSON-005: Invalid category enum value */ export declare class LessonInvalidCategoryError extends CortexError { readonly category: string; constructor(category: string); } /** ERR-LESSON-006: Invalid severity enum value */ export declare class LessonInvalidSeverityError extends CortexError { readonly severity: string; constructor(severity: string); } /** ERR-LESSON-007: Content file not found */ export declare class LessonFileError extends CortexError { readonly path: string; constructor(path: string, reason?: string); } /** @deprecated Use TaskOwnerPlanningError instead */ /** @deprecated Use TaskOwnerReleaseError instead */ /** @deprecated Use MigrationIntegrityError instead */ export declare class MigrationVersionError extends MigrationIntegrityError { constructor(versionOrMessage: number | string, missing?: string[]); } /** @deprecated Use LockTimeoutError (ERR-LOCK-002) instead */ export declare class LockConflictError extends LockTimeoutError { constructor(lockName: string, owner: string, totalWaitMs?: number); } /** @deprecated Use ProjectFolderNotFoundError (ERR-PROJ-005) or ProjectFolderCreateError (ERR-PROJ-004) instead */ export declare class InvalidProjectFolderError extends ProjectFolderCreateError { constructor(folder: string, reason?: string); } /** ERR-AUDIT-001: Unknown check name in --checks list */ export declare class AuditUnknownCheckError extends CortexError { constructor(checkName: string, knownChecks: string[]); } /** ERR-AUDIT-002: One or more audit checks failed */ export declare class AuditCheckFailedError extends CortexError { constructor(failedCount: number); } /** ERR-AUDIT-003: --sprint ID does not exist */ export declare class AuditSprintNotFoundError extends CortexError { constructor(sprintId: string); } /** ERR-AUDIT-004: Cannot write report file */ export declare class AuditReportFileError extends CortexError { constructor(filePath: string, reason: string); } /** ERR-AUDIT-005: Fix transaction failed */ export declare class AuditFixError extends CortexError { constructor(reason: string); } //# sourceMappingURL=errors.d.ts.map