@ours.network/tg-connector 0.1.2 → 0.1.3
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.
- package/dist/mufl_code/2DA1D5F860E42C605D92F1E24E2466C70EFDDBF057BBCBA52F0ECC639EFCA387.muflo +0 -0
- package/dist/mufl_code/core/CLUSTER_API.md +640 -0
- package/dist/mufl_code/core/CLUSTER_CONTRACT.md +121 -0
- package/dist/mufl_code/core/CLUSTER_INTRODUCTION_PLAN.md +200 -0
- package/dist/mufl_code/core/CONFIGURATION_DESIGN.md +35 -0
- package/dist/mufl_code/core/CONFIGURATION_PLAN.md +394 -0
- package/dist/mufl_code/core/DEVELOPMENT.md +168 -0
- package/dist/mufl_code/core/EPHEMERAL_INVITE_PLAN.md +465 -0
- package/dist/mufl_code/core/GROUP_CHAT_DESIGN.md +520 -0
- package/dist/mufl_code/core/LICENSE +98 -0
- package/dist/mufl_code/core/README.md +76 -0
- package/dist/mufl_code/core/a2a_capabilities.mm +350 -0
- package/dist/mufl_code/core/a2a_cluster.mm +601 -0
- package/dist/mufl_code/core/a2a_control.mm +89 -0
- package/dist/mufl_code/core/a2a_messaging.mm +2103 -0
- package/dist/mufl_code/core/a2a_monitoring.mm +94 -0
- package/dist/mufl_code/core/a2a_protocol.mm +231 -0
- package/dist/mufl_code/core/config.mufl +26 -0
- package/dist/mufl_code/core/release-notes/2.0.md +268 -0
- package/dist/mufl_code/core/release-notes/2.1.md +92 -0
- package/dist/mufl_code/core/release-notes/2.2.md +94 -0
- package/dist/mufl_code/core/release-notes/3.0.md +162 -0
- package/dist/mufl_code/core/release-notes/3.1.md +43 -0
- package/dist/mufl_code/core/release-notes/README.md +32 -0
- package/dist/mufl_code/core/tests/README.md +66 -0
- package/dist/mufl_code/core/tests/run.sh +67 -0
- package/dist/mufl_code/core/tests/test.mjs +467 -0
- package/dist/mufl_code/core/tests/test_actor.mu +287 -0
- package/dist/mufl_code/core/version.mm +24 -0
- package/package.json +2 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# `core.cluster` — capability verb contract (core 2.3)
|
|
2
|
+
|
|
3
|
+
`core.cluster` promotes cluster / subagent management from private
|
|
4
|
+
`a2a_messaging` plumbing to a **first-class, app-reusable protocol capability**.
|
|
5
|
+
Any root-managing app (the messenger today, a telegram proxy later) advertises
|
|
6
|
+
the same generic surface: child/subagent lifecycle, per-child monitoring
|
|
7
|
+
authorization, the host-local contact book, and child↔contact plus
|
|
8
|
+
cross-cluster introductions.
|
|
9
|
+
|
|
10
|
+
This is a **documentation** contract. Verbs stay convention — the wire carries
|
|
11
|
+
opaque `$verb` / `$args` strings in `control_envelope_t`, and `dispatch()` routes
|
|
12
|
+
by `$cap` only (see `a2a_capabilities.mm`). Reserving `core.cluster` adds **one
|
|
13
|
+
constant** (`cap_cluster`) plus this contract; there is **no wire/type/dispatch
|
|
14
|
+
change**. An app implements the capability by wiring a handler under
|
|
15
|
+
`cap_cluster` in `a2a_capabilities::init`'s `$handlers` map and listing it in
|
|
16
|
+
`describe()`; gate it with `self_supports(cap_cluster)`, exactly as `core.connect`
|
|
17
|
+
is gated at `a2a_messaging.mm:~1013`.
|
|
18
|
+
|
|
19
|
+
## Advertising `core.cluster` ≠ having a manageable cluster
|
|
20
|
+
|
|
21
|
+
`describe()` is static/shared, so **every** identity that ships this capability
|
|
22
|
+
advertises `core.cluster` in its manifest — **including leaf children that manage
|
|
23
|
+
no children of their own**. Advertisement means "I speak the verbs," not "I have
|
|
24
|
+
a cluster to manage."
|
|
25
|
+
|
|
26
|
+
This is benign for the reference messenger (only a bound root surfaces the
|
|
27
|
+
Cluster tab), but it is a **false positive** for a generic consumer such as a
|
|
28
|
+
telegram-proxy that keys UI off capability presence alone. Therefore:
|
|
29
|
+
|
|
30
|
+
> A generic consumer **MUST** confirm an actual cluster via **`child.list`**
|
|
31
|
+
> before offering `child.create` / `child.remove` (or any management UI). An
|
|
32
|
+
> **empty list = no manageable cluster** — treat the node as a participant, not a
|
|
33
|
+
> root, and do not present lifecycle controls.
|
|
34
|
+
|
|
35
|
+
(Until tiered authz lands, `child.list` is also the cheapest capability probe: it
|
|
36
|
+
is read-only and side-effect-free.)
|
|
37
|
+
|
|
38
|
+
## Naming / back-compat
|
|
39
|
+
|
|
40
|
+
Existing wire verb names are **kept as-is — no hard rename.** `core.cluster` is
|
|
41
|
+
the documented umbrella; `app.agents` remains a recognized **alias** so current
|
|
42
|
+
clients keep working. New clients SHOULD advertise/route `core.cluster`.
|
|
43
|
+
|
|
44
|
+
## Verb → reference handler / composition → wire alias
|
|
45
|
+
|
|
46
|
+
Verified against the real reference-host handlers (critic R7). **CamelCase**
|
|
47
|
+
handlers (`provisionIdentity`, `delegateRole`, `deleteIdentityCompletely`,
|
|
48
|
+
`setAgentMonitoring`, `connect_sibling`, `sign_monitoring_auth`) are
|
|
49
|
+
reference-host (**ours-mcp daemon**) composites — **not** single core
|
|
50
|
+
transactions. **snake_case** names are core `a2a_messaging` transactions.
|
|
51
|
+
`core.cluster` blesses the **verb surface**; the consuming app/daemon owns the
|
|
52
|
+
composition.
|
|
53
|
+
|
|
54
|
+
| `core.cluster` verb | reference handler / composition | current wire alias |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| `child.create` | `provisionIdentity` + `set_my_bio` + `delegateRole` + best-effort `enroll_delegated_node` | `create_agent` |
|
|
57
|
+
| `child.list` | `list_contact_roots` / `list_contacts` (cluster filter) | `list_agents` |
|
|
58
|
+
| `child.set_bio` | `set_my_bio` (child-scoped role label) | `update_role` |
|
|
59
|
+
| `child.remove` | `deleteIdentityCompletely` — **FULL teardown** (packet / disk / contact-book / binding). **Destructive.** | `remove_agent` |
|
|
60
|
+
| `child.set_monitoring` | `setAgentMonitoring` = `connect_sibling` + `sign_monitoring_auth` (root) + `set_monitoring` (role) | `set_monitoring` |
|
|
61
|
+
| `contact.list` | `list_contacts` | — (host-local book) |
|
|
62
|
+
| `contact.add` | `generate_invite` — returns an invite blob the caller redeems | `contact_agent` |
|
|
63
|
+
| `contact.remove` | `remove_contact` | — (host-local book) |
|
|
64
|
+
| `introduce.child_to_contact` | `introduce` | — (1:1 introduction) |
|
|
65
|
+
| `introduce.cross_cluster` | `introduce_to_group` | — (cluster fan-out) |
|
|
66
|
+
|
|
67
|
+
> Note the deliberate asymmetry: **`child.remove`** is `deleteIdentityCompletely`
|
|
68
|
+
> (irreversibly tears the child down), whereas **`contact.remove`** is the much
|
|
69
|
+
> narrower `remove_contact` (drops one host-local contact edge). Do not conflate
|
|
70
|
+
> them.
|
|
71
|
+
|
|
72
|
+
`$args` shape per verb stays opaque JSON the app's handler interprets (same model
|
|
73
|
+
as `core.configuration`'s `$params`). The verbs above are the documented contract;
|
|
74
|
+
the handler is free to enqueue vs. process in-packet per the dispatch model.
|
|
75
|
+
|
|
76
|
+
## Guardrails — mechanisms, not policy (critic R6-3 / R6-5)
|
|
77
|
+
|
|
78
|
+
`core.cluster` promotes **mechanisms**, never **policy**. Every policy knob is an
|
|
79
|
+
**app parameter**. These are stated as honest **TARGETs / obligations**, not as
|
|
80
|
+
behavior that is already in place — the wire is neutral and the app owns the
|
|
81
|
+
dangerous choices.
|
|
82
|
+
|
|
83
|
+
- **`local_auto_accept` — RECOMMENDED safe default `false`.** The protocol-safe
|
|
84
|
+
posture is to **queue introductions and local contact-book joins for operator
|
|
85
|
+
approval**. **Current state:** the reference host **ours-mcp defaults
|
|
86
|
+
`TRUE`** (`index.ts:1496,1541`). Flipping it to `false` is a **tracked
|
|
87
|
+
obligation, not yet implemented** — do not document `false` as the current
|
|
88
|
+
behavior.
|
|
89
|
+
- **Monitoring (`child.set_monitoring`) — child-visible notice is a TARGET.**
|
|
90
|
+
Authorizing per-child monitoring **SHOULD** surface a **child-visible notice**.
|
|
91
|
+
**Current state:** the code stores the root-signed `monitoring_auth` with **no
|
|
92
|
+
notice**; surfacing it is an **obligation on the consuming app**. (Note: this
|
|
93
|
+
per-child path — `setAgentMonitoring` = `connect_sibling` +
|
|
94
|
+
`sign_monitoring_auth` + `set_monitoring` — is distinct from the one-time CP
|
|
95
|
+
proxy bind `bind_monitoring_proxy`, i.e. the `set_proxy_pending` /
|
|
96
|
+
`verify_proxy_code` / `disable_monitoring` 6-digit ceremony.)
|
|
97
|
+
- **`child.remove` — destructive, MUST be operator-confirmed.** It maps to
|
|
98
|
+
`deleteIdentityCompletely` (full packet/disk/contact-book/binding teardown).
|
|
99
|
+
**Current state:** the reference frontend (messenger `AgentNode`) implements a
|
|
100
|
+
`confirm()` dialog before invoking it. Any other consumer carries the same
|
|
101
|
+
obligation.
|
|
102
|
+
|
|
103
|
+
Core provides the verbs and the underlying transactions; the safe behavior above
|
|
104
|
+
is the app's responsibility, and the gaps called out are tracked obligations.
|
|
105
|
+
|
|
106
|
+
## Roadmap — tiered authorization (not yet enforced)
|
|
107
|
+
|
|
108
|
+
A future revision introduces tiered authz over these verbs:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
observe < manage < create < destroy
|
|
112
|
+
child.list/contact.list -> observe
|
|
113
|
+
child.set_bio/set_monitoring,
|
|
114
|
+
contact.add/remove, introduce.*-> manage
|
|
115
|
+
child.create -> create
|
|
116
|
+
child.remove -> destroy
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Today the **app** gates verbs (and SHOULD apply the guardrails above). Core does
|
|
120
|
+
not yet enforce tiers; this section records the intended direction so app gating
|
|
121
|
+
can be written forward-compatibly.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Cluster CP-Introduction — Implementation Plan (core 2.1)
|
|
2
|
+
|
|
3
|
+
> **One root↔CP bind enrolls a whole cluster; the CP then introduces child
|
|
4
|
+
> components across clusters with zero per-child ceremony and zero application
|
|
5
|
+
> logic.** This plan covers ONLY the shared mufl core change plus a release-notes
|
|
6
|
+
> directory architecture. Integration (MCP daemon, control-plane/messenger),
|
|
7
|
+
> release-note prose, and architecture docs are explicitly LATER phases.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 0. Scope of THIS task
|
|
12
|
+
|
|
13
|
+
**IN**
|
|
14
|
+
1. Core mufl protocol code changes in `ours-mufl-core` (this repo): `a2a_messaging.mm`, `a2a_protocol.mm` (only if a struct/verifier gap is found), `version.mm` bump.
|
|
15
|
+
2. A **release-notes directory architecture** — one note file per core version (version defined in `version.mm`), plus the 2.1 entry stub.
|
|
16
|
+
|
|
17
|
+
**OUT (do NOT touch in this task — later phases, in order)**
|
|
18
|
+
- MCP daemon integration (`ours-mcp/packages/core` — orchestration: relay subagent ADs at root-bind, push `root_cp_binding` to roles, `get_manifest` pre-check, call `introduce`).
|
|
19
|
+
- Control-plane / messenger integration & UX.
|
|
20
|
+
- Release-note **prose** write-up (the architecture sets up the structure; the full narrative is the next round).
|
|
21
|
+
- Architecture documentation.
|
|
22
|
+
- Recursive delegation (N-level tree). **Parked by decision.**
|
|
23
|
+
|
|
24
|
+
**Branch & merge discipline:** implement on `feat/cluster-introduction` (do NOT push to `main`). This change **promotes the deferred governance-attestation layer to an *enforcing* role** — merging to main is gated on **founder approval** (see §9).
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 1. Context — what already exists (core 2.0, `62afceb` on main)
|
|
29
|
+
|
|
30
|
+
- **`core.connect` introductions** (`a2a_messaging.mm`): `introduce(peer_a,peer_b)` (L719), `introduce_to_group(joiner,members)` (L741), node-side `ingest_connect_descriptor` (L821→`handle_ingest_connect_descriptor` L776). These are **root-agnostic** — they only need `peer_ads` for both parties.
|
|
31
|
+
- **Two gates an introduction must pass today:**
|
|
32
|
+
- CP-side: CP holds `peer_ads[child]` — written ONLY at contact establishment (`add_contact` L319, `accept_contact` L908, `ingest_connect_descriptor`, `import_core_state`). No other writer.
|
|
33
|
+
- Receiver-side: `ingest` calls `require_bound_cp_or_abort(sender)` (def L213, call L782) → **demands the child's OWN `monitoring_proxy == sender`**. Only the 6-digit `verify_proxy_code` (L541) sets `monitoring_proxy` (L590). **This is what forces a per-child bind today.**
|
|
34
|
+
- **Identity hierarchy (flat, 2-level):** `delegation_cert_t` (a2a_protocol L43) binds `role_cid → root_cid`, root-signed; `verify_peer_delegation` (L121) checks one link. Node-local hierarchy state in `a2a_messaging`: `delegation_cert` (L74), `root_ad` (L77), `root_profile` (L79), `root_cp_binding` (L83), `contact_cp_bindings` (L89), `contact_roots` (L85).
|
|
35
|
+
- **Governance-attestation substrate (built, currently NON-enforcing / off critical path):**
|
|
36
|
+
- `root_cp_binding_t` + `verify_root_cp_binding` (a2a_protocol L~205/212): root self-signs `{context_tag, root_cid, cid_cp}` = "root Y designated CP X". Domain-separated, root-key-verified. **The linchpin.**
|
|
37
|
+
- `cp_attestation_t` + `verify_cp_attestation` (L~175/187): reciprocal CP→root half ("CP X manages root Y").
|
|
38
|
+
- `root_cp_binding` is already **threaded into `accept_contact`'s reply** (L988) and **restored on import** (L1026) — but there is **no `set_root_cp_binding` transaction** to write it (only referenced in the comment at L81). **This gap must be filled.**
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. Goal / end-state (user-confirmed model)
|
|
43
|
+
|
|
44
|
+
1. Protocol lets any node define child components and register itself as a **root** (already true).
|
|
45
|
+
2. The **root delegates its CP binding to its children** — root binds the CP once, producing a root-signed `root_cp_binding`, and that binding (+ the root's keys) is pushed down to each child. The child binds nothing itself; it **inherits** and can locally verify "a relay is from the CP my root designated".
|
|
46
|
+
3. Children get a CP **contact relationship**, established by the single root bind, both directions:
|
|
47
|
+
- CP→child: root relays each child's signed AD to the CP (`enroll_delegated_node`); CP verifies the delegation chain and stores `peer_ads`.
|
|
48
|
+
- child→CP: child accepts the CP's introduction relays via the inherited `root_cp_binding` gate, verified locally, no round-trip.
|
|
49
|
+
4. The CP **introduces child components of different roots** to each other (`introduce` / `introduce_to_group` — already root-agnostic). They then do fresh end-to-end DH; the CP never holds their channel keys.
|
|
50
|
+
|
|
51
|
+
**App logic required: still just the `core.connect` boolean.** Everything else is identity-hierarchy + control-plane material the daemon/host manages.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Architecture of the change
|
|
56
|
+
|
|
57
|
+
Two pieces, both reusing existing verifiers.
|
|
58
|
+
|
|
59
|
+
### Piece A — Enrollment (CP-side `peer_ads` population)
|
|
60
|
+
New inbound transaction on the CP: **`enroll_delegated_node`**. Payload: the child's signed AD + its `delegation_cert` + the root's `root_profile`.
|
|
61
|
+
- Run `verify_peer_delegation(role_cid, role_ad_hash, cert, root_profile)` → confirms the child chains to a root **this CP manages** (check against a new `managed_roots` set, populated when the root binds / via `cp_attestation`).
|
|
62
|
+
- On success: store `peer_ads[role]`, `contacts[role]`, `contact_roots[role]`.
|
|
63
|
+
- Idempotent; rejects a child whose root the CP does not manage.
|
|
64
|
+
- The root/daemon calls this once per child at root-bind time (public material it already holds via the delegation chain). **One bind conveys the cluster.**
|
|
65
|
+
|
|
66
|
+
### Piece B — Receiver gate (drop the per-child monitoring requirement)
|
|
67
|
+
Replace the gate in `ingest_connect_descriptor` (L782/786) with a new **additive** helper:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
fn require_cluster_cp_or_abort(sender_id):
|
|
71
|
+
# accept EITHER the legacy direct bind …
|
|
72
|
+
if monitoring_proxy != NIL && sender_id == monitoring_proxy.proxy_cid: return
|
|
73
|
+
# … OR a CP my ROOT designated (inherited, verified locally)
|
|
74
|
+
abort unless root_cp_binding != NIL
|
|
75
|
+
&& sender_id == root_cp_binding.cid_cp
|
|
76
|
+
&& verify_root_cp_binding(root_cp_binding, root_cid, root_ad.key_list)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The role already holds `root_cp_binding` (→ `cid_cp`) and `root_ad` (→ root keys to verify it). **No network round-trip, no per-child ceremony.** Additive ⇒ the existing direct-bind path still works ⇒ non-breaking ⇒ MIN bump.
|
|
80
|
+
|
|
81
|
+
### Piece C — `set_root_cp_binding` transaction (fill the gap)
|
|
82
|
+
Add the host-fired transaction that writes node-local `root_cp_binding` (referenced at L81, not implemented). This is what the daemon calls on the root after it binds a CP; the binding then propagates to roles through the existing invite/state-push paths (L988, L1026). Confirm the role-spawn state push carries it (core side) — the actual daemon push is a later phase, but the **core transaction + state plumbing must exist now**.
|
|
83
|
+
|
|
84
|
+
### Out of core scope here (consumed later by the daemon)
|
|
85
|
+
`get_manifest` pre-check (refuse if either party lacks `core.connect`) and the actual call to `introduce` stay daemon-side (already core-ready).
|
|
86
|
+
|
|
87
|
+
### Open design decision — monitoring inheritance (DEFER unless approved)
|
|
88
|
+
The same root-CP edge could make **monitoring inherit** (root-bind ⇒ all roles' traffic copied to the CP) by pointing the forced-copy sink (`monitor_copy_actions`, self-gates on `monitoring_proxy` L187) at `root_cp_binding.cid_cp` when `monitoring_proxy` is NIL. **This changes the monitoring guarantee's semantics — a governance decision, not a default.** Keep it OUT of this task's code unless explicitly approved; note it in the 2.1 release note as a deliberate non-change.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 4. Work breakdown (core mufl only)
|
|
93
|
+
|
|
94
|
+
| # | File | Change | Size |
|
|
95
|
+
|---|------|--------|------|
|
|
96
|
+
| 1 | `a2a_protocol.mm` | **Verify only** that `root_cp_binding_t`/`verify_root_cp_binding`, `delegation_cert_t`/`verify_peer_delegation`, `cp_attestation_t`/`verify_cp_attestation` are sufficient as-is. Extend ONLY if a field is missing (e.g. role_ad_hash availability for enroll). | XS (likely none) |
|
|
97
|
+
| 2 | `a2a_messaging.mm` | Add `managed_roots` CP-side set (roots this CP manages, populated from the root-bind / `cp_attestation`). | S |
|
|
98
|
+
| 3 | `a2a_messaging.mm` | Add **`set_root_cp_binding`** trn (host-fired) → writes node-local `root_cp_binding`; ensure it propagates to roles via existing invite/state-push (L988/L1026). | S |
|
|
99
|
+
| 4 | `a2a_messaging.mm` | Add **`enroll_delegated_node`** inbound (CP-side): `verify_peer_delegation` against `managed_roots`, store `peer_ads`/`contacts`/`contact_roots`. Idempotent. | M |
|
|
100
|
+
| 5 | `a2a_messaging.mm` | Add **`require_cluster_cp_or_abort`** helper (additive: direct bind OR inherited root-CP binding). | S |
|
|
101
|
+
| 6 | `a2a_messaging.mm` | Swap the gate in `handle_ingest_connect_descriptor` (L782/786) to call `require_cluster_cp_or_abort`. Keep the `self_supports(core.connect)` capability gate unchanged. | XS |
|
|
102
|
+
| 7 | `version.mm` | Bump `create_version 2 0` → `create_version 2 1` (additive MIN bump). | XS |
|
|
103
|
+
| 8 | (compile) | Compile clean against the ADAPT toolkit (`scripts/` per repo convention); no consumer wiring. | — |
|
|
104
|
+
|
|
105
|
+
**Security invariants to preserve (critic will enforce):**
|
|
106
|
+
- The capability gate (`self_supports(core.connect)`) stays — "I accept introductions" remains node-authoritative.
|
|
107
|
+
- `enroll_delegated_node` MUST reject a child whose root is not in `managed_roots` (no unsolicited enrollment).
|
|
108
|
+
- `require_cluster_cp_or_abort` MUST re-verify `root_cp_binding` against `root_ad` keys every call (never trust the stored `cid_cp` unverified).
|
|
109
|
+
- `process_address_document(peer_ad, TRUE)` self-signature re-check stays in `ingest` (proof-of-possession).
|
|
110
|
+
- Additive only — the legacy direct-bind introduction path must still pass.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 5. Release-notes directory architecture
|
|
115
|
+
|
|
116
|
+
**Problem:** today a single `RELEASE_NOTES_core_config.md` at repo root covers a whole range (1.10→2.0). It doesn't scale per-version.
|
|
117
|
+
|
|
118
|
+
**Design:** a `release-notes/` directory, **one file per core version**, where the version is the `MAJ.MIN` from `version.mm`.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
release-notes/
|
|
122
|
+
README.md # index + convention (see below)
|
|
123
|
+
2.0.md # core 2.0 — migrated from RELEASE_NOTES_core_config.md
|
|
124
|
+
# (config/control-plane + B2 core.connect simplification)
|
|
125
|
+
2.1.md # core 2.1 — THIS change (cluster CP-introduction) — stub now,
|
|
126
|
+
# prose filled in the next round
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Convention (documented in `release-notes/README.md`):**
|
|
130
|
+
- Filename = the core version string `MAJ.MIN.md`, matching `version::get_core_version`.
|
|
131
|
+
- Every MIN/MAJ bump in `version.mm` REQUIRES a matching `release-notes/<version>.md` in the same change (a reviewer checklist item).
|
|
132
|
+
- Each note starts with a header line stating the version, the bump type (MAJ breaking / MIN additive), and a one-line summary; then sections: *What shipped* · *New/changed transactions* · *Breaking changes* (if MAJ) · *Integration TODO for consumers* · *Security notes*.
|
|
133
|
+
- `README.md` carries a table of versions newest-first with one-line summaries.
|
|
134
|
+
|
|
135
|
+
**Migration (this task):**
|
|
136
|
+
- Create `release-notes/` + `README.md` (index + convention).
|
|
137
|
+
- Move `RELEASE_NOTES_core_config.md` content into `release-notes/2.0.md` (it is the 2.0 lineage record). Leave a one-line pointer or delete the old file (recorded in the 2.0 note). Do not lose content.
|
|
138
|
+
- Add `release-notes/2.1.md` as a **stub** with the header + transaction list from §4 and a "prose pending" marker (the full write-up is the next round, per the user).
|
|
139
|
+
|
|
140
|
+
> The release-notes architecture is part of THIS task; the full 2.1 prose is NOT (next round).
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 6. Work-done metrics (acceptance criteria)
|
|
145
|
+
|
|
146
|
+
**Code (core 2.1)**
|
|
147
|
+
- [ ] `version.mm` reports `2.1`; `get_version` round-trips it.
|
|
148
|
+
- [ ] `set_root_cp_binding`, `enroll_delegated_node`, `require_cluster_cp_or_abort` exist with the §3 signatures; `ingest` calls the new gate.
|
|
149
|
+
- [ ] `managed_roots` populated on root-bind; `enroll_delegated_node` rejects a child of an unmanaged root (negative test).
|
|
150
|
+
- [ ] Packet **compiles clean** against the toolkit, no consumer integration.
|
|
151
|
+
- [ ] **Additive proof:** the legacy path — a node that did its own 6-digit bind — still accepts an introduction (the OR-branch in `require_cluster_cp_or_abort`). Regression-covered.
|
|
152
|
+
- [ ] **New path proof (unit/runtime):** a role with an inherited `root_cp_binding` (and NO `monitoring_proxy`) accepts an introduction relayed by `root_cp_binding.cid_cp`, and **rejects** one relayed by any other sender. Forged/mismatched `root_cp_binding` (verify against wrong root keys) aborts.
|
|
153
|
+
- [ ] Capability gate intact: a role lacking `core.connect` in its live manifest still rejects ingest.
|
|
154
|
+
|
|
155
|
+
**Release-notes architecture**
|
|
156
|
+
- [ ] `release-notes/` exists with `README.md` (convention + version table), `2.0.md` (migrated, no content lost), `2.1.md` (stub).
|
|
157
|
+
- [ ] Convention documented: version bump ⇒ matching note file.
|
|
158
|
+
|
|
159
|
+
**Process**
|
|
160
|
+
- [ ] All on `feat/cluster-introduction`; **not** merged to main (founder gate).
|
|
161
|
+
- [ ] critic review GREEN against the §4 security invariants.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 7. Test plan (core-level, no consumer)
|
|
166
|
+
|
|
167
|
+
1. **Compile** — clean build of the modified core packet.
|
|
168
|
+
2. **Version** — `get_version` returns 2.1.
|
|
169
|
+
3. **Enrollment** — CP with `managed_roots = {rootY}` accepts `enroll_delegated_node(childAd, cert→rootY, rootProfile)` → `peer_ads[child]` set; same with `cert→rootZ` (unmanaged) → abort. Tampered cert → abort.
|
|
170
|
+
4. **Inherited gate (positive)** — role with `root_cp_binding{cid_cp=CP}` + matching `root_ad`, `monitoring_proxy=NIL`: `ingest_connect_descriptor` from `CP` succeeds.
|
|
171
|
+
5. **Inherited gate (negative)** — same role, relay from a non-CP sender → abort; `root_cp_binding` verifying against wrong root keys → abort.
|
|
172
|
+
6. **Legacy gate (regression)** — role with `monitoring_proxy=CP`, no `root_cp_binding`: ingest from `CP` still succeeds.
|
|
173
|
+
7. **Capability gate** — role without `core.connect` in `describe()` → ingest aborts regardless of gate.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## 8. Milestones / sequencing
|
|
178
|
+
|
|
179
|
+
- **M1 — Protocol primitives:** items #1–#3, #5, #7 (structs check, `managed_roots`, `set_root_cp_binding`, gate helper, version bump). Compile.
|
|
180
|
+
- **M2 — Enrollment + gate swap:** items #4, #6. Compile + the §7 unit/runtime tests.
|
|
181
|
+
- **M3 — Release-notes architecture:** §5 (directory, migration, 2.1 stub).
|
|
182
|
+
- **M4 — critic review** against §4 invariants → GREEN.
|
|
183
|
+
- **Gate:** founder approval to promote the governance layer to enforcing → only then merge to main + (next rounds) release-note prose, architecture docs, MCP integration, control-plane.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 9. Risks & open decisions
|
|
188
|
+
|
|
189
|
+
- **Founder approval (blocking for main):** this promotes the deferred governance-attestation layer (`cp_attestation`/`root_cp_binding`/invite-threading) from non-enforcing visibility to an **enforcing** authorization role gating introductions. Security is sound (root-signed, domain-separated, locally pinned via `root_ad`); residual trust (host honestly distributes `root_ad`/`root_cp_binding` to its roles) is the same honesty class as the existing monitoring self-assertion limit (README §8). The **promotion decision is the founder's** — implement on a branch, do not merge until signed off.
|
|
190
|
+
- **Monitoring inheritance (open):** in scope or not? Default OUT of this task's code; it is a governance-semantics change (root-bind ⇒ all roles monitored). Decide before M2 if it is to be bundled.
|
|
191
|
+
- **Recursion (parked):** flat 2-level only. The structs here (`role_cid→root_cid`) are not chain-walking; a future recursive-delegation change is separate and more invasive. Keep `enroll_delegated_node`/the gate written so a later chain-walk could slot in, but do not build it.
|
|
192
|
+
- **`role_ad_hash` availability:** confirm the enroll payload can supply the hash `verify_peer_delegation` needs (item #1) — extend `a2a_protocol` only if missing.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 10. Handoff note for the fresh implementation sessions
|
|
197
|
+
|
|
198
|
+
- Bind identities per the existing team pattern (Coordinator + Developer + critic). Developer implements §4 on `feat/cluster-introduction`; critic reviews against §4 invariants + §6 metrics.
|
|
199
|
+
- The authoritative design rationale (verifier reuse, additive compat, sizing) came from the mufl-core dev; this plan encodes it. When in doubt on a verifier signature, read `a2a_protocol.mm` at the line anchors in §1 rather than guessing.
|
|
200
|
+
- Do **not** start MCP/control-plane work — those are later phases by explicit user instruction.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
I want to design a generic configuration architecture.
|
|
2
|
+
|
|
3
|
+
The idea is the following.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
ours control plane is a web application provided by the ours developers. It is implemented following the ours core protocol. It should allow adding arbitraty application built on ours to the list of controlled applications on your web site. This control plane application is current "messenger" application, it already contains "clusters" dedicated place to manager mcp servers that you own. I want to extend it to manage ANY application on ours, not just mcp server.
|
|
7
|
+
|
|
8
|
+
To do that we have to add a support on the mufl core protocol level, so every application implementing the core protocol could communicate with the control plane.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
To do that we have to implement a couple of things:
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
1. Application manifest - ours core should define a format for application manifest - this should include: name, description, configuration schema (optional)
|
|
15
|
+
2. Tool to enable monitoring - monitoring is required in the ours network. Monitoring is only possible from the control plane - control plane is bound to the application with the simillar process as current mcp server - invite + random 6-digit code. After binding the user could enable the monitoring from the control plane and the NODE is FORCED (it is enabled by the protocol, so this is not even exposed to the app developer, app can't override id) proxy all the traffic going through the node. Proxy it to the control plane. Reencrypting with thee control plane key, so no traffic ever goes as plain text over the network.
|
|
16
|
+
3. Optional configuration schema - is a json schema of the application that is rendered on the frontend part of the control plane. User is able to setup the application using this json schema.
|
|
17
|
+
|
|
18
|
+
For example, telegram-connector-proxy application should expose a json schema to enable adding multiple bots tokens - for each bot token enable multiple chat each chat proxies to different contact in the network.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Please also mention that these settings ideally should be both available on the mufl side and on the wrapper typescript application side. Because some of the settings will be purely mufl. But on the other hand if this is complicated because of mapping of json and mufl values we can expose all the ocnfiguraion to the external wrapper and just set some application specific mufl configuration via transaction from the typescript wrapper. So for example, if comes something like "allow only outgoing transactions to this packet" configuration we obviously set it on the mufl level, and check in the app when we send the transaction. But again, I don't want to overcomplicate the scope of this task. We can defer some of the things to the later.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Here is one important caveat, control plane should be able to "INTRODUCE" two parties under the same control plane together somehow. The usecase when I want to set for example to telegram connector some other node as a proxy, but telegram connector does not have this in contact list yet.
|
|
25
|
+
|
|
26
|
+
And this is actually very difficult problem that i don't know how to resolve yet. Try to find the simplest yet secure possible solution.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
Then, frontend shoudl support per app name specialized rendering.
|
|
30
|
+
For example, it should register (hardcode) the "ours.mcp" plugin name to redner this app with subagents etc (the way it renders it now). Otherwise, if the name is unknown (on the first stage the only known name should be ours.mcp) then it should render the generic template with configuratino and monitoring.
|
|
31
|
+
|
|
32
|
+
Please spawn "critic-1" agent and tell him his persona and "ours-developer-1" agent - introduce him with the task and ask him to create a design. He should communicate his decisions with critic.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Then come back to me with a detailed plan and code examples how everything should work and what code changes we should implement on the protocol level.
|