@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Module @botmesh/core/spi

    @botmesh/core/spi — the service-provider interface: what authors of backends and transports build on, kept out of the application entry (@botmesh/core).

    • Stores (IStore): the message-key helpers, the checkpoint record types, the user-data rows. Every store runs the shared conformance suite (test-utils/store-conformance.ts).
    • Durability backends (DurabilityBackend): KvDurability over any DurableKv, the reference MemoryKv, the inbox/outbox journal contracts and record types, the retry policy and the errors a backend throws.
    • Schedule stores (ScheduleStore): the record types, the reference MemoryScheduleStore and the claim/complete rules every backend must follow.
    • Leases and coordinators (LeaseProvider, Coordinator): the reference MemoryLeaseProvider and the turn/leadership types.
    • Transports (IProvider): toInboundLocation(), the native-form helpers and the built-in message catalog for texts rendered outside a bot.
    • Tracer integrations (BotTracer): the no-op tracer and the W3C trace-context helpers.

    Unlike @botmesh/core/internal, everything here follows semver: a breaking change is a major release of @botmesh/core.

    import { KvDurability, MemoryKv, messageKey } from '@botmesh/core/spi'
    
    toInboundLocation
    messageKey
    legacyMessageKey
    computeBackoff
    assertKvMutation
    formReplyBody
    parseFormReply
    formOptionEntries
    isFieldRequired
    assertFormDefinition
    selectionBounds
    parseFormDate
    parseFieldAnswer
    validateFormValues
    normalizeLocale
    isScheduleClaimable
    applyScheduleComplete
    errorTypeOf
    formatTraceparent
    parseTraceparent
    supportsUserData
    DurableTable
    KvMutation
    InboxState
    InboxAppend
    OutboxState
    OutboxPut
    FieldCheck
    FormValidation
    ScheduleKind
    UserDataStore
    LeaseGrant
    LeaseInfo
    Ticket
    ChatTurn
    Leadership
    AcquireTurnOptions
    InboundLocationInput
    CheckpointAnswer
    CheckpointHandover
    UserDataEntry
    KvDurabilityOptions
    DurableKvEntry
    DurableKvIndex
    MemoryKvSnapshot
    InboxRecord
    LeaseOptions
    ClaimOptions
    OutboxClaimOptions
    InboxJournal
    OutboxError
    OutboxRecord
    ClaimedSend
    OutboxJournal
    FormFieldError
    I18nLogger
    I18nOptions
    ScheduleRecord
    ClaimResult
    CompletePatch
    CheckpointTrace
    MemoryLeaseProvider
    StaleLeaseError
    KvInbox
    KvOutbox
    KvDurability
    MemoryKv
    I18n
    MemoryScheduleStore
    IStore → IStore
    StoredMessage → StoredMessage
    StoredChat → StoredChat
    StoredContact → StoredContact
    FlowCheckpoint → FlowCheckpoint
    AIMessage → AIMessage
    IProvider → IProvider
    ProviderCapabilities → ProviderCapabilities
    InboundEvent → InboundEvent
    LoggerLike → LoggerLike
    DurableKv → DurableKv
    DurabilityBackend → DurabilityBackend
    ScheduleStore → ScheduleStore
    LeaseProvider → LeaseProvider
    SchedulerLease → SchedulerLease
    Coordinator → Coordinator
    CoordinatorEvents → CoordinatorEvents
    Fence → Fence
    LeaseLossReason → LeaseLossReason
    BotTracer → BotTracer
    JsonValue → JsonValue
    DEFAULT_BACKOFF
    noopTracer
    NOOP_TRACING