UNPKG

@hotmeshio/hotmesh

Version:

Permanent-Memory Workflows & AI Agents

134 lines (133 loc) 5.74 kB
import { LogLevel } from '../types/logger'; /** * Determines the log level for the application. The default is 'info'. */ export declare const HMSH_LOGLEVEL: LogLevel; /** * Determines the log level for telemetry. The default is 'info' which emits worker and trigger spans. 'debug' emits all spans. */ export declare const HMSH_TELEMETRY: "debug" | "info"; /** * Default cleanup time for signal in the db when its associated job is completed. */ export declare const HMSH_SIGNAL_EXPIRE = 3600; /** * Determines if the system is running in cluster mode (for Redis cluster support). */ export declare const HMSH_IS_CLUSTER: boolean; export declare const HMSH_CODE_SUCCESS = 200; export declare const HMSH_CODE_PENDING = 202; export declare const HMSH_CODE_NOTFOUND = 404; export declare const HMSH_CODE_INTERRUPT = 410; export declare const HMSH_CODE_UNKNOWN = 500; export declare const HMSH_CODE_TIMEOUT = 504; export declare const HMSH_CODE_UNACKED = 999; /** * This is thrown when a MemFlow has been interrupted by a sleepFor call. */ export declare const HMSH_CODE_MEMFLOW_SLEEP = 588; /** * This is thrown when a MemFlow has been interrupted by a Promise.all call. */ export declare const HMSH_CODE_MEMFLOW_ALL = 589; /** * This is thrown when a MemFlow has been interrupted by an execChild or startChild call. */ export declare const HMSH_CODE_MEMFLOW_CHILD = 590; /** * This is thrown when a MemFlow has been interrupted by a proxyActivity call. */ export declare const HMSH_CODE_MEMFLOW_PROXY = 591; /** * This is thrown when a MemFlow has been interrupted by a waitForSignal call. */ export declare const HMSH_CODE_MEMFLOW_WAIT = 595; /** * The timeout status code for MemFlow. This status code is thrown when MemFlow has encountered a timeout error and needs to aler the caller why the call failed. */ export declare const HMSH_CODE_MEMFLOW_TIMEOUT = 596; /** * The maxed status code for MemFlow. This status code is used to indicate that the MemFlow has reached the maximum * number of attempts and should be halted. Thrown from a proxied activity or a flow to halt standard execution * and prevent further attempts. */ export declare const HMSH_CODE_MEMFLOW_MAXED = 597; /** * The fatal status code for MemFlow. This status code is used to indicate that the MemFlow has encountered a fatal error. Throw from a proxied activity or a flow to halt standard execution. */ export declare const HMSH_CODE_MEMFLOW_FATAL = 598; /** * The retryable status code for MemFlow. This status code is used to indicate that the MemFlow has encountered a retryable error (essentially unknown and covered by the standard retry policy). */ export declare const HMSH_CODE_MEMFLOW_RETRYABLE = 599; export declare const HMSH_STATUS_UNKNOWN = "unknown"; /** * The number of cycles to re/try for a quorum to be established. */ export declare const HMSH_QUORUM_ROLLCALL_CYCLES = 12; /** * The delay in milliseconds between quorum rollcall cycles. */ export declare const HMSH_QUORUM_DELAY_MS = 250; /** * The number of times the call-response exchange must succeed in succession to establish a quorum. */ export declare const HMSH_ACTIVATION_MAX_RETRY = 3; export declare const HMSH_DEPLOYMENT_DELAY: number; export declare const HMSH_DEPLOYMENT_PAUSE: number; export declare const HMSH_OTT_WAIT_TIME: number; export declare const HMSH_EXPIRE_JOB_SECONDS: number; export declare const MAX_STREAM_BACKOFF: number; export declare const INITIAL_STREAM_BACKOFF: number; export declare const MAX_STREAM_RETRIES: number; export declare const MAX_DELAY = 2147483647; export declare const HMSH_MAX_RETRIES: number; export declare const HMSH_MAX_TIMEOUT_MS: number; export declare const HMSH_GRADUATED_INTERVAL_MS: number; /** * The maximum number of attempts to retry a MemFlow job before it is considered failed. * @default 3 */ export declare const HMSH_MEMFLOW_MAX_ATTEMPTS = 3; /** * The maximum interval to wait before retrying a MemFlow job. * @default 120s */ export declare const HMSH_MEMFLOW_MAX_INTERVAL = "120s"; /** * The exponential backoff factor to apply to the interval between retries. * @default 10 */ export declare const HMSH_MEMFLOW_EXP_BACKOFF = 10; export declare const HMSH_BLOCK_TIME_MS: number; export declare const HMSH_XCLAIM_DELAY_MS: number; export declare const HMSH_XCLAIM_COUNT: number; export declare const HMSH_XPENDING_COUNT: number; export declare const HMSH_EXPIRE_DURATION: number; export declare const HMSH_FIDELITY_SECONDS: number; export declare const HMSH_SCOUT_INTERVAL_SECONDS: number; export declare const HMSH_ROUTER_SCOUT_INTERVAL_SECONDS: number; export declare const HMSH_ROUTER_SCOUT_INTERVAL_MS: number; export declare const HMSH_GUID_SIZE: number; /** * Default task queue name used when no task queue is specified */ export declare const DEFAULT_TASK_QUEUE = "default"; /** * PostgreSQL NOTIFY payload limit. If a job message exceeds this size, * a reference message is sent instead and the subscriber fetches via getState. * PostgreSQL hard limit is 8000 bytes; default 7500 provides safety margin. */ export declare const HMSH_NOTIFY_PAYLOAD_LIMIT: number; /** * PostgreSQL LISTEN/NOTIFY fallback polling interval in milliseconds. * Used when LISTEN/NOTIFY is unavailable or fails. Default 30 seconds. */ export declare const HMSH_ROUTER_POLL_FALLBACK_INTERVAL: number; /** * Serializer compression threshold. When a stringified object exceeds this size * in bytes, it will be gzipped and base64 encoded (with /b prefix) to reduce * Redis hash storage size. Default 100 bytes - small enough to catch most * workflow state but compression only applies if it actually reduces size. */ export declare const HMSH_SERIALIZER_COMPRESSION_THRESHOLD: number;