@ours.network/tg-connector 0.1.7 → 0.1.8-nightly.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/connector.js +74 -0
  2. package/dist/mufl_code/D812C6070397B0EB11D66D6D33D931C35E9442ACC141C35C51A7904A082B19E0.muflo +0 -0
  3. package/dist/mufl_code/actor.mu +27 -0
  4. package/dist/mufl_code/core/COMMERCIAL-LICENCE.md +25 -0
  5. package/dist/mufl_code/core/COMPATIBILITY.md +221 -0
  6. package/dist/mufl_code/core/CONTRIBUTING.md +37 -0
  7. package/dist/mufl_code/core/LICENSE +1 -1
  8. package/dist/mufl_code/core/NOTIFICATIONS_CONTRACT.md +290 -0
  9. package/dist/mufl_code/core/README.md +64 -49
  10. package/dist/mufl_code/core/SECURITY.md +40 -0
  11. package/dist/mufl_code/core/TRADEMARKS.md +24 -0
  12. package/dist/mufl_code/core/a2a_capabilities.mm +76 -1
  13. package/dist/mufl_code/core/a2a_control.mm +2 -1
  14. package/dist/mufl_code/core/a2a_messaging.mm +1677 -25
  15. package/dist/mufl_code/core/a2a_notifications.mm +1102 -0
  16. package/dist/mufl_code/core/a2a_protocol.mm +16 -1
  17. package/dist/mufl_code/core/a2a_versions.mm +801 -0
  18. package/dist/mufl_code/core/config.mufl +2 -0
  19. package/dist/mufl_code/core/docs/.vitepress/config.mts +58 -0
  20. package/dist/mufl_code/core/docs/citations.json +688 -0
  21. package/dist/mufl_code/core/docs/guide/01-vendor-the-core.md +50 -0
  22. package/dist/mufl_code/core/docs/guide/02-configure-and-compile.md +100 -0
  23. package/dist/mufl_code/core/docs/guide/03-wire-the-host.md +154 -0
  24. package/dist/mufl_code/core/docs/guide/04-connect-and-message.md +156 -0
  25. package/dist/mufl_code/core/docs/guide/05-test-your-app.md +75 -0
  26. package/dist/mufl_code/core/docs/guide/index.md +63 -0
  27. package/dist/mufl_code/core/docs/how-it-works/capabilities-and-control.md +77 -0
  28. package/dist/mufl_code/core/docs/how-it-works/cluster.md +65 -0
  29. package/dist/mufl_code/core/docs/how-it-works/identity.md +56 -0
  30. package/dist/mufl_code/core/docs/how-it-works/invites-and-contacts.md +76 -0
  31. package/dist/mufl_code/core/docs/how-it-works/messaging.md +55 -0
  32. package/dist/mufl_code/core/docs/how-it-works/monitoring-and-config.md +72 -0
  33. package/dist/mufl_code/core/docs/how-it-works/overview.md +45 -0
  34. package/dist/mufl_code/core/docs/how-it-works/versioning.md +116 -0
  35. package/dist/mufl_code/core/docs/index.md +27 -0
  36. package/dist/mufl_code/core/docs/package-lock.json +3467 -0
  37. package/dist/mufl_code/core/docs/package.json +15 -0
  38. package/dist/mufl_code/core/docs/reference/contributing.md +26 -0
  39. package/dist/mufl_code/core/docs/reference/glossary.md +108 -0
  40. package/dist/mufl_code/core/docs/reference/implementations.md +23 -0
  41. package/dist/mufl_code/core/docs/reference/modules.md +19 -0
  42. package/dist/mufl_code/core/docs/scripts/check-citations.mjs +36 -0
  43. package/dist/mufl_code/core/docs/scripts/check-denylist.mjs +30 -0
  44. package/dist/mufl_code/core/docs/scripts/gen-llms.mjs +32 -0
  45. package/dist/mufl_code/core/docs/workflows/cluster.md +89 -0
  46. package/dist/mufl_code/core/docs/workflows/contact-exchange.md +60 -0
  47. package/dist/mufl_code/core/docs/workflows/contact-restore.md +60 -0
  48. package/dist/mufl_code/core/docs/workflows/control-verbs.md +70 -0
  49. package/dist/mufl_code/core/docs/workflows/index.md +57 -0
  50. package/dist/mufl_code/core/docs/workflows/introductions.md +60 -0
  51. package/dist/mufl_code/core/docs/workflows/messaging.md +75 -0
  52. package/dist/mufl_code/core/docs/workflows/monitoring.md +84 -0
  53. package/dist/mufl_code/core/docs/workflows/notifications.md +109 -0
  54. package/dist/mufl_code/core/release-notes/0.1.md +60 -0
  55. package/dist/mufl_code/core/release-notes/0.3.md +22 -0
  56. package/dist/mufl_code/core/release-notes/0.4.md +97 -0
  57. package/dist/mufl_code/core/tests/README.md +17 -0
  58. package/dist/mufl_code/core/tests/corpus.mjs +139 -0
  59. package/dist/mufl_code/core/tests/corpus_actor.mu +242 -0
  60. package/dist/mufl_code/core/tests/fatcompile_actor.mu +52 -0
  61. package/dist/mufl_code/core/tests/mig.mjs +664 -0
  62. package/dist/mufl_code/core/tests/mig_actor.mu +466 -0
  63. package/dist/mufl_code/core/tests/migapp.mjs +431 -0
  64. package/dist/mufl_code/core/tests/migapp_actor.mu +294 -0
  65. package/dist/mufl_code/core/tests/mufl_semantics/run.sh +69 -0
  66. package/dist/mufl_code/core/tests/mufl_semantics/t11_three_version.mufl +47 -0
  67. package/dist/mufl_code/core/tests/mufl_semantics/t2_extra_fields.mufl +11 -0
  68. package/dist/mufl_code/core/tests/mufl_semantics/t7_runtime.mufl +30 -0
  69. package/dist/mufl_code/core/tests/mufl_semantics/t9_passthrough.mufl +19 -0
  70. package/dist/mufl_code/core/tests/mufl_semantics/t_str_order.mufl +19 -0
  71. package/dist/mufl_code/core/tests/notif.mjs +689 -0
  72. package/dist/mufl_code/core/tests/notif_actor.mu +458 -0
  73. package/dist/mufl_code/core/tests/protocol_container.mm +18 -0
  74. package/dist/mufl_code/core/tests/run.sh +8 -10
  75. package/dist/mufl_code/core/tests/run_corpus.sh +51 -0
  76. package/dist/mufl_code/core/tests/run_fatcompile.sh +40 -0
  77. package/dist/mufl_code/core/tests/run_mig.sh +51 -0
  78. package/dist/mufl_code/core/tests/run_migapp.sh +51 -0
  79. package/dist/mufl_code/core/tests/run_notif.sh +55 -0
  80. package/dist/mufl_code/core/tests/test.mjs +291 -49
  81. package/dist/mufl_code/core/tests/test_actor.mu +240 -7
  82. package/dist/mufl_code/core/tests/test_common.mjs +93 -0
  83. package/dist/mufl_code/core/version.mm +1 -1
  84. package/package.json +4 -4
  85. package/dist/mufl_code/2DA1D5F860E42C605D92F1E24E2466C70EFDDBF057BBCBA52F0ECC639EFCA387.muflo +0 -0
  86. package/dist/mufl_code/core/CLUSTER_API.md +0 -640
  87. package/dist/mufl_code/core/CLUSTER_CONTRACT.md +0 -121
  88. package/dist/mufl_code/core/CLUSTER_INTRODUCTION_PLAN.md +0 -200
  89. package/dist/mufl_code/core/CONFIGURATION_DESIGN.md +0 -35
  90. package/dist/mufl_code/core/CONFIGURATION_PLAN.md +0 -394
  91. package/dist/mufl_code/core/DEVELOPMENT.md +0 -168
  92. package/dist/mufl_code/core/EPHEMERAL_INVITE_PLAN.md +0 -465
  93. package/dist/mufl_code/core/GROUP_CHAT_DESIGN.md +0 -520
  94. package/dist/mufl_code/core/release-notes/2.0.md +0 -268
  95. package/dist/mufl_code/core/release-notes/2.1.md +0 -92
  96. package/dist/mufl_code/core/release-notes/2.2.md +0 -94
  97. package/dist/mufl_code/core/release-notes/3.0.md +0 -162
  98. package/dist/mufl_code/core/release-notes/3.1.md +0 -43
  99. package/dist/mufl_code/core/release-notes/README.md +0 -32
@@ -1,268 +0,0 @@
1
- # ours mufl core — Configuration / Control-Plane release notes
2
-
3
- Covers the generic configuration & control-plane features added to the shared
4
- mufl core on branch `feat/core-config-control-plane` (core **1.10 → 2.0**).
5
- Written for the engineers who will later wire these into the TS wrappers
6
- (MCP daemon, browser messenger) and other ours apps. **No app integration is
7
- included in this branch** — this is the protocol layer only.
8
-
9
- > Status: implemented + compiles clean against the ADAPT toolkit. B1/B3 code
10
- > reviewed GREEN by critic-1; B1 verified by ours-tester-1 (22/22 runtime +
11
- > hostile-write + cold-channel). **B2 was radically simplified in core 2.0**
12
- > (SAS / CP-signature / connect-descriptor machinery removed — see the B2 section);
13
- > the simplified design reviewed GREEN by critic. No open questions for the
14
- > dev/test track (the `outgoing_only` direction question is moot — policy was
15
- > removed from the protocol entirely).
16
-
17
- ## What shipped, by version
18
-
19
- | Core | Feature |
20
- |------|---------|
21
- | 1.11 | **B1** — forced monitoring: copy generation in the core send/recv chokepoint + `a2a_monitoring` (CP-side receiver). |
22
- | 1.12 | **B1 hardening** (hidden gate state, ceremony relocated into `a2a_messaging`) + **B3** — control-plane configuration (`set_app_config`). |
23
- | 1.13 | **B2** — `core.connect` control-plane introduction of two managed nodes. |
24
- | 1.14 | **B3 scope correction** — removed the typed per-contact policy / `outgoing_only` core enforcement; policy is app-level (human ruling). |
25
- | 1.15 | **B2 revision** — (superseded by 2.0) non-repudiable CP-signed introduction reusing `signed_intro_t`. |
26
- | **2.0** | **B2 radical simplification (BREAKING)** — removed SAS (`safety_number`/`pending_sas`/`confirm_introduction`/`list_pending_introductions`), the CP-signed intro path (`mint_cp_introduction`/`verify_cp_introduction`), and the `connect_descriptor_t` wrapper (`get_connect_descriptor`/`build_connect_descriptor`/`verify_connect_descriptor`). Introduction is now: CP relays each node the other's peer-signed address document; the node verifies the AD self-signature, that the relay came from its bound CP, and that its own manifest advertises `core.connect`, then registers immediately. New CP-side `introduce`/`introduce_to_group`; reworked node-side `ingest_connect_descriptor`. |
27
-
28
- B1/B3 (1.11–1.15) were additive (no existing wire shape changed bytes) — MIN
29
- bumps; a node compiled at an older core stayed wire-compatible. **Core 2.0 is a
30
- MAJ bump**: it removes wire shapes and changes the `ingest_connect_descriptor`
31
- payload, so consumers of the old `core.connect` surface must update (see
32
- *Breaking changes* below). The monitoring/config surface is unchanged across 2.0.
33
-
34
- ---
35
-
36
- ## Already present before this work (context)
37
-
38
- The manifest + capability surface the brief asked for already existed:
39
-
40
- - `a2a_capabilities::app_manifest_t` = `(version, app_id, name, description, monitoring_status, capabilities)`, read via the readonly **`get_manifest`** transaction. `app_id` is also auto-stamped on every `a2a_control` message.
41
- - Typed capabilities: `core.configuration`, `core.monitoring`, `core.connect`; verb envelope `(cap, verb, args, req_id)` + `dispatch`.
42
- - `core.configuration` carries an **opaque JSON `$params`** (schema + values the frontend renders) with **secret-field redaction** (`secret_field_t`, `$set/$unset/$needs_reentry`, epoch auto-clear on CP change).
43
- - `a2a_control` transport: `send_control(contact, payload)` + inbound `control_message` (origin + known-sender gated, `on_control_received` hook).
44
- - Connect primitives existed in an earlier form (`connect_descriptor_t` + `verify_connect_descriptor`, `safety_number` SAS); **all removed in core 2.0** in favour of relaying peer-signed address documents directly (see the B2 section).
45
-
46
- This work makes those usable as a **generic** control plane: forced monitoring,
47
- a place to store/enforce config, and an introduction flow.
48
-
49
- ---
50
-
51
- ## B1 — Forced monitoring
52
-
53
- **Goal:** once a control plane (CP) is bound, the node is protocol-forced to
54
- re-encrypt and forward a copy of every chat message to it, and the app cannot
55
- turn that off.
56
-
57
- ### Where the enforcement lives (and why)
58
- - Copy **generation** is unconditional core code in `a2a_messaging`’s
59
- `send_message` and `handle_receive_message` (the single path every app routes
60
- through) — **not** an app-injected hook (an app could no-op a hook).
61
- - The **gate state** (`monitoring_proxy`, `proxy_pending`) is declared `hidden`
62
- in `a2a_messaging`. `hidden` blocks external read **and** write, so no app or
63
- other library can do `a2a_messaging::monitoring_proxy -> NIL` to disable
64
- monitoring. Because hidden state is mutable only by its declaring library, the
65
- bind ceremony + disable live **in `a2a_messaging`**.
66
- - Copies are **fire-and-forget through the broker**: one
67
- `encrypted_channel::send_encrypted_tx` to the proxy, no local queue, no
68
- liveness handling. If the CP is offline the ADAPT broker holds the message.
69
- - **Uniform rule:** `monitoring_proxy` bound ⇒ emit; else nothing. No
70
- role-vs-root sink split.
71
- - **No recursion:** the copy rides a distinct tx (`::a2a_monitoring::receive_monitoring_copy`), never `send_message`, so copies aren’t themselves monitored.
72
- - **Re-encrypted:** ciphertext on the wire under the CP channel key.
73
-
74
- ### Transactions (node side — `a2a_messaging`)
75
- | Transaction | Origin | Args | Effect |
76
- |---|---|---|---|
77
- | `set_proxy_pending` | user (host) | `$code: str`, `$proxy: str (contact ref)` | Store the host-generated 6-digit code for a contact. |
78
- | `verify_proxy_code` | user (host) | `$code: str`, `$sender: str (contact ref)` | Atomic verify (≤3 attempts, 300 s expiry, failures returned as **data** not aborts). On success sets `monitoring_proxy`. |
79
- | `disable_monitoring` | **external** | — | CP-AUTHENTICATED: sender must be the bound proxy. Clears the binding. No user/app-callable clear exists. |
80
- | `get_monitoring_status` | readonly | — | `($monitored, $proxy_pending, $proxy_cid)`. |
81
- | `monitor_copy_actions` | (internal fn) | direction, peer_cid, date, body | Builds the fire-and-forget copy; self-gates on `monitoring_proxy`. |
82
-
83
- ### Transactions (control-plane side — `a2a_monitoring`)
84
- | Transaction | Origin | Args | Effect |
85
- |---|---|---|---|
86
- | `receive_monitoring_copy` | external | `$copy: monitoring_copy_t` | Known-contact-only; delegates storage to the `on_monitoring_copy_received` init hook. |
87
-
88
- `monitoring_copy_t = (version, direction "out"/"in", peer_cid, peer_name, date, body)`.
89
-
90
- ### Wrapper interaction
91
- 1. The CP becomes a contact of the node (normal invite, Ring 3).
92
- 2. Host/daemon runs `set_proxy_pending(code, cpContact)` (the daemon generates the 6-digit code, shows it host-side).
93
- 3. Human enters the code in the CP UI → CP’s bind reaches the daemon → daemon calls `verify_proxy_code(code, cpContact)`.
94
- 4. From then on every chat send/recv emits a copy to the CP. The CP packet handles `receive_monitoring_copy` and stores the feed via `on_monitoring_copy_received` (call `a2a_monitoring::init` with that hook).
95
- 5. To stop: the CP sends `disable_monitoring` (only it can).
96
-
97
- **Scope (v1):** copies cover **chat send/receive only** — contact establishment
98
- and control traffic are out of the "all traffic" scope.
99
-
100
- ---
101
-
102
- ## B3 — Control-plane configuration (opaque only)
103
-
104
- **Goal:** the bound CP configures the app from the rendered JSON schema. The core
105
- **stores and transports** an opaque, app-custom config blob and bakes in **no
106
- policy semantics whatsoever** — per-application policy (including anything like
107
- "outgoing-only") is **application logic in the wrapper**, driven by the app's own
108
- custom config schema, NOT a protocol feature (human ruling, 2026-06-17).
109
-
110
- The bound CP (`monitoring_proxy`) is the configuration authority. `set_app_config`
111
- is **external + CP-authenticated** via `require_bound_cp_or_abort` (sender must be
112
- the bound proxy). `app_config` is **hidden** (so an app can’t rewrite its own
113
- stored config).
114
-
115
- ### Transactions (`a2a_messaging`)
116
- | Transaction | Origin | Args | Effect |
117
- |---|---|---|---|
118
- | `set_app_config` | external (CP) | `$config: str` | Store the **opaque** JSON config blob (the core never parses it). Fires `$config_updated`. |
119
- | `get_app_config` | readonly | — | `($config)`. |
120
-
121
- That is the **entire** B3 protocol surface: opaque config storage + arbitrary
122
- per-app JSON schemas. No typed policy, no core-enforced semantics.
123
-
124
- ### MUFL vs wrapper split
125
- - **Everything app-specific → wrapper.** `app_config` is owned by the TS wrapper.
126
- On `$config_updated`, the wrapper pulls `get_app_config` and applies *all* of it
127
- — operational config (e.g. telegram-connector: bot tokens, chat→contact routing)
128
- AND any policy the app wants (e.g. "outgoing-only"). The core never maps
129
- JSON↔mufl and enforces nothing app-specific.
130
- - The core's only job here is to **transport + store** the opaque blob (hidden,
131
- CP-gated, persisted) and notify the wrapper to re-apply.
132
-
133
- ### Wrapper interaction
134
- 1. CP renders `core.configuration`’s `$params` schema, user fills it.
135
- 2. CP sends `set_app_config(json)` → node stores it, fires `$config_updated`.
136
- 3. Wrapper pulls `get_app_config` and applies it (operational + any app policy).
137
-
138
- ---
139
-
140
- ## B2 — `core.connect` control-plane introduction (core 2.0, simplified)
141
-
142
- **Goal:** the CP, bound to two nodes that aren’t in each other’s contacts,
143
- introduces them (e.g. set node B as a proxy for telegram-connector A).
144
-
145
- **Design (radically simple).** The CP already holds each managed node’s
146
- peer-signed address document in `peer_ads` (captured when the node bound the CP).
147
- An introduction is therefore just: **send each node the other’s signed AD.** The
148
- receiving node verifies the AD’s own self-signature, that the relay came from its
149
- bound CP, and that its own manifest still advertises `core.connect`, then registers
150
- the contact immediately. There is **no SAS, no confirmation step, and no CP
151
- signature on the introduction** — the bound-CP channel *is* the authorization, and
152
- the node-side capability gate is the authoritative “do I accept introductions”.
153
-
154
- ### Flow
155
- 1. Daemon pre-check (CP side): pull `get_manifest` for A and B; **refuse to
156
- introduce if EITHER lacks `core.connect`** (prevents a half-open pairing). This
157
- is daemon logic, not core.
158
- 2. CP calls `introduce(A, B)` (host-fired, user origin). The core looks up
159
- `peer_ads[A]` and `peer_ads[B]` and emits, in one transaction, two encrypted
160
- relays to `ingest_connect_descriptor`: A receives B’s signed AD (+ B’s CP-supplied
161
- display name) and B receives A’s.
162
- 3. Each node’s `ingest_connect_descriptor` (external, encrypted):
163
- - `require_bound_cp_or_abort(sender)` — the relay must come from my bound CP;
164
- - **node-side capability gate** — abort unless `a2a_capabilities::self_supports("core.connect")`
165
- (reads the live `describe()` manifest). This is the authoritative enforcement.
166
- - `process_address_document(peer_ad, TRUE)` — re-checks the peer’s **own**
167
- self-signatures (proof-of-possession; aborts on a forged/inconsistent AD before
168
- any write — `TRUE` only relaxes external-authorizing-container trust, not the
169
- self-signature);
170
- - registers the peer (contact + `peer_ads`) under the CP-supplied name (cid as a
171
- last resort) and fires `$introduced` (`container_id, name, by_cp`).
172
- - **Idempotent re-introduction:** if the peer is already a contact, it only
173
- refreshes the stored AD and keeps the existing name (`$reintroduced` — never a
174
- downgrade or rename).
175
-
176
- `introduce_to_group(joiner, members)` is the cluster-root fan-out: for each member
177
- it emits the same pair of relays as `introduce(joiner, member)`, all in one
178
- transaction — the natural “new subagent joins, give it everyone” primitive.
179
-
180
- ### Transactions (`a2a_messaging`)
181
- | Transaction | Origin | Args | Effect |
182
- |---|---|---|---|
183
- | `introduce` | user (CP host) | `$peer_a: str`, `$peer_b: str` (contact refs) | Emits the two signed-AD relays to A and B. Aborts if either is not an established contact (no `peer_ads`) or if `a == b`. |
184
- | `introduce_to_group` | user (CP host) | `$joiner: str`, `$members: str[]` | Emits `introduce(joiner, member)` relays for every member, one transaction. |
185
- | `ingest_connect_descriptor` | external (CP) | `$peer_ad: t_address_document`, `$peer_name: str` | Node-side: CP-sender gate + node capability gate + AD self-sig (PoP), then register; `$introduced` / `$reintroduced` notify. |
186
-
187
- The node-side inbound is the dedicated tx `::a2a_messaging::ingest_connect_descriptor`
188
- (NOT routed through the `a2a_capabilities` verb dispatcher).
189
-
190
- ### Security notes
191
- - **`core.connect` in the manifest means “I ACCEPT introductions” — not “my AD is
192
- never relayed / I am undiscoverable”.** A node’s address document is public
193
- (invite-equivalent), so the boolean does not hide it. The half-open preventer is
194
- the **daemon pre-check**, which must refuse if *either* party lacks support (not
195
- just the recipient). The node-side gate then independently enforces acceptance.
196
- - The CP-supplied `$peer_name` is an **unauthenticated** display label (receiver-
197
- chosen); the AD self-signature is the only authenticated identity the receiver
198
- trusts. Never key an enforcement decision on the name.
199
- - Trust model: the node trusts its **bound CP** to introduce honestly (no SAS).
200
- This is deliberate — the same governance/honesty class as the monitoring bind and
201
- the README §8 self-assertion limit, documented not oversold.
202
-
203
- ### Wrapper interaction
204
- The daemon orchestrates: (1) `get_manifest(A)` + `get_manifest(B)`, refuse if either
205
- lacks `core.connect`; (2) call `introduce(A, B)`; (3) the core emits both signed-AD
206
- relays; (4) each node’s `ingest_connect_descriptor` gates and registers. The CP
207
- never holds the A↔B channel keys (fresh DH between A and B on first message).
208
-
209
- ---
210
-
211
- ## Out of scope / deferred
212
-
213
- - **Governance-attestation layer** (`cp_attestation_t` 1.8 / `root_cp_binding_t`
214
- 1.9 / invite threading 1.10): kept **off the critical path** per the human’s
215
- ruling — out-of-scope-pending-founder-review. B1/B2/B3 do not depend on it.
216
- - Frontend per-app-name rendering (B4) — a different repo (messenger).
217
- - **Per-application policy (e.g. "outgoing-only") — explicitly OUT of the
218
- protocol** (human ruling). The core provides opaque config + arbitrary per-app
219
- schemas; it bakes in no app-specific semantics. Apps implement policy in the
220
- wrapper from their own config.
221
- - Generic JSON↔mufl config auto-mapping.
222
- - App integration / daemon wiring in any consuming repo.
223
-
224
- > Note: the standalone `signed_intro_t` CP-signed introduction path (briefly
225
- > required and implemented in core 1.15 as `mint_cp_introduction` /
226
- > `verify_cp_introduction`) was **removed in core 2.0** when B2 was simplified to
227
- > bound-CP-channel authorization. The underlying `intro_t` / `signed_intro_t` /
228
- > `book_entry_t` shapes remain in `a2a_protocol` — they are the out-of-repo
229
- > local-book registrar credential, now unused inside this repo (kept; prune later
230
- > if confirmed dead).
231
-
232
- ## Breaking changes in core 2.0 (B2 simplification)
233
-
234
- Consumers of the old `core.connect` surface MUST absorb:
235
-
236
- - **`ingest_connect_descriptor` payload changed**: `{$descriptor (connect_descriptor_t blob), $intro (signed_intro_t blob)}` → `{$peer_ad (t_address_document), $peer_name (str)}`.
237
- - **`$introduced` notify shrank**: it no longer carries `$sas` or `$monitoring_status` — just `$container_id, $name, $by_cp`. Any agent/UI reading `$sas` must update.
238
- - **Removed transactions**: `get_connect_descriptor`, `mint_cp_introduction`, `confirm_introduction`, `list_pending_introductions`. The messenger’s SAS / pending-confirm UI and any flow calling these must be reworked (introductions are now established immediately, with no confirm step).
239
- - **New CP-side transactions**: `introduce(A, B)`, `introduce_to_group(joiner, members)`. The daemon drives these after its `get_manifest` pre-check (refuse if either party lacks `core.connect`).
240
- - **`a2a_capabilities::init` is now a hard prerequisite on the ingest path**: the node-side gate calls the live `describe()` hook via `self_supports`, so an uninitialised `describe` **fails closed** (aborts the ingest). “Supports introductions” is `core.connect` present in `describe()`’s live manifest `$capabilities` map — NOT the `init` `$supported` list.
241
-
242
- ## Integration TODO for consumers (when this lands)
243
-
244
- - The monitoring bind ceremony + status moved to **`::a2a_messaging::`**
245
- (`set_proxy_pending`, `verify_proxy_code`, `disable_monitoring`,
246
- `get_monitoring_status`) — update any daemon that addressed them at
247
- `::a2a_monitoring::`.
248
- - A control-plane packet must call `a2a_monitoring::init($on_monitoring_copy_received)`
249
- to receive the feed.
250
- - `config.mufl` now exports `a2a_monitoring`; consumers’ core checkout must include it.
251
- - **`core.connect`**: the daemon must `get_manifest`-pre-check both parties and call
252
- `introduce` (see *Breaking changes* above); the node packet must wire
253
- `a2a_capabilities::init` (describe hook advertising `core.connect`) or it will
254
- reject all introductions.
255
-
256
- ## Open questions
257
-
258
- None outstanding for the dev/test track.
259
-
260
- - **`outgoing_only` direction** — moot: the typed contact policy was removed
261
- entirely (human ruling 2026-06-17). Per-app policy is application logic in the
262
- wrapper, driven by the app's own custom config schema; the core stores only the
263
- opaque blob.
264
- - **B2 authorization model** — RESOLVED (core 2.0): the non-repudiable CP-signed
265
- introduction (`signed_intro_t`, core 1.15) was **removed** when the human ruled
266
- for a radically simpler design. Authorization is now the bound-CP channel itself
267
- plus the node-side `core.connect` capability gate; no SAS, no per-introduction
268
- signature. (The 1.15 CP-signed path was the prior decision, now superseded.)
@@ -1,92 +0,0 @@
1
- # core 2.1 — Cluster CP-introduction
2
-
3
- **Version 2.1 · MIN (additive) · One root↔CP bind enrolls a whole cluster; the
4
- CP then introduces child components across clusters with zero per-child
5
- ceremony and zero application logic.**
6
-
7
- > **STATUS: prose pending.** This is the architecture stub for the 2.1 release
8
- > note. The structure + transaction list below are authoritative for the change
9
- > shipped on `feat/cluster-introduction`; the full narrative write-up is the
10
- > next round (per the implementation plan, §5). Implemented + compiles clean;
11
- > founder approval gates the merge to `main` (see *Security notes*).
12
-
13
- ## What shipped
14
-
15
- Core-side protocol support for **CP-brokered cluster introductions**. A root
16
- binds a control plane (CP) once; that single bind:
17
-
18
- - registers the CP as the manager of the root's whole cluster (CP side), and
19
- - lets every child of the root **inherit** the root-signed CP binding so the
20
- child accepts the CP's introductions locally, with no per-child bind ceremony.
21
-
22
- The CP can then introduce child components of *different* roots to each other
23
- (the existing root-agnostic `introduce` / `introduce_to_group`); the introduced
24
- parties do fresh end-to-end DH, so the CP never holds their channel keys.
25
-
26
- Application logic required is still just the `core.connect` boolean — everything
27
- else is identity-hierarchy + control-plane material the host/daemon manages.
28
-
29
- This is **additive**: the legacy direct-bind introduction path (a node that ran
30
- its own 6-digit proxy bind) is unchanged and still accepts introductions.
31
-
32
- ## New/changed transactions (`a2a_messaging.mm`)
33
-
34
- - **`manage_root($root_cid)`** — host-fired (CP side). Records that this control
35
- plane manages a root (`managed_roots` set). The authorization half of
36
- enrollment: a child enrolls only if its delegation chain resolves to a root
37
- here. Idempotent.
38
- - **`set_root_cp_binding($binding)`** — host-fired. Stores the root-signed CP
39
- binding (`root_cp_binding`), verified against the node's own root identity
40
- before storage. Fills the long-standing gap (the binding was restored on
41
- import but never settable). It then rides the existing invite / state-push
42
- paths down to the root's roles.
43
- - **`enroll_delegated_node`** — external inbound (CP side). A root relays one of
44
- its children's signed address document + delegation chain; the CP verifies
45
- **(1)** the authenticated sender *is* the root in the chain, **(2)** that root
46
- is in `managed_roots`, **(3)** `verify_peer_delegation` chains the child to it,
47
- and re-checks the child AD self-signature (proof-of-possession). On success it
48
- stores `peer_ads`/`contacts`/`contact_roots`. Idempotent.
49
- - **`require_cluster_cp_or_abort`** (helper) replaces `require_bound_cp_or_abort`
50
- in `ingest_connect_descriptor`'s relay gate. Additive: accepts **either** a
51
- legacy direct bind (`monitoring_proxy == sender`) **or** an inherited cluster
52
- CP (sender is the CP the node's root designated, re-verified locally against
53
- the pinned `root_ad` keys — including the `cid_cp` pin — on every call).
54
- - `managed_roots` threaded through `export_core_state` / `import_core_state`
55
- (optional; pre-2.1 exports default to empty).
56
- - `version.mm`: `2.0 → 2.1`.
57
-
58
- `a2a_protocol.mm` is unchanged — the existing hierarchy/attestation shapes and
59
- verifiers (`delegation_cert_t`/`verify_peer_delegation`,
60
- `root_cp_binding_t`/`verify_root_cp_binding`, `cp_attestation_t`) were already
61
- sufficient.
62
-
63
- ## Integration TODO for consumers (later phases, NOT in this change)
64
-
65
- - **MCP daemon** (`ours-mcp/packages/core`): at root-bind, relay each
66
- subagent's AD to the CP via `enroll_delegated_node`; call `manage_root` for the
67
- bound root; push `root_cp_binding` to roles via the role-spawn state push; run
68
- the `get_manifest` `core.connect` pre-check before calling `introduce`.
69
- - **Control-plane / messenger**: UX for the cluster-introduction flow.
70
- - **Monitoring inheritance** is deliberately **NOT** changed here: a root bind
71
- does **not** auto-copy all roles' traffic to the CP. That is a governance
72
- decision (it would change the monitoring guarantee's semantics) and is parked
73
- unless explicitly approved.
74
- - **Recursive delegation** (N-level trees) is parked; the enrollment + gate are
75
- written so a later chain-walk could slot in, but flat 2-level is all that ships.
76
-
77
- ## Security notes
78
-
79
- - This change **promotes the previously non-enforcing governance-attestation
80
- layer** (`root_cp_binding` / `cp_attestation` / invite-threading) to an
81
- **enforcing** authorization role gating introductions. The crypto is sound —
82
- root-signed, domain-separated, locally pinned via `root_ad` — and the residual
83
- trust (the host honestly distributes `root_ad` / `root_cp_binding` to its
84
- roles) is the same honesty class as the existing monitoring self-assertion
85
- limit. **The promotion decision is the founder's**; implemented on a branch,
86
- not merged to `main` until signed off.
87
- - Invariants preserved: the node-side capability gate (`self_supports(core.connect)`)
88
- stays authoritative; `enroll_delegated_node` rejects a child of an unmanaged
89
- root (and a relayer that is not the root); `require_cluster_cp_or_abort`
90
- re-verifies the binding against the pinned `root_ad` keys (and `cid_cp`) every
91
- call; the `process_address_document(peer_ad, TRUE)` self-signature re-check
92
- stays in `ingest`.
@@ -1,94 +0,0 @@
1
- # core 2.2 — Cluster root-side producers
2
-
3
- **Version 2.2 · MIN (additive) · The root-side PRODUCER half of cluster
4
- CP-introduction: a root can now MINT its CP binding, push it to its roles, and
5
- RELAY its children to the control plane. Completes the loop core 2.1 left to
6
- "later phases".**
7
-
8
- ## What shipped
9
-
10
- core 2.1 shipped the cluster RECEIVER + ACCEPT side (`manage_root`, the
11
- `enroll_delegated_node` handler, the `set_root_cp_binding` store,
12
- `require_cluster_cp_or_abort`, and `$rpb` propagation) but deferred the
13
- root-side PRODUCERS to consumer integration — and no transaction existed to
14
- (a) mint the root-signed `root_cp_binding` or (b) emit the enrollment relay to
15
- the CP. The managed/root side therefore could not actually drive enrollment.
16
- core 2.2 adds those producers, all additive and root-side:
17
-
18
- - A root **mints** its §3c CP binding (`sign_root_cp_binding`) — self-signing
19
- `{context_tag, root_cid, cid_cp}` via the same key path as delegation certs.
20
- - The daemon stores it on the root AND pushes the same blob to each role;
21
- `set_root_cp_binding` is widened so a role verifies its **inherited** binding
22
- against its pinned `root_ad` (the accept gate's own keys + verifier), letting a
23
- role hold the edge with zero ceremony.
24
- - A root **relays** each child's signed AD + delegation chain to the bound CP
25
- (`relay_enroll_delegated_node`), driving the existing CP-side
26
- `enroll_delegated_node` handler — one root bind enrolls the whole cluster.
27
-
28
- No CP-side or node-accept-side behaviour changed; the legacy direct-bind path is
29
- untouched.
30
-
31
- ## New/changed transactions (`a2a_messaging.mm`)
32
-
33
- - **`sign_root_cp_binding($proxy)`** — NEW, host-fired, ROOT only, STATELESS.
34
- Resolves `$proxy` to the CP's container id, builds
35
- `root_cp_binding_core_t{version 1, context_tag "ours:cp-attestation:v1",
36
- root_cid=self, cid_cp}`, root-signs it via `key_storage::default_sign` over
37
- `_value_id`, and returns the signed blob (+ `cid_cp`). Mirrors
38
- `sign_delegation`. Aborts if not a root (`delegation_cert != NIL`).
39
- - **`set_root_cp_binding($binding)`** — CHANGED (additive verify-path widening),
40
- now DUAL-MODE. ROOT (`delegation_cert == NIL`): verify the binding against the
41
- node's own identity — unchanged from 2.1. ROLE (`delegation_cert != NIL`):
42
- verify the INHERITED binding against the pinned `root_ad` — rejecting any edge
43
- not signed by the role's own root. Fails CLOSED. This is a NEW, tightly-gated
44
- acceptance, not a narrowing: in 2.1 the role path always aborted (it
45
- own-identity-verified a root-signed edge, which can never match), so 2.2 newly
46
- accepts root-signed inherited bindings a role could not store before. The root
47
- path is byte-unchanged; no pre-existing accept path is loosened.
48
- - **`relay_enroll_delegated_node($proxy, $child_ad, $delegation_cert,
49
- $root_profile)`** — NEW, host-fired, ROOT only. Resolves `$proxy` to the bound
50
- CP and sends an encrypted `enroll_delegated_node` relay carrying
51
- `{$child_ad (AD value), $delegation_cert (blob), $root_profile (blob)}` —
52
- field-for-field matching `handle_enroll_delegated_node`. Returns the relay
53
- target + child container id. Aborts if not a root.
54
- - **`version.mm`**: `2.1 → 2.2`.
55
-
56
- `a2a_protocol.mm` is unchanged — `root_cp_binding_t` / `verify_root_cp_binding` /
57
- `cp_attestation_context_tag` and the delegation verifiers were already
58
- sufficient.
59
-
60
- ## Integration TODO for consumers (MCP daemon)
61
-
62
- - At root↔CP bind: `sign_root_cp_binding(cp)` then `set_root_cp_binding(blob)` on
63
- the root; push the same blob to each role via `set_root_cp_binding` (role path,
64
- `root_ad`-verified).
65
- - For each child: `relay_enroll_delegated_node(cp, child_ad, cert, root_profile)`.
66
- - `manage_root` / `introduce` / `introduce_to_group` and the `get_manifest`
67
- `core.connect` pre-check stay CP-side (messenger), unchanged.
68
- - The child container id the CP keys on is `child_ad.identity.container_id`; the
69
- daemon must source it from ONE place and keep it byte-consistent with the cid it
70
- advertises elsewhere (e.g. `list_agents`).
71
-
72
- ## Security notes
73
-
74
- - These are PRODUCERS, not new enforcement. The root signs its OWN governance
75
- edge with the same key it uses for delegation certs; the relay is an
76
- authenticated root→CP send over the existing bound channel; and the CP handler's
77
- three checks (sender is the child's root, that root is managed, the delegation
78
- chain verifies + AD proof-of-possession) are unchanged. No trust-model change
79
- beyond making the 2.1 layer usable from the root side.
80
- - `set_root_cp_binding` EXTENDS the verify semantics of the
81
- governance-attestation enforcement layer: a role now stores an inherited edge,
82
- verified against its pinned `root_ad` (`binding.root_cid` == `root_ad`'s
83
- container id; signature under the domain-separated `context_tag`; `cid_cp`
84
- integrity via the signed core record). The role path is a NEW acceptance, not a
85
- narrowing: in 2.1 a role's `set_root_cp_binding` always aborted (own-identity
86
- verify of a root-signed edge can never match), so 2.2 newly accepts root-signed
87
- inherited bindings the role could not store before — tightly gated to edges
88
- signed by the role's own root, matching the accept gate's trust. The root path
89
- is byte-unchanged. Additive (MIN); no pre-existing accept path is loosened.
90
- - Like core 2.1's promotion of the governance-attestation layer to an ENFORCING
91
- role, this change rides the **founder promotion gate**: implemented on a branch
92
- (`feat/cluster-root-producers`), NOT merged to `main` until signed off. The
93
- producers further activate that enforcing layer (roles can now inherit and
94
- accept CP introductions end-to-end), so founder visibility applies.
@@ -1,162 +0,0 @@
1
- # core 3.0 — Ephemeral-key slim invite
2
-
3
- **Version 3.0 · MAJ (breaking) · The fat, identity-bearing invite is replaced by
4
- a slim invite that carries only an ephemeral encryption pubkey; both parties'
5
- address documents (and, for roles, the delegation chain) are exchanged over a
6
- two-message encrypted hop after redemption instead of riding in the invite.**
7
-
8
- ## What shipped
9
-
10
- Invites no longer disclose identity. A core-3.0 invite (`invite_eph_t`,
11
- `a2a_protocol.mm`) carries only `{ invite_id, inviter_container_id, inviter_name,
12
- ephemeral_encryption_pubkey, scheme_id }` — **no public-key list, no
13
- self-signatures, no delegation cert, no root profile.** The inviter's (and, for a
14
- delegated role, the responder's) full address document + chain travel **inside a
15
- box** on a two-message redeem hop, only to a party that has proven liveness by
16
- round-tripping the invite.
17
-
18
- The redeem flow is **1 out-of-band invite + 2 on-wire messages** (down from the
19
- old ≈4-message ECDH handshake + accept):
20
-
21
- ```
22
- (OOB) inviter ──► responder : invite_eph_t { invite_id, inviter_cid, name, eph_pub, scheme }
23
- leg 1 responder ──► inviter : submit_invite_response (BARE send; box → inviter eph_pub)
24
- leg 3 inviter ──► responder : complete_invite (BARE send; box → responder eph_pub)
25
- ```
26
-
27
- Both legs are **bare boxed sends** (`_crypto_encrypt_message` to the
28
- counterparty's ephemeral public key — the `authorize_packet` idiom,
29
- `encrypted_channel.mm:118-124`); `encrypted_channel` is **untouched** and resumes
30
- for all post-contact `send_message` traffic once both sides are registered.
31
-
32
- The invite is structurally minimal — 5 public fields, no key list / cert / root
33
- profile — so its **size floor is the post-quantum ephemeral public key** (measured
34
- ~921 bytes raw, dominated by that key). The dramatic reduction is **vs role
35
- invites**, which previously embedded the root's entire key list + profile + the
36
- delegation chain; a flat invite shrinks too, but the win is largest for roles.
37
-
38
- > **Why leg 3 is a bare box, not `encrypted_channel`.** At leg 3 the responder has
39
- > not yet registered the inviter, so an `encrypted_channel::send_encrypted_tx`
40
- > reply is undecryptable receiver-side — the responder cannot resolve the inviter's
41
- > source key (`key_storage.mm:291` "Unknown source key for message decryption",
42
- > reproduced in loopback). Boxing to the responder's **real** long-term key is also
43
- > impossible: the stdlib never exposes a raw long-term encryption private key. So
44
- > leg 3 boxes to the responder's **ephemeral** public key (carried in leg 1); the
45
- > responder keeps its ephemeral private key until leg 3 to open it. This corrects
46
- > the plan's original "leg 3 via encrypted_channel / box to the real key" wording.
47
-
48
- After leg 3 both sides hold the other's verified AD + contact + (optional) root
49
- linkage — symmetric to the pre-3.0 end state.
50
-
51
- **Disclosure order flips:** the responder now discloses its identity first (boxed
52
- to the inviter's ephemeral key). This is inherent — moving the identity bulk off
53
- the OOB channel forces recipient-first disclosure — and is neutral under the
54
- OOB-trust model (see *Security notes*).
55
-
56
- ## New/changed transactions (`a2a_messaging.mm`)
57
-
58
- - **`generate_invite($name)`** — unchanged signature; now mints the slim
59
- `invite_eph_t` via the reworked `mint_eph_invite` (was `mint_invite`). Generates
60
- a per-invite ephemeral encryption keypair: the public half ships in the invite,
61
- the private half is stored in the new hidden `pending_invite_keys`.
62
- - **`add_contact($invite, $name?)` → LEG 1 (responder).** Parses the slim invite,
63
- generates a one-shot responder ephemeral keypair, boxes its identity bundle
64
- (`{ad, cert?, root_profile?, cp_binding?, invite_id}`) to the invite's ephemeral
65
- pubkey, and **bare-sends** `submit_invite_response`. Records `pending_redemptions`
66
- (chosen name + expected inviter cid) and keeps the responder ephemeral private
67
- key in the new hidden `pending_redemption_keys`. The contact is **pending** here;
68
- it finalizes on leg 3. Returns `$resp_eph_pub` (already-public wire material) so a
69
- caller can correlate the outstanding redemption.
70
- - **`submit_invite_response` (NEW, library-routed) → LEG 2 (inviter).** Inbound,
71
- bare box. Gates in order — pending-invite lookup → box decrypt → cid-bind
72
- (`AD.container_id == envelope.from`) → `process_address_document(ad, TRUE)` (PoP
73
- self-sig) → optional delegation-chain verification — **then** registers the
74
- responder and **single-use consumes both** `pending_invites` and
75
- `pending_invite_keys`. Replies leg 3 as a bare box to the responder's ephemeral
76
- pubkey. Deliberately does **not** `check_encrypted_or_abort` (the box is the
77
- protection).
78
- - **`complete_invite` (NEW, library-routed) → LEG 3 (responder).** Inbound, bare
79
- box. Gates — pending-redemption lookup → inviter-cid pin (`from == expected
80
- inviter`) → box decrypt with the kept responder ephemeral key → cid-bind →
81
- `process_address_document(ad, TRUE)` → optional chain — **then** registers the
82
- inviter and clears **both** `pending_redemptions` and `pending_redemption_keys`.
83
- Also bare (no `check_encrypted_or_abort`).
84
-
85
- State (`a2a_messaging.mm`): `pending_invites` changed from `(global_id ->> str)` to
86
- `(global_id ->> pending_invite_t)` (`{assigned, eph_pub, scheme}`); new hidden,
87
- **non-exported** `pending_invite_keys` and `pending_redemption_keys` (ephemeral
88
- private keys); new `pending_redemptions` (`{inviter_cid, inviter_name,
89
- custom_name}`).
90
-
91
- ## Breaking changes
92
-
93
- - **Invite format + redemption flow changed; old fat invites are NOT redeemable
94
- on 3.0, and 3.0 invites are NOT redeemable by pre-3.0 clients.** Invites are
95
- short-lived artifacts; re-issue them after upgrading. (Clean break, plan §7
96
- option A.)
97
- - **Removed:** `a2a_protocol::invite_t`, `a2a_protocol::invite_role_t`,
98
- `a2a_protocol::rebuild_peer_address_document`, and the old offline-redeem
99
- `add_contact` body. (`accept_contact`/`handle_accept_contact` are retained as a
100
- legacy inbound handler; they are no longer reachable from the 3.0 redeem path.)
101
- - **Outstanding invites do not survive a daemon restart** (see *Security notes* —
102
- this is by design, fail-closed).
103
-
104
- ## Integration TODO for consumers (later phases — NOT in this core-only change)
105
-
106
- - `add_contact` is now **asynchronous**: it returns a *pending* status; the contact
107
- finalizes when leg 3 arrives. Consumers that treated `add_contact`'s return as
108
- "contact added" must instead surface completion on the leg-3 `notify_agent`
109
- (`$contact_added`) event. The inviter's confirmation arrives via the leg-2
110
- `$contact_accepted` event.
111
- - No new `::actor::` shim is required: `submit_invite_response` / `complete_invite`
112
- are library-routed (`::a2a_messaging::…`), like `ingest_connect_descriptor`.
113
- - The slim invite blob is much smaller; consumer compression/transport is
114
- unaffected (the blob is still an opaque bin).
115
- - Re-issue any outstanding invites after the upgrade.
116
-
117
- ## Security notes
118
-
119
- - **Identity pin is unchanged.** Both legs enforce `received_AD.container_id ==
120
- envelope.from` **and** `process_address_document(ad, TRUE)` (proof-of-possession
121
- self-signature) before storing or trusting any AD — identical to the pre-3.0
122
- `handle_accept_contact` gate. Pin strength still tracks the planned `container_id`
123
- key-derivation; neither improved nor regressed.
124
- - **No registration before all gates pass (INV-5).** Neither leg writes
125
- `contacts`/`peer_ads`/`contact_roots` until lookup → decrypt → cid-bind → PoP →
126
- chain all pass. A failed gate mutates nothing.
127
- - **Single-use.** The first valid leg 2 consumes both inviter stores
128
- (`pending_invites` + `pending_invite_keys`); the first valid leg 3 consumes both
129
- responder stores. A replayed or invalid leg consumes nothing.
130
- - **Reduced disclosure / smaller blast radius.** An intercepted invite leaks only
131
- `{eph_pub, cid, name}` — no keys, no root profile, no org chain. A leaked invite
132
- forces an active, single-use round-trip (revealing the attacker's own cid) rather
133
- than being passive total identity exposure.
134
- - **Ephemeral secret at rest, and restart-transience BY DESIGN.** The per-invite
135
- ephemeral private keys live in `pending_invite_keys` / `pending_redemption_keys`,
136
- which are `hidden` **and never added to `export_core_state` (INV-4)**. The export
137
- blob is the host's persistence boundary (`export_state` → disk → `import_state`),
138
- so an outstanding invite/redemption **does not survive a daemon restart** between
139
- legs — it fails closed (the next leg aborts on the missing key; no contact is
140
- silently formed). Treat invites as **session/process-transient**; re-issue after a
141
- restart.
142
- - **`AdaptValue.Serialize` corrupts raw secret keys — LANDMINE.** Empirically (M0
143
- spike), a raw `secretkey_encrypt` round-tripped through the SDK
144
- `AdaptValue.Serialize()` / `ParseValue()` path (the host's `export_state` →
145
- on-disk blob, `index.ts:1296`) comes back **present-but-unusable** (decrypt
146
- aborts "crypto box failed"). It DOES round-trip faithfully through mufl's own
147
- `_write`/`_read`. This is a second, independent reason the ephemeral secret stores
148
- must never be placed in `export_core_state`: doing so would both leak the secret
149
- AND yield a corrupt, silently-failing key on reload. Do not "fix" restart-survival
150
- by adding these stores to the export.
151
- - **Eph-key TTL — RECOMMENDED, NOT implemented in this change.** Bounding the
152
- at-rest-secret window and stale-invite growth wants an expiry sweep over
153
- `pending_invites`/`pending_invite_keys` (and the responder stores). It needs a
154
- time source + a sweep hook and is deferred (plan §10). Until then, the stores are
155
- bounded only by single-use consumption and restart-transience.
156
- - **Leg 1 is an unauthenticated bare inbound.** Anyone holding a leaked invite can
157
- spam `submit_invite_response`, each forcing one decrypt attempt; it aborts cheaply
158
- on the lookup / box-open / cid-bind, mutates no state before the gates, and the
159
- first valid one consumes the invite. Bounded DoS; documented, accepted.
160
- - **MITM exposure unchanged.** Both designs are TOFU rooted in the OOB invite
161
- channel; an active OOB attacker can substitute the whole invite either way, and
162
- the defense is the same (verify the cid you pinned, out of band).