Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[![Platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20Android%20%7C%20macOS%20%7C%20Linux%20%7C%20Windows-lightgrey.svg)](#building-the-sdk)
[![Discord](https://img.shields.io/badge/chat-Discord-5865F2.svg?logo=discord&logoColor=white)](https://discord.gg/9TQGrxaPJk)

**Dual-licensed:** use it under [AGPL-3.0-only](LICENSE), or buy a [commercial license](LICENSE-COMMERCIAL.md), your call — see the [License](#license) section for the full breakdown.
**Dual-licensed:** use it under [AGPL-3.0-only](LICENSE), or buy a [commercial license](LICENSE-COMMERCIAL.md), your call — see the [License](#license) section for the full breakdown. **Choosing?** Start with the [license decision tree](docs/licensing-decision-tree.md) (then [Licensing FAQ](docs/licensing-faq.md)).

## Features

Expand Down
2 changes: 2 additions & 0 deletions bindings/flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Flutter plugin for the [Offline Protocol SDK](https://github.com/Offline-Protocol/offline-protocol-sdk): offline-first mesh messaging with MLS encryption.

**Dual-licensed:** [AGPL-3.0-only](../../LICENSE) or [commercial license](../../LICENSE-COMMERCIAL.md). Package manifests list AGPL SPDX only — see [license decision tree](../../docs/licensing-decision-tree.md) before legal review.

Hand-written native bridge code is shared with the React Native module under
`bindings/react-native/{ios,android}`
([ADR 0025](../../docs/adr/0025-native-packages-are-assembled-in-place.md)).
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Python bindings for the Offline Protocol SDK: offline-first mesh networking with
[docs/python-distribution.md](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/docs/python-distribution.md)
(supported hosts, and what to run on Alpine, an older glibc or an Intel Mac).

**Dual-licensed:** use it under [AGPL-3.0-only](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/LICENSE), or buy a [commercial license](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/LICENSE-COMMERCIAL.md), your call. The package metadata can only name `AGPL-3.0-only` because SPDX has no identifier for the commercial offer — see [License](#license) for the full breakdown.
**Dual-licensed:** use it under [AGPL-3.0-only](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/LICENSE), or buy a [commercial license](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/LICENSE-COMMERCIAL.md), your call. The package metadata can only name `AGPL-3.0-only` because SPDX has no identifier for the commercial offer — see [License](#license) for the full breakdown. **Choosing?** [License decision tree](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/docs/licensing-decision-tree.md) → [Licensing FAQ](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/docs/licensing-faq.md).

> **Upgrading an existing install?** Read [docs/UPGRADING.md](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/docs/UPGRADING.md)
> first — `ProtocolManager` now requires an explicit `state_root`, and this
Expand Down
2 changes: 1 addition & 1 deletion bindings/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Offline-first mesh networking SDK for React Native. Enables peer-to-peer messaging over BLE, WiFi Direct, Internet, Reticulum, and Nostr relays with intelligent transport switching.

**Dual-licensed:** use it under [AGPL-3.0-only](./LICENSE), or buy a [commercial license](./LICENSE-COMMERCIAL.md), your call. The npm manifest can only name `AGPL-3.0-only` because SPDX has no identifier for the commercial offer — see [License](#license) for the full breakdown.
**Dual-licensed:** use it under [AGPL-3.0-only](./LICENSE), or buy a [commercial license](./LICENSE-COMMERCIAL.md), your call. The npm manifest can only name `AGPL-3.0-only` because SPDX has no identifier for the commercial offer — see [License](#license) for the full breakdown. **Choosing?** [License decision tree](../../docs/licensing-decision-tree.md) → [Licensing FAQ](../../docs/licensing-faq.md).

> **Upgrading an existing app?** Read [docs/UPGRADING.md](https://github.com/Offline-Protocol/offline-protocol-sdk/blob/main/docs/UPGRADING.md)
> first — this release changes storage, adds new input rejections, and is not
Expand Down
46 changes: 46 additions & 0 deletions crates/offline-protocol-uniffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25685,4 +25685,50 @@ mod tests {
);
}
}

/// Friction #31: integrators get a license decision tree linked from package
/// READMEs and the integrator map.
#[test]
fn licensing_decision_tree_is_linked_from_package_readmes() {
let repo = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.and_then(std::path::Path::parent)
.expect("repository root");
let tree = std::fs::read_to_string(repo.join("docs/licensing-decision-tree.md"))
.expect("licensing-decision-tree.md");
let map =
std::fs::read_to_string(repo.join("docs/integrator-map.md")).expect("integrator-map");
for needle in [
"not legal advice",
"Commercial license",
"AGPL-3.0-only",
"legal@offlineprotocol.com",
"licensing-faq.md",
] {
assert!(
tree.contains(needle),
"licensing-decision-tree.md must mention `{needle}`"
);
}
assert!(
map.contains("licensing-decision-tree.md"),
"integrator-map must link licensing-decision-tree.md"
);
for (path, label) in [
("README.md", "repository README"),
(
"bindings/react-native/README.md",
"React Native package README",
),
("bindings/python/README.md", "Python package README"),
("bindings/flutter/README.md", "Flutter README"),
] {
let readme = std::fs::read_to_string(repo.join(path))
.unwrap_or_else(|e| panic!("read {label}: {e}"));
assert!(
readme.contains("licensing-decision-tree.md"),
"{label} must link licensing-decision-tree.md"
);
}
}
}
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ before changing behaviour, not before using the SDK.
| [Mobile permissions](mobile-permissions.md) | **iOS and Android:** Info.plist, manifest, runtime grants, background mesh |
| [Transport troubleshooting](troubleshooting.md) | **QA:** Wi‑Fi Direct timing, several SDK apps on one phone, false "broken SDK" |
| [Integration testing matrix](integration-testing-matrix.md) | **QA:** simulator vs hardware, golden smoke paths, release milestones |
| [License decision tree](licensing-decision-tree.md) | **Legal triage:** AGPL vs commercial before first import |
| [Quick Start](../QUICKSTART.md) | Get started in 5 minutes (React Native, iOS, Android) |
| [Upgrading](UPGRADING.md) | **Breaking changes and required app-side work** (use the [version index](UPGRADING.md#start-here-version-and-surface-index) first) |
| [React Native Integration](react-native-integration.md) | Full SDK integration guide with complete API reference |
Expand Down Expand Up @@ -174,5 +175,6 @@ in here fails **silently** when violated.

| Resource | Description |
|----------|-------------|
| [Licensing FAQ](licensing-faq.md) | The dual license in practice: app stores, the AGPL's reach, commercial licensing |
| [License decision tree](licensing-decision-tree.md) | AGPL vs commercial — start here before legal review |
| [Licensing FAQ](licensing-faq.md) | App stores, §13, telemetry (after the tree) |
| [Export Control Notice](../EXPORT.md) | Encryption export status of the SDK and what app teams must handle themselves |
3 changes: 2 additions & 1 deletion docs/integrator-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,5 @@ version for the index).
| [Documentation index](README.md) | Full list of guides and spec |
| [Bridge contracts](bridges/README.md) | Boundary rules (silent failures if violated) |
| [Architecture](architecture.md) | Crate layout and design |
| [Licensing FAQ](licensing-faq.md) | AGPL vs commercial |
| [License decision tree](licensing-decision-tree.md) | AGPL vs commercial — start here for legal triage |
| [Licensing FAQ](licensing-faq.md) | App Store, §13, telemetry (after the tree) |
72 changes: 72 additions & 0 deletions docs/licensing-decision-tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# License decision tree

**Purpose:** Fast legal/product triage before you import the SDK. This is
**not legal advice**; it routes you to the authoritative text. Nothing here
changes either license.

| Document | Role |
|----------|------|
| [LICENSE](../LICENSE) | AGPL-3.0-only grant |
| [LICENSE-COMMERCIAL.md](../LICENSE-COMMERCIAL.md) | Commercial alternative |
| [Licensing FAQ](licensing-faq.md) | App Store, §13, telemetry, export (read after this tree) |

**SPDX note:** npm/PyPI/crates metadata name **`AGPL-3.0-only` only**. The
commercial license is a separate grant, not a second SPDX id on the package.

---

## Decision flow

Answer in order. The first **stop** that matches your situation is your default
path; read the FAQ section it points to before sign-off.

```mermaid
flowchart TD
start([You will ship or distribute something that links or embeds the SDK])
start --> q1{Is the **whole product** allowed to be AGPL-3.0-only, with corresponding source offered to everyone you **distribute** the product to?}
q1 -->|No| commercial[Stop: **Commercial license** — email legal@offlineprotocol.com]
q1 -->|Yes| q2{"Distributing on the **Apple App Store** (including open source)?"}
q2 -->|Yes| commercial
q2 -->|No| q3{Distributing on **Google Play** or other stores as a **proprietary** app?}
q3 -->|Yes| commercial
q3 -->|No| q4{Will you **modify** the SDK and ship mesh/P2P software where remote peers use your build?}
q4 -->|Yes, and AGPL source offer to those users is not acceptable| commercial
q4 -->|No, or you can comply with §13| agpl[Stop: **AGPL-3.0-only** — comply with LICENSE + CLA if you contribute upstream]
```

Plain-language reading of the branches:

1. **AGPL covers your whole app** when you link the SDK ([FAQ](licensing-faq.md#my-app-links-the-sdk-does-the-agpl-cover-my-whole-app)). If you cannot release your application under AGPL-3.0 with source to recipients, do not assume the free license fits.
2. **Apple App Store** (proprietary or AGPL open-source app) — treat as
**commercial** ([FAQ](licensing-faq.md#can-i-ship-an-agpl-licensed-app-on-the-apple-app-store)).
AGPL App Store distribution is unsupported; no §7 app-store exception is
granted today.
3. **Google Play** — proprietary apps → **commercial** (same as closed iOS). AGPL-3.0
apps with source offered to every recipient can follow the **AGPL** path when
q4 still allows it ([FAQ](licensing-faq.md#what-about-google-play)).
4. **Modified SDK in mesh** — AGPL **§13** may require source offers to remote users, not only installers ([FAQ](licensing-faq.md#does-the-network-clause-13-matter-for-a-mesh-app)).

---

## Quick picks (common integrator profiles)

| Profile | Usual path | Next read |
|---------|------------|-----------|
| Any app on the **Apple App Store** (proprietary or AGPL open source) | Commercial | [FAQ: App Store](licensing-faq.md#can-i-ship-an-agpl-licensed-app-on-the-apple-app-store) |
| **Proprietary** Android app on Google Play or other stores | Commercial | [FAQ: Google Play](licensing-faq.md#what-about-google-play) |
| **AGPL-3.0** Android app on Google Play (source to recipients, combined-work rules met) | AGPL | [FAQ: Google Play](licensing-faq.md#what-about-google-play), [LICENSE](../LICENSE) |
| Closed-source desktop or backend service | Commercial | FAQ: combined work |
| AGPL-3.0 app (source published, recipients get corresponding source) | AGPL | [LICENSE](../LICENSE), [CONTRIBUTING](../CONTRIBUTING.md) |
| OSS app under a license **incompatible** with AGPL for the combined work | Commercial or do not link | FAQ + your counsel |
| Evaluating only (no distribution yet) | Decide before first beta | This tree again before store submit |

---

## After you choose

| Path | Action |
|------|--------|
| **AGPL-3.0-only** | Keep `LICENSE` and notices in redistributions; plan source offers; telemetry optional ([FAQ](licensing-faq.md#is-telemetry-part-of-the-license)) |
| **Commercial** | Contact legal@offlineprotocol.com with product, distribution model, scale ([LICENSE-COMMERCIAL.md](../LICENSE-COMMERCIAL.md)) |

Export control is separate from copyright: [EXPORT.md](../EXPORT.md).
Loading