Skip to main content
@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.
  • Flow interpreters (code that runs declarative steps inside a do, such as @botmesh/flow-schema): the cancellable pause and the form runner of the core interpreter.
Unlike @botmesh/core/internal, everything here follows semver: a breaking change is a major release of @botmesh/core.

Example

Forms

i18n

Store

User data

Scheduler

Errors

Provider

Durability

Coordination

Tracing

Also in @botmesh/core

IStore

Re-exports IStore

StoredMessage

Re-exports StoredMessage

StoredChat

Re-exports StoredChat

StoredContact

Re-exports StoredContact

FlowCheckpoint

Re-exports FlowCheckpoint

AIMessage

Re-exports AIMessage

IProvider

Re-exports IProvider

ProviderCapabilities

Re-exports ProviderCapabilities

InboundEvent

Re-exports InboundEvent

LoggerLike

Re-exports LoggerLike

DurableKv

Re-exports DurableKv

DurabilityBackend

Re-exports DurabilityBackend

ScheduleStore

Re-exports ScheduleStore

LeaseProvider

Re-exports LeaseProvider

SchedulerLease

Re-exports SchedulerLease

Coordinator

Re-exports Coordinator

CoordinatorEvents

Re-exports CoordinatorEvents

Fence

Re-exports Fence

LeaseLossReason

Re-exports LeaseLossReason

BotTracer

Re-exports BotTracer

JsonValue

Re-exports JsonValue