This commit is contained in:
Raven Scott
2026-04-21 20:05:57 -04:00
parent 064c2a9338
commit 17af3ac65f
41 changed files with 1428 additions and 47 deletions
+10 -2
View File
@@ -26,7 +26,7 @@ Former **DOCUMENTATION.md** §10. [Reference index →](README.md)
Re-exports from `./constants.js`: `PROTOCOL_NAME`, `TOPIC_STRING`, `BLOCK_SIZE`, `MBR_MAGIC`, `topicKey`, `buildMbr`, `parseMbr`.
Re-exports from `./lib/channel.js`: `setupSeedChannel`.
Re-exports from `./lib/channel.js`: `setupSeedChannel`, and from `./lib/chat-channel.js`: `setupBareOsChatChannel`.
Re-exports from `./lib/seed-rpc-methods.js`: `BARE_OS_SEED_RPC_METHODS`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAMES`, `BARE_OS_SEED_RPC_METHOD_SHORT_NAME_SET`, `bareOsIsAllowedSeedRpcMethodShort` (strict client-side allowlist helper matching **`channel.js`**).
@@ -69,7 +69,15 @@ When Capability word **6** (replication operator surface) is advertised, the sto
- **Message 6**: RPC response encoding.
- Calls `replicateDrive(mux.stream)` (typically `drive.replicate(stream)`).
### 10.6 [packages/bare-os-protocol/test.js](../../packages/bare-os-protocol/test.js)
Unless **`opts.enableBareOsChatChannel`** is **`false`** or **`BARE_OS_PROTOMUX_CHAT_CHANNEL`** opts out (**`0`** / **`false`** / **`off`** / **`no`**), **`setupSeedChannel`** pairs **`bare-os-chat-v1`** by default via **`setupBareOsChatChannel`** (see **`lib/chat-channel.js`** / **`lib/chat-messages.js`** / **`lib/chat-env.js`**) and adds optional **`chatChannel`** metadata to **`bare_os.capabilities`** JSON.
### 10.6 Chat channel [packages/bare-os-protocol/lib/chat-channel.js](../../packages/bare-os-protocol/lib/chat-channel.js)
**`setupBareOsChatChannel(mux, handlers)`**
- Registers Protomux **`bare-os-chat-v1`** (`PROTOCOL_CHAT_CHANNEL_NAME`) — six compact-encoded messages (**hello**, **helloAck**, **join**, **leave**, **`event`**, **`control`**); no Hyperdrive replication on this channel.
### 10.7 [packages/bare-os-protocol/test.js](../../packages/bare-os-protocol/test.js)
Brittle tests: