> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# DurabilityBackend

> Interface exported by @botmesh/core.

Defined in: [durability/types.ts:320](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L320)

A durability backend: the two journals plus optional lifecycle.

## Extended by

* [`CrashableBackend`](https://botmesh.afaya.com.co/api/core/testing/interfaces/CrashableBackend)

## Properties

### inbox

```ts theme={null}
readonly inbox: InboxJournal;
```

Defined in: [durability/types.ts:321](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L321)

***

### outbox

```ts theme={null}
readonly outbox: OutboxJournal;
```

Defined in: [durability/types.ts:322](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L322)

***

### exclusive?

```ts theme={null}
readonly exclusive?: boolean;
```

Defined in: [durability/types.ts:327](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L327)

`true` when only one process can use the backend at a time (memory, file). A restarted
process then knows every lease of its `instanceId` is its own dead incarnation's.

## Methods

### scope()?

```ts theme={null}
scope?(name): DurabilityBackend;
```

Defined in: [durability/types.ts:334](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L334)

A view of the same storage holding only the records of `name`. The bot opens the view
of its namespace (tenant, environment, bot, connection), so several bots can share one
backend: each claims, replays and deduplicates only its own records, and explicit
idempotency keys are per bot. A backend without `scope` must not be shared between bots.

#### Parameters

| Parameter | Type |
| - | - |
| `name` | `string` |

#### Returns

`DurabilityBackend`

***

### start()?

```ts theme={null}
start?(): Promise<void>;
```

Defined in: [durability/types.ts:336](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L336)

Called by `bot.start()` before anything is replayed.

#### Returns

`Promise`\<`void`>

***

### stop()?

```ts theme={null}
stop?(): Promise<void>;
```

Defined in: [durability/types.ts:338](https://github.com/andresayac/botmesh/blob/main/packages/core/src/durability/types.ts#L338)

Called by `bot.stop()` after the provider stopped.

#### Returns

`Promise`\<`void`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.