@mhome/core-protocol 1.7.1 → 1.8.0
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/README.md +8 -0
- package/contract/recipient-id-v1.md +36 -0
- package/fixtures/recipient-id.conformance.json +9 -0
- package/manifest/core.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +3 -2
package/README.md
CHANGED
|
@@ -21,6 +21,14 @@ Storage separates backing-filesystem capacity from Storage-owned logical
|
|
|
21
21
|
usage. Namespace is an internal protocol term; user-facing clients present it
|
|
22
22
|
as a Folder.
|
|
23
23
|
|
|
24
|
+
## Stable recipients (core-api 1.8.0)
|
|
25
|
+
|
|
26
|
+
`RecipientId` provides canonical Messaging (`m:p:` / `m:g:`) and Node (`n:`)
|
|
27
|
+
addresses. See [the contract](contract/recipient-id-v1.md) and the packaged
|
|
28
|
+
cross-language [conformance vectors](fixtures/recipient-id.conformance.json).
|
|
29
|
+
This is additive; the external Host transport protocol remains version 14.
|
|
30
|
+
Consumers must explicitly migrate their identities after this release is available.
|
|
31
|
+
|
|
24
32
|
## Host delivery (core-api 1.7.1)
|
|
25
33
|
|
|
26
34
|
Core resolves logical recipients; the Host executes a concrete App connection,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Stable recipient identity
|
|
2
|
+
|
|
3
|
+
These identities address recipients, not WebSocket sessions or Agent conversations.
|
|
4
|
+
Tenant and Space are required routing context outside the identity. Cloud/local
|
|
5
|
+
placement is a route property, never a prefix or an identity component.
|
|
6
|
+
|
|
7
|
+
| Recipient | Canonical representation |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Personal Messaging conversation | `m:p:<provider>:<account>:<conversation>[:<lane>]` |
|
|
10
|
+
| Shared Messaging conversation | `m:g:<provider>:<account>:<conversation>[:<lane>]` |
|
|
11
|
+
| Node | `n:<nodeType>:<nodeId>` |
|
|
12
|
+
|
|
13
|
+
Account, conversation, lane and Node ID are strict UTF-8 encoded as canonical
|
|
14
|
+
unpadded base64url. Empty values and surrounding whitespace are invalid. Provider
|
|
15
|
+
and Node type match `[a-z][a-z0-9_]*`; wire parsing must reject noncanonical input.
|
|
16
|
+
|
|
17
|
+
Messaging uses exactly the same address components as ConversationSurface. The
|
|
18
|
+
conversion between `m:p:` / `m:g:` and `cs1:mp:` / `cs1:mg:` preserves every
|
|
19
|
+
component, including lane. Generate both from one structured address; do not store
|
|
20
|
+
two independently editable addresses. A base authorization lookup may omit lane,
|
|
21
|
+
but the actual recipient must retain it. Personal and shared identities never
|
|
22
|
+
collapse into one another.
|
|
23
|
+
|
|
24
|
+
Node identity resolves against the existing scoped Node registry. It does not
|
|
25
|
+
create an App Client, a second registry, or a WebSocket. Node capability/endpoint
|
|
26
|
+
selection remains a separate field. Connection close still addresses a specific
|
|
27
|
+
connection, not a stable Node identity.
|
|
28
|
+
|
|
29
|
+
App installation selectors (`a:`), user selectors, connection IDs (`L:` / `C:`),
|
|
30
|
+
and Phone Provider credentials (`p:`) are outside this codec. In particular, `p:`
|
|
31
|
+
is not a personal Messaging recipient; only `m:p:` is. The codec does not accept
|
|
32
|
+
legacy `M:` IDs or ConversationSurface IDs as recipient IDs.
|
|
33
|
+
|
|
34
|
+
Cross-language implementations must pass `fixtures/recipient-id.conformance.json`.
|
|
35
|
+
This additive Foundation release prepares consumers for a coordinated identity
|
|
36
|
+
cutover; it does not itself migrate Core/Lion storage or delivery adapters.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"valid": [
|
|
3
|
+
{"id":"m:p:telegram:Ym90:Y2hhdA","surface":"cs1:mp:telegram:Ym90:Y2hhdA"},
|
|
4
|
+
{"id":"m:g:telegram:Ym90:Y2hhdA:dG9waWM","surface":"cs1:mg:telegram:Ym90:Y2hhdA:dG9waWM"},
|
|
5
|
+
{"id":"m:g:feishu:YWNjb3VudA:Y29udmVyc2F0aW9u","surface":"cs1:mg:feishu:YWNjb3VudA:Y29udmVyc2F0aW9u"},
|
|
6
|
+
{"id":"n:camera:bm9kZTox","nodeType":"camera","nodeId":"node:1"}
|
|
7
|
+
],
|
|
8
|
+
"invalid": ["", "a:device", "p:provider", "L:socket", "C:peer:socket", "M:telegram:Ym90:Y2hhdA", "cs1:mp:telegram:Ym90:Y2hhdA", "m:x:telegram:Ym90:Y2hhdA", "m:p:telegram:Ym90=:Y2hhdA", "m:p:telegram::Y2hhdA", "m:p:telegram:Ym90:Y2hhdA:", "n:Camera:bm9kZQ", "n:camera:", "n:camera:bm9kZQ==", "n:camera:_w", "n:camera:IG5vZGU", "n:camera:bm9kZQ:extra"]
|
|
9
|
+
}
|
package/manifest/core.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.core",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.8.0",
|
|
4
4
|
"manifest": "manifest/core.v1.json",
|
|
5
5
|
"schemas": {
|
|
6
6
|
"normalizedInbound": "schema/normalized-inbound.v4.schema.json",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"normalizedInbound": "fixtures/normalized-inbound.conformance.json",
|
|
13
13
|
"messagingCommands": "fixtures/messaging-commands.conformance.json",
|
|
14
14
|
"interactionFlowNode": "fixtures/interaction-flow-node.conformance.json",
|
|
15
|
-
"cameraPluginManagement": "fixtures/camera-plugin-management.conformance.json"
|
|
15
|
+
"cameraPluginManagement": "fixtures/camera-plugin-management.conformance.json",
|
|
16
|
+
"recipientId": "fixtures/recipient-id.conformance.json"
|
|
16
17
|
}
|
|
17
18
|
}
|