UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

14 lines • 19.9 kB
import{o as asDateTimestampMs}from"./number-coercion-B3CfI447.mjs";import"./src-0ci69Prg.mjs";import{t as expectDefined}from"./expect-DkJCbmLj.mjs";import{r as truncateUtf16Safe}from"./utf16-slice-DA3Mllbx.mjs";import{t as pruneMapToMaxSize}from"./map-size-DLQqorvK.mjs";import{n as formatErrorMessageWithCode}from"./errors-D37BJTfI.mjs";import{N as parseAgentSessionKey,c as normalizeOptionalAgentId}from"./session-key-BPgKfU2m.mjs";import{p as isCronJobActive}from"./active-jobs-QNXDOaIz.mjs";import{s as resolveCronDeliverySessionKey}from"./session-target-BE2kgjYz.mjs";import{n as resolveCronTriggerMinIntervalMs}from"./cron-limits-ViH90sRt.mjs";import{a as hasCanonicalCronDeliveryMode}from"./delivery-codec-rJfKfjDT.mjs";import{t as coerceFiniteScheduleNumber}from"./schedule-number-C2vuwNBB.mjs";import{n as resolveCronStaggerMs}from"./stagger-D1kYvF8-.mjs";import{s as resolveCronStreamBatching}from"./stream-schedule-CLd_dFPf.mjs";import{n as cronSourceIdentity,o as setCronSourceIdentity,t as createCronSourceIdentity}from"./source-schedule-D7cVsqMy.mjs";import{n as computePreviousRunAtMs,t as computeNextRunAtMs}from"./schedule-H_TJE2zs.mjs";import{i as resolveForcePreservedOneShotAtMs,n as computeOneShotNextRunAtMs,t as clearInvalidForcePreservedNextRun}from"./one-shot-schedule-BnnrRtbR.mjs";import crypto from"node:crypto"; //!src/cron/failure-notification-text.ts const GENERIC_FAILURE_DETAIL=`Check automation history for details.`;const AGENT_STALL_RECOVERY_GUIDANCE={blocked_tool_call:[`The agent was blocked waiting on a tool call that made no progress.`,`Review the tool's permissions and any blocked invocation, then rerun the automation.`],stalled_agent_run:[`The agent run made no recoverable progress.`,`Review the chat for this run for a loop or ambiguous instruction, then rerun with a narrower task if needed.`],semantic_stall:[`The agent made no semantic progress before the stall deadline.`,`Review the chat for this run and simplify the task, then rerun.`],execution_deadline:[`The run exceeded its execution deadline.`,`Raise the automation's execution timeout or simplify the task, then rerun.`]};const AGENT_STALL_GENERIC_GUIDANCE=[`The agent run was stopped because its session became stuck.`,`Check the automation history for details, then rerun if appropriate.`];const SCRIPT_FAILURE_COPY={aborted:`was aborted`,invalid_input:`received invalid input`,runtime_unavailable:`runtime is unavailable`,timeout:`timed out`,output_limit_exceeded:`exceeded its output limit`,snapshot_limit_exceeded:`exceeded its state limit`,internal_error:`failed internally`,tool_budget_exceeded:`exceeded its tool budget`};function cronFailureDetailLines(e,t){if(e===`billing`||e===`server_error`)return[`Cause: ${e}`,e===`billing`?`Ask the provider account owner to resolve the billing error, or choose another provider for this automation, then run it again.`:`The AI service is having trouble. Wait a moment and run the automation again, or choose another provider.`];if(e){if(e===`route_unavailable`)return[`Cause: ${e}`,`The provider cannot serve this model right now. Choose another model for this automation or ask the provider operator to restore the route, then run it again.`];return e===`model_not_found`?[`Cause: ${e}`,"Run `openclaw doctor --fix` to repair provider-declared retired model references.",`Choose a supported model for this automation or remove its model override to use the agent default. If the agent default is unavailable, update it too.`]:[`Cause: ${e}`]}if(!t)return[GENERIC_FAILURE_DETAIL];if(t.kind===`inference-account-unrecorded`)return[`Cause: the automation has no recorded inference account.`,"Select an authorized stored account with `openclaw automations edit <jobId> --model <provider/model>@<account>`, or use a configured provider key. For eligible host-managed accounts, `openclaw doctor --fix` can record the account."];if(t.kind===`invalid-target`)return[`Cause: invalid automation target. Update agentId or sessionTarget before re-enabling.`];if(t.kind===`command-exit`)return[`Cause: command exited with code ${t.exitCode}`];if(t.kind===`command-timeout`)return[t.mode===`wall-clock`?`Cause: command timed out`:`Cause: command stopped after producing no output`];if(t.kind===`agent-stall`){const{classification:e}=t;const n=AGENT_STALL_RECOVERY_GUIDANCE[e]??AGENT_STALL_GENERIC_GUIDANCE;return[`Cause: ${e}`,...n]}const n=t.source===`payload`?`automation script`:`trigger script`;if(t.code===`plugin_reload_failed`)return[`Cause: tools could not be refreshed after a plugin reload.`,`The ${n} did not run. Automatic setup recovery failed.`,`Check automation history and plugin status, then retry the automation.`];return[`Cause: ${n} ${SCRIPT_FAILURE_COPY[t.code]}`]} //!src/cron/service/notification-intents.ts function captureCronNotificationRouting(e,t){const n=normalizeOptionalAgentId(e)??normalizeOptionalAgentId(t);return n===void 0?{}:{defaultAgentId:n}}function cronNotificationJob(e){return{id:e.id,name:e.name,agentId:e.agentId,sessionTarget:e.sessionTarget,sessionKey:e.sessionKey,owner:e.owner?{...e.owner}:void 0,wakeMode:e.wakeMode,state:{lastRunAtMs:e.state.lastRunAtMs,lastFailureAlertAtMs:e.state.lastFailureAlertAtMs,lastFailureNotificationId:e.state.lastFailureNotificationId}}}function resolveCronNotificationQueueOwner(e,t){const n=t===`auto-disabled`?e.owner:void 0;const r=n?.sessionKey?.trim()||void 0;const i=t===`failure-alert`?resolveCronDeliverySessionKey(e):r??e.sessionKey;return{agentId:normalizeOptionalAgentId(n?.agentId)??normalizeOptionalAgentId(parseAgentSessionKey(r)?.agentId)??normalizeOptionalAgentId(e.agentId)??normalizeOptionalAgentId(parseAgentSessionKey(i)?.agentId),sessionKey:i}} //!src/cron/service/auto-disable.ts const MAX_CONSECUTIVE_RUN_FAILURES=10;function autoDisableReasonLabel(e){return e===`consecutive-failures`?`run failures`:`schedule errors`}function buildCronAutoDisableNotice(e){const{job:t}=e;const n=truncateUtf16Safe((t.name||t.id).replace(/\s+/g,` `).trim(),120);const r=e.reason===`consecutive-failures`?t.state.lastErrorReason:void 0;return[`⚠️ Automation "${n}" was auto-disabled after ${e.consecutiveErrors} consecutive ${autoDisableReasonLabel(e.reason)}.`,...cronFailureDetailLines(r,e.failureNotificationDetail),`Fix the underlying cause, then run \`openclaw automations enable ${t.id}\` to re-enable it.`].join(` `)}function queueCronAutoDisableNotification(e){e.deferredNotifications.push({kind:`auto-disabled`,job:cronNotificationJob(e.job),text:buildCronAutoDisableNotice(e)})}function autoDisableCronJob(e){const{job:t}=e;if(!t.enabled&&!e.terminalOneShot||t.state.autoDisabled)return false;t.enabled=false;t.state.nextRunAtMs=void 0;t.state.autoDisabled={reason:e.reason,atMs:e.atMs,consecutiveErrors:e.consecutiveErrors};if(e.notify===false)return true;queueCronAutoDisableNotification(e);return true}function maybeAutoDisableCronJobAfterRunFailure(e){const t=e.job.state.consecutiveErrors??0;if(e.job.schedule.kind!==`cron`&&e.job.schedule.kind!==`every`||t<MAX_CONSECUTIVE_RUN_FAILURES)return false;return autoDisableCronJob({...e,reason:`consecutive-failures`,consecutiveErrors:t})} //!src/cron/service/timer-constants.ts const MAX_CRON_TIMER_DELAY_MS=6e4;const MIN_REFIRE_GAP_MS=2e3;const DEFAULT_MISSED_JOB_STAGGER_MS=5e3;const DEFAULT_STARTUP_DEFERRED_MISSED_AGENT_JOB_DELAY_MS=12e4; //!src/cron/service/trigger-interval.ts function hasPendingCronTriggerInterval(e,t){const n=asDateTimestampMs(e.state.nextRunAtMs);const r=Math.max(e.updatedAtMs,e.state.lastTriggerEvalAtMs??0);return e.trigger!==void 0&&n!==void 0&&n>0&&t<n&&n<=r+resolveCronTriggerMinIntervalMs()} //!src/cron/service/jobs-scheduling.ts function resolveCronRestartRetryAtMs(e,t,n){if(!isJobEnabled(e)||e.payload.kind!==`agentTurn`||![`at`,`every`,`cron`].includes(e.schedule.kind))return;const r=e.schedule.kind===`at`?MIN_REFIRE_GAP_MS:errorBackoffMs(normalizeConsecutiveErrors(e.state.consecutiveErrors));return Math.max(n,t)+r}const staggerOffsetCache=/* @__PURE__ */ new Map;const TIME_SCHEDULE_STATE_FIELDS=[`startupCatchupAtMs`,`pacedNextRunAtMs`,`forcePreservedNextRunAtMs`,`nextRunAtMs`];function ownsCronRunMarker(e,t,n,r=false){const i=e.reservations.get(t);return i?.markerAtMs===n&&(!r||i.preserveWhenDisabled)}function normalizeStreamScheduleBounds(e){if(e.kind!==`stream`)return e;const t=resolveCronStreamBatching(e);return{...e,...e.batchMs!==void 0?{batchMs:t.batchMs}:{},...e.maxBatchBytes!==void 0?{maxBatchBytes:t.maxBatchBytes}:{}}}const DEFAULT_ERROR_BACKOFF_SCHEDULE_MS=[3e4,6e4,3e5,9e5,36e5];function isFiniteTimestamp(e){return asDateTimestampMs(e)!==void 0}function hasScheduledNextRunAtMs(e){return isFiniteTimestamp(e)&&e>0}function resolveNextRunAtMsOrDisable(e){const t=asDateTimestampMs(e.candidate);if(t!==void 0&&t>0)return t;autoDisableCronJob({job:e.job,reason:`schedule-errors`,atMs:e.state.deps.nowMs(),consecutiveErrors:1,deferredNotifications:e.deferredNotifications})}function resolveJobLastRunStatus(e){return e.state.lastRunStatus??e.state.lastStatus}function resolveJobLastRunEndedAtMs(e){if(!isFiniteTimestamp(e.state.lastRunAtMs))return;const t=typeof e.state.lastDurationMs===`number`&&Number.isFinite(e.state.lastDurationMs)?Math.max(0,Math.floor(e.state.lastDurationMs)):0;return e.state.lastRunAtMs+t}function errorBackoffMs(e,t=DEFAULT_ERROR_BACKOFF_SCHEDULE_MS){const n=Math.min(e-1,t.length-1);return expectDefined(t[Math.max(0,n)],`schedule ms entry at math.max(0, idx)`)}function normalizeConsecutiveErrors(e){return typeof e===`number`&&Number.isFinite(e)?Math.max(0,Math.floor(e)):0}function resolveJobErrorBackoffUntilMs(e,t=DEFAULT_ERROR_BACKOFF_SCHEDULE_MS){if(resolveJobLastRunStatus(e)!==`error`)return;const n=resolveJobLastRunEndedAtMs(e);if(n===void 0)return;const r=normalizeConsecutiveErrors(e.state.consecutiveErrors);return asDateTimestampMs(n+errorBackoffMs(r,t))}function resolveStableCronOffsetMs(e,t){if(t<=1)return 0;const n=`${t}:${e}`;const r=staggerOffsetCache.get(n);if(r!==void 0)return r;const i=crypto.createHash(`sha256`).update(e).digest().readUInt32BE(0)%t;pruneMapToMaxSize(staggerOffsetCache,4095);staggerOffsetCache.set(n,i);return i}function computeStaggeredCronNextRunAtMs(e,t){if(e.schedule.kind!==`cron`)return computeNextRunAtMs(e.schedule,t);const n=resolveCronStaggerMs(e.schedule);const r=resolveStableCronOffsetMs(e.id,n);if(r<=0)return computeNextRunAtMs(e.schedule,t);let i=Math.max(0,t-r);for(let n=0;n<4;n+=1){const n=computeNextRunAtMs(e.schedule,i);if(n===void 0)return;const a=n+r;if(isFiniteTimestamp(a)&&a>t)return a;i=Math.max(i+1,n+1e3)}}function computeStaggeredCronPreviousRunAtMs(e,t){if(e.schedule.kind!==`cron`)return;const n=resolveCronStaggerMs(e.schedule);const r=resolveStableCronOffsetMs(e.id,n);if(r<=0)return computePreviousRunAtMs(e.schedule,t);let i=Math.max(0,t-r);for(let n=0;n<4;n+=1){const n=computePreviousRunAtMs(e.schedule,i);if(n===void 0)return;const a=n+r;if(isFiniteTimestamp(a)&&a<=t)return a;i=Math.max(0,n-1e3)}}function computeStaggeredCronPreviousRunAtOrBeforeMs(e,t){const n=computeStaggeredCronPreviousRunAtMs(e,t);const r=t+1e3;if(!isFiniteTimestamp(r))return n;const i=computeStaggeredCronPreviousRunAtMs(e,r);if(isFiniteTimestamp(i)&&i<=t&&(!isFiniteTimestamp(n)||i>n))return i;return n}function isStaggeredCronRunAtMs(e,t){if(e.schedule.kind!==`cron`||!isFiniteTimestamp(t))return false;return computeStaggeredCronPreviousRunAtOrBeforeMs(e,t)===t}function isStaleFutureCronSlot(e,t){const n=e.state.nextRunAtMs;if(e.schedule.kind!==`cron`||!hasScheduledNextRunAtMs(n)||t>=n||typeof e.state.queuedAtMs===`number`||typeof e.state.runningAtMs===`number`)return false;const r=resolveJobErrorBackoffUntilMs(e,DEFAULT_ERROR_BACKOFF_SCHEDULE_MS);if(r!==void 0&&t<r&&n<=r||hasPendingCronTriggerInterval(e,t))return false;let i;try{i=computeStaggeredCronNextRunAtMs(e,t)}catch{return false}if(!isFiniteTimestamp(i)||n===i)return false;let a;try{a=isStaggeredCronRunAtMs(e,n)}catch{return false}if(a)return false;if(n<i)return e.payload.kind!==`agentTurn`;let o;try{o=computeStaggeredCronNextRunAtMs(e,i)}catch{return false}if(!isFiniteTimestamp(o))return false;const s=o-i;return s>0&&n>=o+s}function resolveEveryAnchorMs(e){const t=coerceFiniteScheduleNumber(e.schedule.anchorMs);if(t!==void 0)return Math.max(0,Math.floor(t));if(isFiniteTimestamp(e.fallbackAnchorMs))return Math.max(0,Math.floor(e.fallbackAnchorMs));return 0}function hasInvalidExplicitEveryAnchor(e){if(e.anchorMs===void 0)return false;const t=coerceFiniteScheduleNumber(e.anchorMs);return t===void 0||t<0}function findJobOrThrow(e,t){const n=e.store?.jobs.find(e=>e.id===t);if(!n)throw new Error(`unknown cron job id: ${t}`);return n}function isJobEnabled(e){return e.enabled??true}function isTimeScheduledJob(e){return e.schedule.kind!==`on-exit`&&e.schedule.kind!==`stream`&&e.schedule.kind!==`event`}function computeJobNextRunAtMs(e,t,n){if(!isJobEnabled(e))return;if(e.schedule.kind===`every`){if(hasInvalidExplicitEveryAnchor(e.schedule))return;const r=coerceFiniteScheduleNumber(e.schedule.everyMs);if(r===void 0)return;const i=Math.floor(r);if(i<1)return;const a=isFiniteTimestamp(e.createdAtMs)?e.createdAtMs:t;const o=resolveEveryAnchorMs({schedule:e.schedule,fallbackAnchorMs:a});const s=n?.preserveEveryAnchor?void 0:e.state.lastRunAtMs;if(isFiniteTimestamp(s)&&s>=o){const e=Math.floor(s)+i;if(!isFiniteTimestamp(e))return;if(e>t)return e}const c=computeNextRunAtMs({...e.schedule,everyMs:i,anchorMs:o},t);return isFiniteTimestamp(c)?c:void 0}if(e.schedule.kind===`at`)return computeOneShotNextRunAtMs(e,resolveJobLastRunStatus(e));const r=computeStaggeredCronNextRunAtMs(e,t);if(r===void 0&&e.schedule.kind===`cron`)return computeStaggeredCronNextRunAtMs(e,Math.floor(t/1e3)*1e3+1e3);return isFiniteTimestamp(r)?r:void 0}function computeJobPreviousRunAtOrBeforeMs(e,t){if(!isJobEnabled(e)||e.schedule.kind!==`cron`)return;return asDateTimestampMs(computeStaggeredCronPreviousRunAtOrBeforeMs(e,t))}const MAX_SCHEDULE_ERRORS=3;function recordScheduleComputeError(e){const{state:t,job:n,err:r}=e;const i=(n.state.scheduleErrorCount??0)+1;const a=formatErrorMessageWithCode(r);n.state.scheduleErrorCount=i;n.state.nextRunAtMs=void 0;n.state.lastError=`schedule error: ${a}`;if(i>=MAX_SCHEDULE_ERRORS){autoDisableCronJob({job:n,reason:`schedule-errors`,atMs:t.deps.nowMs(),consecutiveErrors:i,deferredNotifications:e.deferredNotifications});t.deps.log.error({jobId:n.id,name:n.name,errorCount:i,err:a},`cron: auto-disabled job after repeated schedule errors`)}else t.deps.log.warn({jobId:n.id,name:n.name,errorCount:i,err:a},`cron: failed to compute next run for job (skipping)`);return true}function normalizeJobTickState(e){const{job:t,ownership:n}=e;let r=false;if(!t.state){t.state={};r=true}if((t.schedule.kind===`stream`||t.schedule.kind===`event`)&&!cronSourceIdentity(t)?.trim()){setCronSourceIdentity(t,createCronSourceIdentity());r=true}if(!isJobEnabled(t)&&t.state.forcePreservedNextRunAtMs!==t.state.nextRunAtMs||!isTimeScheduledJob(t))for(const e of TIME_SCHEDULE_STATE_FIELDS){if(e===`forcePreservedNextRunAtMs`&&resolveForcePreservedOneShotAtMs(t)!==void 0)continue;if(t.state[e]!==void 0){t.state[e]=void 0;r=true}}if(!isJobEnabled(t)){if(t.state.runningAtMs!==void 0&&!ownsCronRunMarker(n,t.id,t.state.runningAtMs,true)&&!n.isJobActive(t.id)){Object.assign(t.state,{runningAtMs:void 0,runningReceiptId:void 0});delete t.state.runningScheduleChangeId;r=true}return{changed:r,skip:true}}if(!hasScheduledNextRunAtMs(t.state.nextRunAtMs)&&t.state.nextRunAtMs!==void 0){t.state.nextRunAtMs=void 0;r=true}r=clearInvalidForcePreservedNextRun(t)||r;return{changed:r,skip:false}}function recomputeJobNextRunAtMs(e){let t=false;try{let n=computeJobNextRunAtMs(e.job,e.nowMs);if(e.job.schedule.kind!==`at`&&resolveJobLastRunStatus(e.job)===`error`&&isFiniteTimestamp(e.job.state.lastRunAtMs)){const t=resolveJobErrorBackoffUntilMs(e.job,DEFAULT_ERROR_BACKOFF_SCHEDULE_MS);if(n!==void 0)n=t!==void 0?Math.max(n,t):n}if(e.job.state.nextRunAtMs!==n){e.job.state.nextRunAtMs=n;t=true}if(e.job.state.scheduleErrorCount){e.job.state.scheduleErrorCount=void 0;t=true}}catch(n){if(e.skipScheduleErrorHandling)return false;if(recordScheduleComputeError({state:e.state,job:e.job,err:n,deferredNotifications:e.deferredNotifications}))t=true}return t}function isExpiredCronScheduleRepairCandidate(e,t,n){const r=e.state.nextRunAtMs;const i=resolveJobErrorBackoffUntilMs(e,DEFAULT_ERROR_BACKOFF_SCHEDULE_MS);return hasScheduledNextRunAtMs(r)&&t>=r&&typeof e.state.queuedAtMs!==`number`&&typeof e.state.runningAtMs!==`number`&&!n&&e.state.startupCatchupAtMs!==r&&e.state.forcePreservedNextRunAtMs!==r&&(isFiniteTimestamp(e.state.lastRunAtMs)&&e.state.lastRunAtMs>=r||i!==void 0&&t<i&&r<i)}function needsCronTimerMaintenance(e,t,n){if(hasActiveCronRun(e,false))return false;if(!isTimeScheduledJob(e))return TIME_SCHEDULE_STATE_FIELDS.some(t=>e.state[t]!==void 0);if(!isJobEnabled(e))return e.state.forcePreservedNextRunAtMs!==e.state.nextRunAtMs&&TIME_SCHEDULE_STATE_FIELDS.some(t=>e.state[t]!==void 0);return n?.recomputeExpired!==false&&isExpiredCronScheduleRepairCandidate(e,t,false)||n?.repairFutureCronNextRunAtMs!==false&&isStaleFutureCronSlot(e,t)||isJobEnabled(e)&&!hasScheduledNextRunAtMs(e.state.nextRunAtMs)}function recomputeSingleJobForMaintenance(e,t,n,r){const i=n.nowMs??e.deps.nowMs();const a=normalizeJobTickState({state:e,job:t,ownership:r});let o=a.changed;if(a.skip)return o;const s=n.recomputeExpired??false;const c=n.repairFutureCronNextRunAtMs??true;const recomputeJob=()=>recomputeJobNextRunAtMs({state:e,job:t,nowMs:i,deferredNotifications:n.deferredNotifications,skipScheduleErrorHandling:n.skipScheduleErrorHandling});const l=t.state.startupCatchupAtMs;const u=t.state.pacedNextRunAtMs;const d=t.state.nextRunAtMs;const f=isFiniteTimestamp(t.state.forcePreservedNextRunAtMs)&&hasScheduledNextRunAtMs(d)&&t.state.forcePreservedNextRunAtMs===d;const p=isFiniteTimestamp(l)&&hasScheduledNextRunAtMs(d)&&l===d;if(l!==void 0&&!p){t.state.startupCatchupAtMs=void 0;o=true}const m=isFiniteTimestamp(u)&&hasScheduledNextRunAtMs(d)&&u===d;if(u!==void 0&&!m){t.state.pacedNextRunAtMs=void 0;o=true}if(!hasScheduledNextRunAtMs(t.state.nextRunAtMs))o=recomputeJob()||o;else if(c&&!p&&!m&&!f&&isStaleFutureCronSlot(t,i))o=recomputeJob()||o;else if(s&&isExpiredCronScheduleRepairCandidate(t,i,r.isJobActive(t.id)))o=recomputeJob()||o;return o}function nextWakeAtMs(e){let t;for(const n of e.store?.jobs??[])if(isJobEnabled(n)&&hasCanonicalCronDeliveryMode(n.delivery)&&isTimeScheduledJob(n)&&hasScheduledNextRunAtMs(n.state.nextRunAtMs))t=Math.min(t??Infinity,Math.max(n.state.nextRunAtMs,n.state.admissionDeferred?.retryAtMs??0));return t}function hasActiveCronRun(e,t){return typeof e.state.queuedAtMs===`number`||typeof e.state.runningAtMs===`number`||(t??isCronJobActive(e.id))}export{maybeAutoDisableCronJobAfterRunFailure as A,hasPendingCronTriggerInterval as C,MIN_REFIRE_GAP_MS as D,MAX_CRON_TIMER_DELAY_MS as E,cronFailureDetailLines as F,captureCronNotificationRouting as M,cronNotificationJob as N,autoDisableCronJob as O,resolveCronNotificationQueueOwner as P,resolveNextRunAtMsOrDisable as S,DEFAULT_STARTUP_DEFERRED_MISSED_AGENT_JOB_DELAY_MS as T,resolveCronRestartRetryAtMs as _,findJobOrThrow as a,resolveJobLastRunEndedAtMs as b,isJobEnabled as c,nextWakeAtMs as d,normalizeConsecutiveErrors as f,recordScheduleComputeError as g,recomputeSingleJobForMaintenance as h,errorBackoffMs as i,queueCronAutoDisableNotification as j,buildCronAutoDisableNotice as k,isTimeScheduledJob as l,recomputeJobNextRunAtMs as m,computeJobNextRunAtMs as n,hasActiveCronRun as o,normalizeStreamScheduleBounds as p,computeJobPreviousRunAtOrBeforeMs as r,hasScheduledNextRunAtMs as s,DEFAULT_ERROR_BACKOFF_SCHEDULE_MS as t,needsCronTimerMaintenance as u,resolveEveryAnchorMs as v,DEFAULT_MISSED_JOB_STAGGER_MS as w,resolveJobLastRunStatus as x,resolveJobErrorBackoffUntilMs as y};