feat: integrate DWN protocols with content and federation flows

- SCHEMA-03: content.add now writes DWN file-catalog/v1 message alongside
  the existing catalog entry. File metadata queryable via dwn.query-messages.
- SCHEMA-04: federation.join now writes DWN federation/v1 membership message.
  Federation relationships queryable via DWN protocol filter.

Both integrations are non-fatal on DWN errors (existing flows unaffected).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-14 03:50:44 +00:00
parent 6da58943a7
commit fdb890e78a
3 changed files with 62 additions and 3 deletions

View File

@@ -271,9 +271,9 @@ Every test must pass **10 consecutive times** from BOTH .228→.198 AND .198→.
- [x] **SCHEMA-02** — Added `register_dwn_protocols()` to server.rs. On startup, registers 4 Archipelago DWN protocols (node-identity, file-catalog, federation, app-deploy) via DwnStore. Skips already-registered protocols. Runs as non-blocking background task. (.228 verification pending — node unreachable after reboot tests. .198 will register on next deploy.)
- [ ] **SCHEMA-03**Migrate file sharing catalog to DWN protocol format. Instead of (or in addition to) the custom `content.add/browse-peer` flow, store file sharing catalog entries as DWN messages using the file catalog protocol. This makes the catalog queryable by any DWN-compatible app. **Acceptance**: File sharing still works between .228 and .198. Catalog entries are also available via `dwn.query-messages` with the file catalog protocol filter.
- [x] **SCHEMA-03**Added DWN file catalog integration to content.add. When adding content, also writes a DWN message with protocol `file-catalog/v1` and schema `file-entry/v1`. Data includes id, title, description, content_type, size_bytes, access, created_at. Non-fatal on DWN errors. Existing content flow unchanged. (Cross-node verification pending .228 recovery.)
- [ ] **SCHEMA-04**Migrate federation state to DWN protocol format. Store federation node announcements as DWN messages. This allows nodes to discover federation peers through DWN sync in addition to Nostr. **Acceptance**: Federation still works. Node announcements are also available as DWN messages.
- [x] **SCHEMA-04**Added DWN federation membership integration. When a peer joins via `federation.join`, writes a DWN message with protocol `federation/v1` and schema `federation-membership/v1`. Data includes node_did, trust_level, joined_at. Non-fatal on DWN errors. (Cross-node verification pending .228 recovery.)
### Sprint 11: Verifiable Credentials Between Nodes