@mhome/app-facade-protocol 1.1.2 → 1.3.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 CHANGED
@@ -20,3 +20,18 @@ recovering the secret. Each current-step resolver projection reports whether
20
20
  its complete referenced value is available and which visible inputs can make
21
21
  it stale, so clients can resolve it reactively without learning handlers or
22
22
  the hidden graph.
23
+
24
+ ## Routing contract
25
+
26
+ `manifest/routing.v1.json` is the canonical client-side routing policy for the
27
+ new `/app/*` facade. Ordinary operations follow the active Space mode. Only
28
+ exceptional domains declare a fixed Cloud, Hub, or request-placement executor.
29
+ Relay permission is separate from execution authority so a client
30
+ cannot silently turn every Hub request into a cloud-proxied request.
31
+
32
+ The checked-in Rust table is generated from that manifest, and non-Rust clients
33
+ consume the same manifest from the npm protocol package. A native Host may
34
+ supervise Hub and Node processes, but it is not a public App Facade executor;
35
+ Host process management remains an implementation detail behind the selected
36
+ Hub. Lion's legacy controller annotations and non-`/app/*` protocols are
37
+ outside this contract.
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.1.2",
3
+ "contractVersion": "1.3.0",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
+ "routing": "manifest/routing.v1.json",
6
+ "routingSchema": "schema/routing.v1.schema.json",
5
7
  "domains": {
6
8
  "messaging": {
7
9
  "targets": "manifest/targets.v1.json"
@@ -24,9 +26,10 @@
24
26
  "extensionPriority": "after_exact"
25
27
  },
26
28
  "runtime": {
29
+ "contract": "mhome.runtime.status.v1",
30
+ "resourceTypes": ["nodeInstance", "nodeRuntime"],
27
31
  "requestTargets": ["/app/runtime/status/list"],
28
- "eventTargets": ["/app/runtime/status/changed"],
29
- "authority": "host"
32
+ "eventTargets": ["/app/runtime/status/changed"]
30
33
  },
31
34
  "interactionFlow": {
32
35
  "schema": "schema/interaction-flow-app.v1.schema.json",
@@ -0,0 +1,46 @@
1
+ {
2
+ "manifest": "mhome.app-facade.routing.v1",
3
+ "contractVersion": "1.3.0",
4
+ "targetPrefix": "/app/",
5
+ "default": {
6
+ "execution": "scopeMode",
7
+ "relay": "directOnly"
8
+ },
9
+ "matching": "exactBeforePrefix",
10
+ "placementJsonPointer": "/input/placement",
11
+ "rules": {
12
+ "cloudPrefixes": [
13
+ "/app/scope/",
14
+ "/app/inspire/"
15
+ ],
16
+ "cloudTargets": [
17
+ "/app/agent/context/get",
18
+ "/app/credit/record",
19
+ "/app/system/feedback/submit",
20
+ "/app/timeline/entity/latest/list"
21
+ ],
22
+ "scopeModeTargets": [
23
+ "/app/scope/context/get"
24
+ ],
25
+ "hubPrefixes": [
26
+ "/app/plugin/",
27
+ "/app/interaction-flow/",
28
+ "/app/object-storage/",
29
+ "/app/runtime/"
30
+ ],
31
+ "requestPlacementPrefixes": [
32
+ "/app/messaging/"
33
+ ],
34
+ "cloudRelayTargets": [
35
+ "/app/plugin/candidate/list",
36
+ "/app/plugin/detail/get",
37
+ "/app/plugin/installed/list",
38
+ "/app/object-storage/overview",
39
+ "/app/object-storage/folders/create",
40
+ "/app/object-storage/folders/get",
41
+ "/app/object-storage/folders/update",
42
+ "/app/object-storage/folders/list",
43
+ "/app/object-storage/settings/update"
44
+ ]
45
+ }
46
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.1.2",
3
+ "contractVersion": "1.3.0",
4
4
  "requestTargets": [
5
5
  "/app/messaging/provider/list",
6
6
  "/app/messaging/provider-account/list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/app-facade-protocol",
3
- "version": "1.1.2",
3
+ "version": "1.3.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.1.2",
3
+ "contractVersion": "1.3.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "call": "schema/facade-call.v1.schema.json",
7
7
  "frame": "schema/messaging-frame.v3.schema.json",
8
- "interactionFlow": "schema/interaction-flow-app.v1.schema.json"
8
+ "interactionFlow": "schema/interaction-flow-app.v1.schema.json",
9
+ "routing": "schema/routing.v1.schema.json"
9
10
  },
10
11
  "fixtures": {
11
12
  "valid": "fixtures",
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mhome.ai/schema/app-facade-routing.v1.schema.json",
4
+ "title": "MeowLink App Facade routing contract",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "manifest",
9
+ "contractVersion",
10
+ "targetPrefix",
11
+ "default",
12
+ "matching",
13
+ "placementJsonPointer",
14
+ "rules"
15
+ ],
16
+ "properties": {
17
+ "manifest": { "const": "mhome.app-facade.routing.v1" },
18
+ "contractVersion": {
19
+ "type": "string",
20
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
21
+ },
22
+ "targetPrefix": { "const": "/app/" },
23
+ "default": {
24
+ "type": "object",
25
+ "additionalProperties": false,
26
+ "required": ["execution", "relay"],
27
+ "properties": {
28
+ "execution": { "const": "scopeMode" },
29
+ "relay": { "const": "directOnly" }
30
+ }
31
+ },
32
+ "matching": { "const": "exactBeforePrefix" },
33
+ "placementJsonPointer": { "const": "/input/placement" },
34
+ "rules": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": [
38
+ "cloudPrefixes",
39
+ "cloudTargets",
40
+ "scopeModeTargets",
41
+ "hubPrefixes",
42
+ "requestPlacementPrefixes",
43
+ "cloudRelayTargets"
44
+ ],
45
+ "properties": {
46
+ "cloudPrefixes": { "$ref": "#/$defs/targetList" },
47
+ "cloudTargets": { "$ref": "#/$defs/targetList" },
48
+ "scopeModeTargets": { "$ref": "#/$defs/targetList" },
49
+ "hubPrefixes": { "$ref": "#/$defs/targetList" },
50
+ "requestPlacementPrefixes": { "$ref": "#/$defs/targetList" },
51
+ "cloudRelayTargets": { "$ref": "#/$defs/targetList" }
52
+ }
53
+ }
54
+ },
55
+ "$defs": {
56
+ "targetList": {
57
+ "type": "array",
58
+ "uniqueItems": true,
59
+ "items": {
60
+ "type": "string",
61
+ "pattern": "^/app/"
62
+ }
63
+ }
64
+ }
65
+ }