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

> ## Agent Instructions
> These docs target Mesh SDK v0.27.0. Match the installed package and binding before generating code. Start at /getting-started/agents for task-specific reading paths.
> Call the company and product Offline Protocol, never Offline alone. Current packages: @offline-protocol/mesh-sdk 0.27.0 (React Native), @offline-protocol/id-react 0.2.0, @offline-protocol/id-react-native 0.3.3, @offline-protocol/pol 0.1.2 and @offline-protocol/cli 0.2.6. Canonical docs URLs start with https://www.offlineprotocol.com/docs.
> The Mesh SDK runs in a native app or gateway. A browser OfflineID SDK integration does not provide browser mesh transport. Local mesh operation does not require a portal API key.
> Service RPC is signed plaintext in v0.27.0. Message delivery, durable local acceptance and backend commit are distinct outcomes. Use the workflow guide for the required application logic.
> Offline Protocol CLI 0.2.6 is on npm (@offline-protocol/cli, command offline). Its local MCP server runs with offline mcp serve and requires no login or key. Hosted MCP is at https://mcp.offlineprotocol.com/mcp with an application API key in Authorization: Bearer and a matching x-app-id; organization keys are rejected. Follow /tools/overview for setup and do not invent commands beyond it. MCP provides integration context and planning, not mesh execution; file-writing tools are local only.
> Phone Wi-Fi Direct and MultipeerConnectivity carry no data in v0.27.0. Use BLE or a provisioned relay. The receiver core ACKs before application persistence; use application acceptance for durable workflows.
> Proof of Location is Sepolia testnet witness evidence, not zero-knowledge proof or proof of presence. The geohash is public onchain. Read /proof-of-location/security before integration.

# Upgrade the SDK

> Upgrade the Offline Protocol Mesh SDK to v0.27.0 while preserving device identities, persisted work and application event handling across releases.

These guides target v0.27.0. Pin the package while qualifying your application and review the [versioned upgrade guide](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/v0.27.0/docs/UPGRADING.md) before changing it.

| Release | Application action |
| - | - |
| v0.17 | Update storage integration and fallible configuration APIs. |
| v0.20 | Remove manual iOS pod/linker setup; use autolinking. Treat `ProtocolState` as a string enum. |
| v0.21 | Replace `userId` with `profile`; use derived `off1…` addresses on the wire. Review session migration. |
| v0.23 | Remove learned-route APIs and `ProtocolConfig.path`; they have no replacement. |
| v0.24 | Handle freshness checks and key-package lifetime limits; schedule session rotation in the application. |
| v0.25 | Update the Reticulum gateway to contract v1; the gateway daemon is deployed separately. |
| v0.26 | Replace the telemetry sink API with `enableTelemetry`, `disableTelemetry` and `telemetryStats`. |
| v0.27 | Review transport identity, document interests/removal and group attachments; qualify changed Python BLE arguments. |

## Upgrade procedure

1. Record the currently deployed package and native-library versions.
2. Preserve a supported backup of identity and application state.
3. Build against the target release and resolve changed APIs.
4. Test restart, pending work and mixed-version peer behaviour on representative devices.
5. Release to a limited cohort and inspect failures before expanding.

A previous binary is not automatically a safe rollback for newer persisted state. Follow the release's storage compatibility guidance. Source on `main` can contain unreleased features; do not combine generated bindings from one revision with a native library from another.

## Runtime changes to qualify

In v0.26, delivery state survives restart, the pending TTL changes from 30 minutes to 24 hours, and deduplication defaults become 2,000 entries retained for 24 hours. Account for the larger retention window in disk and retry budgets. In v0.27, relay group traffic reaches phones. Test group delivery over the relay after upgrading; compilation alone does not exercise these paths.

## Upgrading to 0.21.0

A native rebuild is required, because new source files are compiled in on both platforms. Run
`pod install` for iOS. A JS-only update will not pick them up.

<Warning>
  Downgrading is not a rollback. The first launch on 0.21.0 moves delivery state out of the
  credential store into the app container and deletes the old copy. An older build comes up
  with an empty outbox, an empty pending queue, and an **empty block list**, meaning every
  previously blocked peer is silently unblocked. Roll forward with a hotfix rather than reverting the binary.
</Warning>
