@mhome/core-protocol 1.74.0 → 1.77.1

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.
@@ -115,9 +115,8 @@
115
115
  },
116
116
  "claimRequest": {
117
117
  "hostId": "non-empty string; endpoint resolved from native LAN discovery",
118
- "claimToken": "optional string from a completed Bluetooth setup; forwarded to the Host claim unchanged",
119
- "recoverIdentity": "optional boolean, default false; only an explicit user reauthorization may replace this account\u2019s old Host key; never enable for background/Bluetooth automatic claim",
120
- "scopeId": "optional selected Space id; required for Space Hosts. Cloud derives the tenant from the authenticated user and checks ownership."
118
+ "recoverIdentity": "optional boolean, default false; only an explicit user reauthorization may replace this account\u2019s old Host key; never enable for background claim",
119
+ "spaceId": "optional selected Space id; required for Space Hosts. Cloud derives the tenant from the authenticated user and checks ownership."
121
120
  },
122
121
  "claimResponse": {
123
122
  "claimed": "true only after Host persistence and cloud receipt commit; false when explicit identity recovery submitted an administrator application awaiting approval/confirmation",
@@ -0,0 +1,44 @@
1
+ # Installed Plugin contribution reads
2
+
3
+ `/node/contributions/read` is a shared SDK control request on the already
4
+ authenticated Space-bound Node connection. It is not a Host-management endpoint
5
+ or an arbitrary filesystem API. `/app/plugin/contribution/read` requires current
6
+ Space read access and an enabled, connected exact `nodeId`/`nodeType`.
7
+
8
+ The signed Plugin definition may contain `contributions: {size, sha256}`. It pins
9
+ the exact bytes of `contributions.json` in that process's installed package. For
10
+ Preview the existing Host proof covers this definition; published definitions use
11
+ the existing release signature. Absence means no contribution reader is available.
12
+ An advertised Node contract digest alone is not source evidence.
13
+
14
+ The index is `{formatVersion: 1, pluginId, version, files}` where `files` maps exact
15
+ public contribution paths to `{size, sha256}`. Only declared contracts, UI builds,
16
+ Skills, assets and `extension-package.json` belong here. Native executables,
17
+ service configuration, databases and credentials never do. The index is limited
18
+ to 128 KiB/512 files and each resource to 1 MiB. Base64 plus its envelope fits the
19
+ existing 2 MiB Node message limit. Packagers reject oversize contributions.
20
+
21
+ Request: `{sourceManifestSha256, resource?}`. Omit `resource` to read the index;
22
+ otherwise name an exact indexed resource. The response is
23
+ `{sourceManifestSha256, resource, contentBase64}`. The App Facade adds `nodeId` and
24
+ `nodeType` to its input and wraps the verified response in `content`.
25
+ App callers use the ordinary Facade call envelope with `responseDetail: "full"`;
26
+ the successful Full result's `data` is `ReadPluginContributionOutput`.
27
+
28
+ The current reader serves Host-managed published packages and native Preview.
29
+ Firmware packages currently omit this index. Their contribution hosting requires
30
+ an embedded-resource producer/reader through the same Node transport before a
31
+ consumer can depend on it; no Host-file fallback is supplied for firmware.
32
+
33
+ Core fixes one current authenticated session for index and body reads, verifies
34
+ the admitted source digest, size and content digests, and rejects a changed
35
+ connection before returning. Contract reads also check Node type, contract
36
+ identity/version/digest, supported operation subset and its actual routes/access.
37
+ Index bytes are cached only for that session; the SDK caches its immutable index
38
+ at the actual executable's package root, never through the mutable current pointer.
39
+ Body reads verify the file every time. No persistent content cache, offline Host
40
+ fallback or new signing/permission system is introduced.
41
+
42
+ Reading a declaration does not authorize executing it or register a public tool.
43
+ Invocation must recheck current Space access, binding, source and operation policy.
44
+ These reads alone do not implement dynamic Agent/CLI/MCP or custom UI hosting.
@@ -14,7 +14,7 @@
14
14
  { "name": "unknown-command", "input": "/usage", "result": { "kind": "not_command" } }
15
15
  ],
16
16
  "orderingCases": [
17
- { "name": "stable-scope-id-order", "scopeIds": ["scope-z", "scope-a", "scope-m"], "expected": ["scope-a", "scope-m", "scope-z"] },
18
- { "name": "lexical-order-is-case-sensitive", "scopeIds": ["scope-b", "Scope-a"], "expected": ["Scope-a", "scope-b"] }
17
+ { "name": "stable-scope-id-order", "spaceIds": ["scope-z", "scope-a", "scope-m"], "expected": ["scope-a", "scope-m", "scope-z"] },
18
+ { "name": "lexical-order-is-case-sensitive", "spaceIds": ["scope-b", "Scope-a"], "expected": ["Scope-a", "scope-b"] }
19
19
  ]
20
20
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.74.0",
3
+ "contractVersion": "1.77.1",
4
4
  "protocols": {
5
5
  "extensionSources": {
6
6
  "contract": "contract/extension-sources-v1.md",
@@ -16,6 +16,8 @@
16
16
  "completeTarget": "/llm/complete"
17
17
  },
18
18
  "node": {
19
+ "contributionsReadTarget": "/node/contributions/read",
20
+ "contributionsContract": "contract/plugin-contributions-v1.md",
19
21
  "managementEventTarget": "/node/app/event",
20
22
  "managementEventAppTarget": "/app/plugin/event",
21
23
  "managementContract": "contract/plugin-management-v1.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.74.0",
3
+ "version": "1.77.1",
4
4
  "description": "Build-time protocol artifacts for mhome.core",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.core",
3
- "contractVersion": "1.74.0",
3
+ "contractVersion": "1.77.1",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "storage": "schema/storage.v1.schema.json",
@@ -55,10 +55,10 @@
55
55
  "items": {
56
56
  "type": "object",
57
57
  "additionalProperties": false,
58
- "required": ["name", "scopeIds", "expected"],
58
+ "required": ["name", "spaceIds", "expected"],
59
59
  "properties": {
60
60
  "name": { "type": "string", "minLength": 1 },
61
- "scopeIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
61
+ "spaceIds": { "type": "array", "items": { "type": "string", "minLength": 1 } },
62
62
  "expected": { "type": "array", "items": { "type": "string", "minLength": 1 } }
63
63
  }
64
64
  }