@mhome/app-facade-protocol 1.158.0 → 1.160.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.
@@ -44,8 +44,8 @@ the public input and model output cannot select a payer. Billing failure must
44
44
  not silently select another member or account.
45
45
 
46
46
  This is a payment rule, not an authorization grant. A scheduled service is not
47
- an enrolled `ClientPrincipal::Space`, nor a user impersonation. Core/Lion must
48
- authenticate the internal admission, bind its Space and current execution
47
+ an enrolled `ClientPrincipal::Space`, nor a user impersonation. Core/Lion use a
48
+ backend-only scheduled entry, bind its Space and current execution
49
49
  ownership, check enabled settings/model/budget, and restrict reads and validation
50
50
  to that Space. Explicit generation additionally checks the requesting user's
51
51
  Space access. Shape validation cannot substitute for those checks.
@@ -61,10 +61,10 @@ failures and measured usage. Input/result JSON remains opaque to the leaf wire
61
61
  crate; the shared generator and Space host validate the registered business
62
62
  models. Nested transport facts, plans, errors and usage remain strict.
63
63
 
64
- Lion authorizes callback reads against the stored active invocation and dispatch,
65
- then uses existing Facade authorization. Explicit callbacks retain the requesting
66
- user. Internal scheduled authorization is a separate host integration; recognizing
67
- its wire shape does not enable periodic generation or grant service authority.
64
+ Lion authorizes callback reads against the stored active invocation and dispatch.
65
+ Explicit callbacks retain the requesting user's Facade authority; scheduled
66
+ callbacks use the backend-only read port and the same business dispatch and
67
+ presentation. Recognizing the wire shape alone grants no internal authority.
68
68
  Terminal delivery is best-effort with bounded execution deadlines, without a
69
69
  second durable outbox, reasoning replay or write replay.
70
70
 
@@ -218,6 +218,11 @@ null values are rejected. Existing enabled-only calls remain valid. Stored setti
218
218
  from before interval configuration use the same six-hour default.
219
219
  The switch controls periodic generation only; explicit authorized generation remains
220
220
  available. The UI places these controls in a separate Agent Suggestion Settings page.
221
+ The first enabled backend observation initializes the durable interval origin;
222
+ the first automatic run waits one full configured interval (six hours by default).
223
+ `SuggestionScheduleState` stores only `intervalStartedAt`; it is initialized once
224
+ and advanced atomically with each admitted automatic run. It is not a run and
225
+ does not change generation/get before the first real run. Manual runs never write it.
221
226
  Automatic intervals are measured from the previous admitted automatic start,
222
227
  regardless of completion time or outcome. Explicit runs never reset that clock.
223
228
  This is an interval, not a calendar schedule or a promise of an exact next start.
@@ -237,7 +242,8 @@ script compilation, billing settlement, persistence or local/cloud integration.
237
242
  ## Space migration
238
243
 
239
244
  The `suggestion/data` DataSync category transfers portable values, not storage keys:
240
- `SETTINGS` carries `tenantId`, `spaceId` and settings; `STATE` carries that owner,
245
+ `SETTINGS` carries `tenantId`, `spaceId` and settings; `SCHEDULE` carries the same
246
+ owner and `schedule` (`SuggestionScheduleState`); `STATE` carries that owner,
241
247
  `current` (run, trusted invocation, optional focus and observed usage), and optional
242
248
  `contextSummary`; `SUGGESTION` carries `tenantId` and the full typed `item`, whose
243
249
  `spaceId` supplies its Space owner. The shared `suggestion.migration.json` fixture
@@ -53,6 +53,14 @@
53
53
  },
54
54
  "contextSummary": "Previous successful review"
55
55
  },
56
+ {
57
+ "kind": "SCHEDULE",
58
+ "tenantId": "tenant",
59
+ "spaceId": "space",
60
+ "schedule": {
61
+ "intervalStartedAt": 2000
62
+ }
63
+ },
56
64
  {
57
65
  "kind": "SUGGESTION",
58
66
  "tenantId": "tenant",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "callSchema": "schema/facade-call.v1.schema.json",
5
5
  "routing": "manifest/routing.v1.json",
6
6
  "routingSchema": "schema/routing.v1.schema.json",
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.158.0",
2
+ "contractVersion": "1.160.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/conversation/get": "spaceRead",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "contract": "contract/host-provisioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/host/provision/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.hub.targets.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "appTargets": [
5
5
  "/app/hub/get",
6
6
  "/app/hub/remove"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.pod.targets.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "targetPrefix": "/app/",
5
5
  "default": {
6
6
  "execution": "spaceMode"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.messaging.targets.v1",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.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.158.0",
3
+ "version": "1.160.0",
4
4
  "description": "Build-time protocol artifacts for mhome.app-facade",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.app-facade",
3
- "contractVersion": "1.158.0",
3
+ "contractVersion": "1.160.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",
@@ -1367,6 +1367,20 @@
1367
1367
  },
1368
1368
  "minProperties": 1,
1369
1369
  "additionalProperties": false
1370
+ },
1371
+ "SuggestionScheduleState": {
1372
+ "type": "object",
1373
+ "additionalProperties": false,
1374
+ "required": [
1375
+ "intervalStartedAt"
1376
+ ],
1377
+ "properties": {
1378
+ "intervalStartedAt": {
1379
+ "type": "integer",
1380
+ "minimum": 1,
1381
+ "maximum": 9007199254740991
1382
+ }
1383
+ }
1370
1384
  }
1371
1385
  }
1372
1386
  }