effect
Classes
Section titled “Classes”BirdDogError
Section titled “BirdDogError”BirdDog could not complete one owned store or transport operation.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BirdDogError(
message,options?):BirdDogError
Parameters
Section titled “Parameters”message
Section titled “message”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”
readonly_tag:"BirdDogError"
Stable discriminator for BirdDog-owned effect failures.
Type Aliases
Section titled “Type Aliases”EffectBirdDogOptions
Section titled “EffectBirdDogOptions”EffectBirdDogOptions =
Readonly<{outbox:Readonly<{put: (key,value) =>Effect.Effect<void,BirdDogError>>;read: (key) =>Effect.Effect<string|undefined,BirdDogError>>;list: (limit,afterKey?) =>Effect.Effect<readonlyReadonly<{key:string;value:string; }>[],BirdDogError>>;delete: (key) =>Effect.Effect<void,BirdDogError>>; }>;post: (Effect.Effect<boolean,BirdDogError>>;scheduleWake: (at) =>Effect.Effect<void,BirdDogError>>;now: () =>number; }>
Effect host ports for the durable mail room.
BirdDogEffect
Section titled “BirdDogEffect”BirdDogEffect =
Readonly<{fanOut: (settlement) =>Effect.Effect<void,BirdDogError>>;drainOutbox: () =>Effect.Effect<void,BirdDogError>>; }>
Effect-native durable reply delivery.
Variables
Section titled “Variables”BirdDogAgentReferenceSchema
Section titled “BirdDogAgentReferenceSchema”
constBirdDogAgentReferenceSchema:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>
Parser for an ordinary agent Session address.
BirdDogMailSchema
Section titled “BirdDogMailSchema”
constBirdDogMailSchema:Struct<{key:String;to:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;from:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;replyTo:$Array<Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>>;content:String;createdAt:Number; }>
Parser for addressed agent correspondence.
BirdDogAgentWorkSchema
Section titled “BirdDogAgentWorkSchema”
constBirdDogAgentWorkSchema:Struct<{jobId:String;sessionId:String;commandFactId:String;recovery:optional<Struct<{maxRecoveries:Int; }>>; }>
Parser for accepted Session work.
BirdDogAgentJobPayloadSchema
Section titled “BirdDogAgentJobPayloadSchema”
constBirdDogAgentJobPayloadSchema:Struct<{work:Struct<{sessionId:String;commandFactId:String; }>;optional<Struct<{key:String;to:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;from:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;replyTo:$Array<Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>>;content:String;createdAt:Number; }>>; }>
Parser for the payload that Watchdog stores without interpretation.
BirdDogAgentJobInputSchema
Section titled “BirdDogAgentJobInputSchema”
constBirdDogAgentJobInputSchema:Struct<{work:Struct<{jobId:String;sessionId:String;commandFactId:String;recovery:optional<Struct<{maxRecoveries:Int; }>>; }>;optional<Struct<{key:String;to:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;from:Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>;replyTo:$Array<Struct<{kind:Literal<"agent">>;agentId:String;sessionId:String; }>>;content:String;createdAt:Number; }>>; }>
Parser for accepted work entering BirdDog’s transactional projection.
Functions
Section titled “Functions”agentJobFromInput()
Section titled “agentJobFromInput()”agentJobFromInput(
input):object
Validate and translate agent work into Watchdog’s opaque job grammar.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”object
readonlystate:"queued"
readonlyjobId:string
readonlyqueue:string
readonlylane:string
priority
Section titled “priority”
readonlypriority:number
payload
Section titled “payload”
readonlypayload:unknown
recovery?
Section titled “recovery?”
readonlyoptionalrecovery?:object
recovery.maxRecoveries
Section titled “recovery.maxRecoveries”
readonlymaxRecoveries:number
decodeAgentJob()
Section titled “decodeAgentJob()”decodeAgentJob(
job):BirdDogAgentJobPayload
Decode the opaque payload at BirdDog’s side of the Watchdog seam.
Parameters
Section titled “Parameters”{ state: "queued"; jobId: string; queue: string; lane: string;
priority: number; payload: unknown; recovery?: { maxRecoveries:
number; }; } | { state: "running"; jobId: string; queue:
string; lane: string; priority: number; payload: unknown;
recovery?: { maxRecoveries: number; }; } | { state: "settled";
outcome: "failed" | "completed" | "interrupted" | "cancelled" |
"outcome_unknown"; failureReason?: string; jobId: string; queue:
string; lane: string; priority: number; payload: unknown;
recovery?: { maxRecoveries: number; }; }
Type Literal
Section titled “Type Literal”{ state: "settled"; outcome: "failed" | "completed" |
"interrupted" | "cancelled" | "outcome_unknown"; failureReason?:
string; jobId: string; queue: string; lane: string; priority:
number; payload: unknown; recovery?: { maxRecoveries: number; };
}
"settled"
outcome
Section titled “outcome”"failed" | "completed" | "interrupted" | "cancelled" |
"outcome_unknown"
failureReason?
Section titled “failureReason?”string
Why a job failed or exhausted disappearance recovery, when known.
string
string
string
priority
Section titled “priority”number
payload
Section titled “payload”unknown
recovery?
Section titled “recovery?”{ maxRecoveries: number; }
recovery.maxRecoveries
Section titled “recovery.maxRecoveries”number
Returns
Section titled “Returns”make()
Section titled “make()”make(
options):Effect<Readonly<{fanOut: (settlement) =>Effect<void,BirdDogError>>;drainOutbox: () =>Effect<void,BirdDogError>>; }>>
Construct BirdDog’s Effect-native mail room over Post’s shared outbox.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Effect<Readonly<{ fanOut: (settlement) => Effect<void,
BirdDogError>; drainOutbox: () => Effect<void,
BirdDogError>; }>>