@mhome/core-protocol 1.44.0 → 1.47.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
@@ -165,3 +165,41 @@ same operations through `hostList` / `hostRuntime`. None accepts a Space ID. Cli
165
165
  discover `_mhome-host._tcp`, verify reply Host IDs, and unwrap the HTTP runtime envelope.
166
166
  Install/restart submissions are not automatically replayed after transport failure.
167
167
  First claim is direct LAN only; daily User management can use the current Core as a token-forwarding proxy.
168
+
169
+ ## Operation timeouts
170
+
171
+ `manifest/operation-timeouts.v1.json` is the code-owned catalog of shared operation
172
+ budgets, ingress selectors and caller reply-wait profiles. It has no runtime
173
+ configuration or database dependency. Edit the catalog and run
174
+ `npm run generate:operation-timeouts`; Rust consumes generated constants and Lion
175
+ loads the same packaged JSON once at startup. Both replay the packaged
176
+ `fixtures/operation-timeouts.conformance.json`. Java bindings reject unknown policy
177
+ IDs instead of silently choosing a different limit.
178
+
179
+ An execution budget and a reply wait are different: reply grace permits transfer
180
+ of a completed result or timeout error; it never grants the callee more execution
181
+ time. Existing domain-owned lifetimes (streams, subscriptions, long batch jobs)
182
+ and implementation-specific step timeouts are not replaced by a default request
183
+ budget. New shared operations need an explicit catalog entry and selector tests.
184
+
185
+ `execution_budget::Budgeted<T>` adds optional `executionBudget: { remainingMs }`
186
+ metadata alongside an object envelope's existing fields. Bridge uses it on MWS
187
+ requests; Host IPC uses it alongside `input` in `HandleCoreInput`. It is not an
188
+ App Facade `control` field or part of the business payload. Values are integral
189
+ milliseconds in `0..=2147483647`; zero is expired. Missing metadata retains local
190
+ policy. This additive metadata does not change external IPC protocol 23; both
191
+ ends need the new implementation for remaining-budget propagation.
192
+
193
+ Each process anchors received time to its monotonic clock, caps it by local policy,
194
+ and passes the remaining budget to children. Sender queueing/upload, receiver
195
+ queueing/download, attempts and backoff consume that same deadline. Round down
196
+ when emitting milliseconds. Durable Lion peer relays also deduct queue age using
197
+ the existing peer message timestamp/clock convention. Network transit and clock
198
+ skew are not a strict global stop guarantee; the caller keeps its own deadline.
199
+ Do not put a refreshed full duration around each retry.
200
+
201
+ Timeout means that the caller stopped waiting and cancelled owned asynchronous
202
+ work where supported. It does not roll back completed writes, stop arbitrary
203
+ blocking code, or prove that detached work drained. Request-owned spawned tasks
204
+ must explicitly carry the captured deadline. Responses and independent background
205
+ jobs have their own lifetime. Migration freezing/drain remains a separate feature.
@@ -0,0 +1,18 @@
1
+ [
2
+ {"target":"/app/widget/list","payload":{},"operation":"coreRequest","totalMs":60000},
3
+ {"target":"/harness/test/session/open","payload":{},"operation":"harnessSessionOpen","totalMs":150000},
4
+ {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":{"lighting":"source"}}}},"operation":"scriptSave","totalMs":420000,"lionWaitMs":450000},
5
+ {"target":"/app/automation/verify","payload":{"input":{"script":{"scripts":{"lighting":"source"}}}},"operation":"scriptValidation","totalMs":205000,"lionWaitMs":230000},
6
+ {"target":"/automation/save","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptSave","totalMs":420000},
7
+ {"target":"/invoke/app/automation/save","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptSave","totalMs":420000},
8
+ {"target":"/dispatch/agent/app/automation/verify","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptValidation","totalMs":205000},
9
+ {"target":"/dispatch/app/automation/save","payload":{"call":{"input":{"script":{"scripts":{"lighting":"source"}}}}},"operation":"scriptSave","totalMs":420000},
10
+ {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":{}}}},"operation":"coreRequest","totalMs":60000},
11
+ {"target":"/app/automation/save","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"coreRequest","totalMs":60000},
12
+ {"target":"/app/automation/save","payload":{"input":{"script":{"scripts":[]}}},"operation":"coreRequest","totalMs":60000},
13
+ {"target":"/app/automation/snapshot/rollback","payload":{},"operation":"scriptSave","totalMs":420000},
14
+ {"target":"/automation/copy","payload":{},"operation":"scriptSave","totalMs":420000},
15
+ {"target":"/automation/enroll","payload":{},"operation":"scriptSave","totalMs":420000},
16
+ {"target":"/automation/overview/save","payload":{},"operation":"scriptSave","totalMs":420000},
17
+ {"target":"/bridge/automation/compile","payload":{"script":{"scripts":{"lighting":"source"}}},"operation":"scriptValidation","totalMs":205000}
18
+ ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.core.v1",
3
- "contractVersion": "1.44.0",
3
+ "contractVersion": "1.47.0",
4
4
  "protocols": {
5
5
  "agentGateway": {
6
6
  "submitTarget": "/agent/submit",
@@ -0,0 +1,27 @@
1
+ {
2
+ "manifest": "mhome.operation-timeouts.v1",
3
+ "operations": {
4
+ "coreRequest": { "totalMs": 60000, "description": "Default Core request execution." },
5
+ "harnessSessionOpen": { "totalMs": 150000, "description": "Harness session initialization." },
6
+ "scriptValidation": { "totalMs": 205000, "description": "Companion Rust build and validation." },
7
+ "scriptSave": { "totalMs": 420000, "description": "Companion Rust build, installation and save." },
8
+ "coreBridgeRequest": { "totalMs": 35000, "description": "Core outgoing cloud request, including sending." },
9
+ "coreBridgeInbound": { "totalMs": 55000, "description": "Ordinary incoming Core Bridge request, including queueing." },
10
+ "nodeRequest": { "totalMs": 60000, "description": "Core outgoing Node request, including sending." },
11
+ "lionBridgeRequest": { "totalMs": 60000, "description": "Default Lion outgoing Hub request." },
12
+ "llmCloudCall": { "totalMs": 180000, "description": "Cloud model call preparation, execution and accounting." }
13
+ },
14
+ "waitProfiles": {
15
+ "hostIpc": { "graceMs": 5000 },
16
+ "coreBridge": { "graceMs": 10000 },
17
+ "client": { "graceMs": 35000 },
18
+ "lionForward": { "graceMs": 0, "overrides": { "scriptValidation": 25000, "scriptSave": 30000 } }
19
+ },
20
+ "selectors": {
21
+ "forwardPrefixes": ["/invoke", "/dispatch/agent", "/dispatch"],
22
+ "storedScriptSave": ["/automation/snapshot/rollback", "/app/automation/snapshot/rollback", "/automation/overview/save", "/automation/copy", "/automation/enroll"],
23
+ "sourceScriptSave": ["/automation/save", "/app/automation/save"],
24
+ "sourceScriptValidation": ["/app/automation/verify", "/bridge/automation/parse", "/bridge/automation/format", "/bridge/automation/verify", "/automation/format", "/bridge/automation/compile", "/bridge/agent/automation/compile"],
25
+ "ordinaryOverrides": { "/harness/test/session/open": "harnessSessionOpen" }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/core-protocol",
3
- "version": "1.44.0",
3
+ "version": "1.47.0",
4
4
  "description": "Build-time protocol artifacts for mhome.core",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.core",
3
- "contractVersion": "1.44.0",
3
+ "contractVersion": "1.47.0",
4
4
  "manifest": "manifest/core.v1.json",
5
5
  "schemas": {
6
6
  "hostManagementRequest": "schema/host-management-request.v1.schema.json",