pit-manager
Version:
Centralized prompt management system for Human Behavior AI agents
161 lines (160 loc) • 4.94 kB
JavaScript
"use strict";
/**
* Exception classes for PIT TypeScript implementation.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CostLimitExceededError = exports.ConfigError = exports.ChainNotFoundError = exports.CircularDependencyError = exports.ChainError = exports.RateLimitError = exports.APIKeyError = exports.UnsupportedModelError = exports.ProviderError = exports.UncommittedChangesError = exports.InvalidBranchNameError = exports.BranchNotFoundError = exports.MergeConflictError = exports.InvalidCommitError = exports.RepoNotFoundError = exports.RefNotFoundError = exports.VersioningError = exports.VersionError = exports.CorruptedObjectError = exports.ObjectNotFoundError = exports.StorageError = exports.PITError = void 0;
class PITError extends Error {
constructor(message) {
super(message);
this.name = 'PITError';
}
}
exports.PITError = PITError;
class StorageError extends PITError {
constructor(message) {
super(message);
this.name = 'StorageError';
}
}
exports.StorageError = StorageError;
class ObjectNotFoundError extends StorageError {
constructor(message) {
super(message);
this.name = 'ObjectNotFoundError';
}
}
exports.ObjectNotFoundError = ObjectNotFoundError;
class CorruptedObjectError extends StorageError {
constructor(message) {
super(message);
this.name = 'CorruptedObjectError';
}
}
exports.CorruptedObjectError = CorruptedObjectError;
class VersionError extends PITError {
constructor(message) {
super(message);
this.name = 'VersionError';
}
}
exports.VersionError = VersionError;
class VersioningError extends VersionError {
constructor(message) {
super(message);
this.name = 'VersioningError';
}
}
exports.VersioningError = VersioningError;
class RefNotFoundError extends VersionError {
constructor(message) {
super(message);
this.name = 'RefNotFoundError';
}
}
exports.RefNotFoundError = RefNotFoundError;
class RepoNotFoundError extends VersionError {
constructor(message) {
super(message);
this.name = 'RepoNotFoundError';
}
}
exports.RepoNotFoundError = RepoNotFoundError;
class InvalidCommitError extends VersionError {
constructor(message) {
super(message);
this.name = 'InvalidCommitError';
}
}
exports.InvalidCommitError = InvalidCommitError;
class MergeConflictError extends VersionError {
constructor(message) {
super(message);
this.name = 'MergeConflictError';
}
}
exports.MergeConflictError = MergeConflictError;
class BranchNotFoundError extends VersionError {
constructor(message) {
super(message);
this.name = 'BranchNotFoundError';
}
}
exports.BranchNotFoundError = BranchNotFoundError;
class InvalidBranchNameError extends VersionError {
constructor(message) {
super(message);
this.name = 'InvalidBranchNameError';
}
}
exports.InvalidBranchNameError = InvalidBranchNameError;
class UncommittedChangesError extends VersionError {
constructor(message) {
super(message);
this.name = 'UncommittedChangesError';
}
}
exports.UncommittedChangesError = UncommittedChangesError;
class ProviderError extends PITError {
constructor(message) {
super(message);
this.name = 'ProviderError';
}
}
exports.ProviderError = ProviderError;
class UnsupportedModelError extends ProviderError {
constructor(message) {
super(message);
this.name = 'UnsupportedModelError';
}
}
exports.UnsupportedModelError = UnsupportedModelError;
class APIKeyError extends ProviderError {
constructor(message) {
super(message);
this.name = 'APIKeyError';
}
}
exports.APIKeyError = APIKeyError;
class RateLimitError extends ProviderError {
constructor(message) {
super(message);
this.name = 'RateLimitError';
}
}
exports.RateLimitError = RateLimitError;
class ChainError extends PITError {
constructor(message) {
super(message);
this.name = 'ChainError';
}
}
exports.ChainError = ChainError;
class CircularDependencyError extends ChainError {
constructor(message) {
super(message);
this.name = 'CircularDependencyError';
}
}
exports.CircularDependencyError = CircularDependencyError;
class ChainNotFoundError extends ChainError {
constructor(message) {
super(message);
this.name = 'ChainNotFoundError';
}
}
exports.ChainNotFoundError = ChainNotFoundError;
class ConfigError extends PITError {
constructor(message) {
super(message);
this.name = 'ConfigError';
}
}
exports.ConfigError = ConfigError;
class CostLimitExceededError extends PITError {
constructor(message) {
super(message);
this.name = 'CostLimitExceededError';
}
}
exports.CostLimitExceededError = CostLimitExceededError;