Clarify category folders, regenerate npm script, and OTA prestage docs. Co-authored-by: Cursor <[email protected]>
37 lines
2.2 KiB
Markdown
37 lines
2.2 KiB
Markdown
# Pearcord platform mixins
|
||
|
||
Prototype mixins merged onto `PearcordPlatform` in **manifest order** ([`platform-mixin-assign-manifest.js`](../platform-mixin-assign-manifest.js)). Do not reorder rows without a regression pass (`npm run test:phase730-mixin-manifest`).
|
||
|
||
## Layout
|
||
|
||
| Folder | Contents | Manifest rows (approx.) |
|
||
|--------|----------|------------------------|
|
||
| [`domain/`](domain/) | Legacy feature mixins (`permissions-mixin`, `user-settings`, …) | 1–16 |
|
||
| [`json-export/`](json-export/) | Signed JSON mesh export mixins (`*-json-mixin.js`) | 17–59 |
|
||
| [`runtime/core/`](runtime/core/) | Hyperswarm, session, capabilities, diagnostics | 60–65 |
|
||
| [`runtime/mesh/`](runtime/mesh/) | Guild mesh peers, auto-heal, federation view | 66–74 |
|
||
| [`runtime/guild-sync/`](runtime/guild-sync/) | Sync watermarks, gossip outbox, wire, ingest/export | 75–88 |
|
||
| [`runtime/search-discovery/`](runtime/search-discovery/) | Search index, discovery listings, forum search | 89–103 |
|
||
| [`runtime/partition-heal/`](runtime/partition-heal/) | Partition heal state + domain heal mixins | 72, 104–112 |
|
||
| [`runtime/view/`](runtime/view/) | `view()`, caches, unread audit | 97, 109–111, 126 |
|
||
| [`runtime/voice-dm/`](runtime/voice-dm/) | DM session, voice mesh state, contacts presence | 92–93, 129–130 |
|
||
| [`runtime/features/`](runtime/features/) | Messaging, permissions, channels, bots, settings prefs, … | remainder |
|
||
|
||
Path map: [`mixin-paths.json`](mixin-paths.json). Regenerate after adding a mixin:
|
||
|
||
```bash
|
||
python3 apps/pearcord/scripts/generate-mixin-paths-json.py
|
||
# edit map / categorize() if needed
|
||
python3 apps/pearcord/scripts/migrate-platform-mixin-dirs.py --manifest-only # after manual mv
|
||
cd modules/pearcord-platform && python3 ../../apps/pearcord/scripts/regenerate-apply-platform-mixins.py
|
||
cd modules/pearcord-platform && python3 ../../apps/pearcord/scripts/regenerate-runtime-mixin-registry.py
|
||
```
|
||
|
||
## Adding a new `platform-*` mixin
|
||
|
||
1. Add file under the correct `runtime/<category>/` folder.
|
||
2. Append a row to `platform-mixin-assign-manifest.js` (usually near related mixins).
|
||
3. Run both regenerate scripts and `npm run test:phase730-mixin-manifest`.
|
||
|
||
See [PLATFORM_MIXINS.md](../../docs/PLATFORM_MIXINS.md) for architecture context.
|