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
16 changes: 10 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ crates/
├── identity/ — Ed25519 identity, message signing, profiles (willow-identity)
├── messaging/ — Chat messages, HLC ordering, message store (willow-messaging)
├── crypto/ — E2E encryption: ChaCha20-Poly1305, X25519 key exchange (willow-crypto)
├── channel/ — Servers, channels, roles, permissions (willow-channel)
├── network/ — iroh-based P2P networking (willow-network)
│ └── src/
│ ├── lib.rs — Module exports, re-exports
Expand Down Expand Up @@ -181,14 +180,19 @@ interaction.

## Architecture Notes

### Authority Model

See [`docs/specs/2026-04-12-state-authority-and-mutations.md`](docs/specs/2026-04-12-state-authority-and-mutations.md).
All authority checks live in `willow-state::materialize::apply_event`
and the `required_permission()` table. Permissions are checked before
an event is created — rejected events never enter the DAG.

### Dependency Graph

```
willow-web → willow-client → willow-state
→ willow-network (iroh, iroh-gossip, iroh-blobs)
→ willow-crypto → willow-identity → willow-transport
→ willow-channel → willow-crypto
→ willow-identity
→ willow-messaging → willow-identity
(defines SealedContent used by willow-crypto)
```
Expand Down Expand Up @@ -270,9 +274,9 @@ consistent ordering even when system clocks drift.

### Adding a new permission

1. Add a variant to `Permission` in `crates/channel/src/lib.rs`
2. Check it in the relevant server methods
3. Add tests
1. Add a variant to `Permission` in `crates/state/src/event.rs`
2. Add the `EventKind` → `Permission` mapping to `required_permission()` in `crates/state/src/materialize.rs`
3. Add state-machine tests: grant, revoke, rejection without permission

### Adding a new iroh protocol

Expand Down
19 changes: 1 addition & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/agent/src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ struct CurrentServerResource {
#[derive(Serialize)]
struct ChannelEntry {
name: String,
kind: String,
kind: willow_state::ChannelKind,
}

#[derive(Serialize)]
Expand Down
24 changes: 0 additions & 24 deletions crates/channel/Cargo.toml

This file was deleted.

Loading
Loading