Skip to content

index

@fungi.computer/bird-dog


@fungi.computer/bird-dog / index

BirdDogAgentReference = Readonly<{ kind: "agent"; agentId: string; sessionId: string; }>

An ordinary agent Session address. Relationships between agents live elsewhere.


BirdDogMail = Readonly<{ key: string; to: BirdDogAgentReference; from: BirdDogAgentReference; replyTo: readonly BirdDogAgentReference[]; content: string; createdAt: number; }>

Addressed agent correspondence carried with durable work when a reply is owed.


BirdDogAgentWork = Readonly<{ jobId: string; sessionId: string; commandFactId: string; recovery?: Readonly<{ maxRecoveries: number; }>; }>

The accepted Session work BirdDog points at from an opaque Watchdog job.


BirdDogAgentJobPayload = Readonly<{ work: Readonly<{ sessionId: string; commandFactId: string; }>; mail?: BirdDogMail; }>

Typed payload whose meaning belongs to BirdDog, never Watchdog.


BirdDogAgentJobInput = Readonly<{ work: BirdDogAgentWork; mail?: BirdDogMail; }>

Input for projecting accepted agent work into Watchdog’s generic grammar.


BirdDogOutbox = Readonly<{ put: (key, value) => Promise<void>>; read: (key) => Promise<string | undefined>>; list: (limit, afterKey?) => Promise<readonly Readonly<{ key: string; value: string; }>[]>; delete: (key) => Promise<void>>; }>

String-backed durable outbox owned by the BirdDog host.


BirdDogOptions = Readonly<{ outbox: BirdDogOutbox; post: (mail) => Promise<boolean>>; scheduleWake: (at) => Promise<void>>; now: () => number; }>

Host ports for BirdDog’s durable mail delivery.


BirdDogSettlement = Readonly<{ job: WatchdogSettledJob; content: string; }>

Completed generic work plus the content owed to its correspondents.


BirdDogRuntime = Readonly<{ fanOut: (settlement) => Promise<void>>; drainOutbox: () => Promise<void>>; }>

Durable reply delivery behind the mail-room interface.


BirdDogApi = Readonly<{ agentJob: (input) => WatchdogQueuedJob; decodeAgentJob: (job) => BirdDogAgentJobPayload; make: (options) => Promise<BirdDogRuntime>>; }>

BirdDog’s small synchronous translation interface for owner transactions.

const BirdDog: BirdDogApi

Agent-aware mail translation over Watchdog’s payload-blind job grammar.