watchdog
Import
Section titled “Import”import * as api from "@fungi.computer/watchdog";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| class | WatchdogError | Typed failures owned by the generic Watchdog engine. |
| type alias | WatchdogExecutor | Promise host executor for one generic running job. |
| type alias | WatchdogOptions | Options for constructing the Promise facade. |
| type alias | WatchdogRuntime | Promise facade over the canonical Effect runtime. |
| type alias | ConcurrentWatchdogRuntime | Promise runtime with the construction-time concurrent lane. |
| type alias | WatchdogApi | Factory for the Promise facade. |
| constant | Watchdog | Promise facade over the canonical Effect-owned runtime. |
WatchdogErrorclass
Section titled “WatchdogError”Typed failures owned by the generic Watchdog engine.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new WatchdogError(failureKind, cause?): WatchdogError;Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
failureKind |
| "store_unavailable" | "store_invalid" | "claim_unavailable" | "execution_failed" | "settlement_rejected" | "wake_unavailable" | "liveness_unavailable" |
- |
cause? |
unknown |
The original thrown value, kept for server-side diagnosis only. cause is already the closed category above, so this is a separate field. |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;Properties
Section titled “Properties”readonly _tag: "WatchdogError";readonly cause: | "store_unavailable" | "store_invalid" | "claim_unavailable" | "execution_failed" | "settlement_rejected" | "wake_unavailable" | "liveness_unavailable";Overrides
Section titled “Overrides”Error.cause;underlying?
Section titled “underlying?”readonly optional underlying?: unknown;WatchdogExecutortype alias
Section titled “WatchdogExecutor”type WatchdogExecutor = (job, signal) => Promise<WatchdogExecutionDecision>;Promise host executor for one generic running job.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
job |
WatchdogRunningJob |
signal |
AbortSignal |
Returns
Section titled “Returns”Promise<WatchdogExecutionDecision>
WatchdogOptionstype alias
Section titled “WatchdogOptions”type WatchdogOptions = Readonly<{ concurrentLane?: string; owner: WatchdogSqliteOwner; isAlive: (job) => Promise<boolean>; execute: WatchdogExecutor; wake: Readonly<{ recompute: () => Promise<void>; }>; project?: WatchdogQueueProjector;}>;Options for constructing the Promise facade.
WatchdogRuntimetype alias
Section titled “WatchdogRuntime”type WatchdogRuntime = Readonly<{ hasPendingWork: () => Promise<boolean>; ingest: (job) => Promise<WatchdogIngestResult>; read: (jobId) => Promise<WatchdogReadResult>; readQueueHead: (queue) => Promise<WatchdogQueueHead>; tick: () => Promise<WatchdogTickResult>; cancel: (input) => Promise<WatchdogCancellationResult>; failLane: (input) => Promise<WatchdogLaneFailureResult>; purge: (queue) => Promise<void>; transactional: WatchdogTransactionalProjection;}>;Promise facade over the canonical Effect runtime.
ConcurrentWatchdogRuntimetype alias
Section titled “ConcurrentWatchdogRuntime”type ConcurrentWatchdogRuntime = WatchdogRuntime & Readonly<{ tickConcurrent: () => Promise<WatchdogTickResult>; }>;Promise runtime with the construction-time concurrent lane.
WatchdogApitype alias
Section titled “WatchdogApi”type WatchdogApi = Readonly<{ make: { (options): Promise<ConcurrentWatchdogRuntime>; (options): Promise< Readonly<{ hasPendingWork: () => Promise<boolean>; ingest: (job) => Promise<WatchdogIngestResult>; read: (jobId) => Promise<WatchdogReadResult>; readQueueHead: (queue) => Promise<WatchdogQueueHead>; tick: () => Promise<WatchdogTickResult>; cancel: (input) => Promise<WatchdogCancellationResult>; failLane: (input) => Promise<WatchdogLaneFailureResult>; purge: (queue) => Promise<void>; transactional: WatchdogTransactionalProjection; }> >; };}>;Factory for the Promise facade.
Watchdogconstant
Section titled “Watchdog”const Watchdog: WatchdogApi;Promise facade over the canonical Effect-owned runtime.
References
Section titled “References”WatchdogCancellationIntentSchema
Section titled “WatchdogCancellationIntentSchema”Re-exports WatchdogCancellationIntentSchema
WatchdogCancellationResultSchema
Section titled “WatchdogCancellationResultSchema”Re-exports WatchdogCancellationResultSchema
WatchdogExecutionDecisionSchema
Section titled “WatchdogExecutionDecisionSchema”Re-exports WatchdogExecutionDecisionSchema
WatchdogIngestResultSchema
Section titled “WatchdogIngestResultSchema”Re-exports WatchdogIngestResultSchema
WatchdogQueuedJobSchema
Section titled “WatchdogQueuedJobSchema”Re-exports WatchdogQueuedJobSchema
WatchdogQueueHeadSchema
Section titled “WatchdogQueueHeadSchema”Re-exports WatchdogQueueHeadSchema
WatchdogReadResultSchema
Section titled “WatchdogReadResultSchema”Re-exports WatchdogReadResultSchema
WatchdogRunningJobSchema
Section titled “WatchdogRunningJobSchema”Re-exports WatchdogRunningJobSchema
WatchdogSettledJobSchema
Section titled “WatchdogSettledJobSchema”Re-exports WatchdogSettledJobSchema
WatchdogStoredJobSchema
Section titled “WatchdogStoredJobSchema”Re-exports WatchdogStoredJobSchema
EffectWatchdogOptions
Section titled “EffectWatchdogOptions”Re-exports EffectWatchdogOptions
EffectWatchdogExecutor
Section titled “EffectWatchdogExecutor”Re-exports EffectWatchdogExecutor
WatchdogCancellationDecision
Section titled “WatchdogCancellationDecision”Re-exports WatchdogCancellationDecision
WatchdogCancellationIntent
Section titled “WatchdogCancellationIntent”Re-exports WatchdogCancellationIntent
WatchdogCancellationResult
Section titled “WatchdogCancellationResult”Re-exports WatchdogCancellationResult
WatchdogExecutionDecision
Section titled “WatchdogExecutionDecision”Re-exports WatchdogExecutionDecision
WatchdogIngestResult
Section titled “WatchdogIngestResult”Re-exports WatchdogIngestResult
WatchdogLivenessUnknown
Section titled “WatchdogLivenessUnknown”Re-exports WatchdogLivenessUnknown
WatchdogLaneFailure
Section titled “WatchdogLaneFailure”Re-exports WatchdogLaneFailure
WatchdogLaneFailureResult
Section titled “WatchdogLaneFailureResult”Re-exports WatchdogLaneFailureResult
WatchdogQueuedJob
Section titled “WatchdogQueuedJob”Re-exports WatchdogQueuedJob
WatchdogQueueHead
Section titled “WatchdogQueueHead”Re-exports WatchdogQueueHead
WatchdogQueueProjector
Section titled “WatchdogQueueProjector”Re-exports WatchdogQueueProjector
WatchdogQueueTransition
Section titled “WatchdogQueueTransition”Re-exports WatchdogQueueTransition
WatchdogReadResult
Section titled “WatchdogReadResult”Re-exports WatchdogReadResult
WatchdogRunningJob
Section titled “WatchdogRunningJob”Re-exports WatchdogRunningJob
WatchdogRuntimeEffect
Section titled “WatchdogRuntimeEffect”Re-exports WatchdogRuntimeEffect
ConcurrentWatchdogRuntimeEffect
Section titled “ConcurrentWatchdogRuntimeEffect”Re-exports ConcurrentWatchdogRuntimeEffect
WatchdogSettledJob
Section titled “WatchdogSettledJob”Re-exports WatchdogSettledJob
WatchdogSqliteCursor
Section titled “WatchdogSqliteCursor”Re-exports WatchdogSqliteCursor
WatchdogSqliteOwner
Section titled “WatchdogSqliteOwner”Re-exports WatchdogSqliteOwner
WatchdogSqliteValue
Section titled “WatchdogSqliteValue”Re-exports WatchdogSqliteValue
WatchdogSqliteRow
Section titled “WatchdogSqliteRow”Re-exports WatchdogSqliteRow
WatchdogStoredJob
Section titled “WatchdogStoredJob”Re-exports WatchdogStoredJob
WatchdogTickResult
Section titled “WatchdogTickResult”Re-exports WatchdogTickResult
WatchdogTransactionalProjection
Section titled “WatchdogTransactionalProjection”Re-exports WatchdogTransactionalProjection
watchdogSqliteValueSchema
Section titled “watchdogSqliteValueSchema”Re-exports watchdogSqliteValueSchema
watchdogSqliteRowSchema
Section titled “watchdogSqliteRowSchema”Re-exports watchdogSqliteRowSchema