@mhome/core-protocol 1.77.1 → 1.78.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.
@@ -18,11 +18,25 @@ use that memory snapshot; they do not scan packages or maintain a database copy.
18
18
  Stopped services retain their requirements. Invalid declarations remain visible.
19
19
 
20
20
  Each `HostPermission` is one component and one permission: `componentId`,
21
- `componentName`, `permission`, `feature`, `reason`, `observation`, `error`, and
21
+ `componentName`, `permission`, `enforcement`, `feature`, `reason`, `observation`, `error`, and
22
22
  `supportedActions`. There are no grouped subjects or selected substitute executors.
23
23
  `PermissionObservation.processId` identifies the actual executing process, not an
24
24
  OS grant identity. A sidecar reports its own observation through its service.
25
- Reading status must not start an absent sidecar or substitute its parent's grant.
25
+ Reading status must not start an absent sidecar. The service shell owns permission
26
+ policy and business activation. It may observe a permission shared with its Core
27
+ helper only when the platform launch/signing contract establishes the same
28
+ authorization identity. Do not relabel the shell observation with the helper PID.
29
+ An unrelated execution context requires its own observation; it does not own a
30
+ second permission policy state machine.
31
+
32
+ Requirements default to `enforcement: startup`: the service starts its management
33
+ control plane, checks consent, and keeps business initialization/admission closed
34
+ until all startup requirements are satisfied. Waiting for a user is not a process
35
+ failure and does not consume the business initialization timeout. Explicit
36
+ `enforcement: operation` requirements are checked by the affected operation; Mac
37
+ Apple Events use this policy because their target applications need not be running
38
+ at service startup. A permission grant is not business readiness. Native request
39
+ submission, authorization, and successful business initialization remain distinct.
26
40
 
27
41
  A helper can share its responsible application's consent without any grouping
28
42
  fields in this protocol. Equal PIDs, signing teams or states alone do not establish
@@ -111,3 +125,28 @@ selection; incomplete manifests; bounded collection; native request deduplicatio
111
125
  Linux `notRequired` without any resource observation. Test Linux setup first as
112
126
  a dry-run and verify effective access in the intended ordinary runtime session.
113
127
  Signing fixtures and mocked status tests do not prove TCC attribution.
128
+
129
+ ## Service state and invalidation
130
+
131
+ The service shell publishes its process generation, PID, revision, lifecycle
132
+ phase and `ServicePermissionState` at `GET /internal/service/state` and
133
+ `POST /internal/service/state/wait`. The latter accepts an optional
134
+ `processGeneration`/`revision` cursor and waits up to 25 seconds for a newer state.
135
+ These management endpoints are loopback-only. A state is not proof of a grant;
136
+ individual permission observations remain the evidence. Waiting does not mean
137
+ business readiness, and an old process's state is never adopted by PID alone.
138
+ The private `/internal/service/status` report also places this exact state under
139
+ `details.serviceRuntime`. This namespace is reserved for shell lifecycle data;
140
+ business diagnostics may continue using `details.runtime`. Host treats permission
141
+ waiting, business initialization and business shutdown as `activating`, and only
142
+ accepts `ready` after the shell confirms both permission and business readiness.
143
+
144
+ An authenticated `POST /v1/changes/wait` on Host accepts the same cursor field
145
+ names and returns `{hostId,cursor}`. This is ordinary read authority, not permission
146
+ to open OS prompts. Consumers read an initial/current snapshot, subscribe from its
147
+ cursor, and reread after invalidation or reconnect. Cursors are in-memory latest
148
+ state, not a persistent event queue. Native callbacks notify changes after detection;
149
+ platforms without a full OS settings feed require bounded passive observation.
150
+ Host shutdown cancels idle waits. Local Client permission `snapshot` reads local
151
+ and already trusted, discovered remote Hosts independently of Core/Space. It never
152
+ requests consent; remote prompts and Settings remain prohibited.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.77.1",
3
+ "contractVersion": "1.78.1",
4
4
  "protocols": {
5
5
  "extensionSources": {
6
6
  "contract": "contract/extension-sources-v1.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.77.1",
3
+ "version": "1.78.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.77.1",
3
+ "contractVersion": "1.78.1",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "storage": "schema/storage.v1.schema.json",
@@ -128,6 +128,7 @@
128
128
  "componentId",
129
129
  "componentName",
130
130
  "permission",
131
+ "enforcement",
131
132
  "feature",
132
133
  "reason",
133
134
  "observation",
@@ -150,6 +151,10 @@
150
151
  "type": "string",
151
152
  "minLength": 1
152
153
  },
154
+ "enforcement": {
155
+ "type": "string",
156
+ "enum": ["startup", "operation"]
157
+ },
153
158
  "reason": {
154
159
  "type": "string",
155
160
  "minLength": 1