@mhome/app-facade-protocol 1.166.0 → 1.168.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
@@ -351,3 +351,15 @@ before terminal TTL records are produced. Upgrade both the public AWS service an
351
351
  cloud instances together. An old writer that accepts expired IDs would invalidate the
352
352
  retention guarantee after collection; rolling back to that creation behavior is unsupported.
353
353
  Enabling database TTL alone does not expire rows that have no `expireAt` attribute.
354
+
355
+ ## Plugin operation continuation
356
+
357
+ `/app/plugin/operation/status` returns `status` (`notFound`, `accepted`, or
358
+ `completed`), the completed `result` when present, and a `receipt` containing only
359
+ `invocationId`, `nodeId`, `nodeType`, `sourceManifestSha256`, `bindingRevision`,
360
+ `contractId`, and `operationId`. This App Facade receipt is separate from the
361
+ strict Node `FlowSubmissionResponse`; Node messages retain their existing shape.
362
+ The caller keeps the original business arguments separately for a status request.
363
+ Neither arguments nor form values/credentials are copied into the receipt.
364
+ A successful status query does not imply business completion. Accepted input must
365
+ be inspected with the original invocation; never replay a write to obtain a result.
@@ -60,28 +60,21 @@ An already absent and cleaned definition is a completed delete target.
60
60
  completed before the stop request keeps its actual outcome; ordinary success
61
61
  may already have discarded its details. Already performed effects are not undone.
62
62
  A started external call without a result is uncertain, not a confirmed failure.
63
- - `/app/automation/diagnostic/get` takes `{automationId, cursor?, limit?}` and returns
64
- `{diagnostics, nextCursor}`. The default page size is 50, with a maximum of 100.
65
- Follow `nextCursor` until absent.
66
- Cursors are opaque and bound to the authorized Space and Automation. Metadata
67
- is ordered by frozen completion time (capture time while active), then thread and
68
- raw instance identity, all newest first. Each thread exposes its latest 10 retained
69
- terminal instances across revisions. Failed/interrupted, DEBUG and explicitly
70
- stopped/captured executions share this quota; ordinary successful
71
- runs create no run-history event and retain no completed execution detail; their
72
- checkpoint objects are reclaimed asynchronously. Last-run state remains separate.
73
- Active captures are additional. `availableAt` records first terminal publication;
74
- there is no `expiresAt` or age expiry. Reads/retries and richer updates never refresh
75
- terminal order. Internal storage may buffer about 20 records before batch trimming
76
- to 10; periodic cleanup handles lower volume and failed object deletion. Buffered
77
- older terminal records are unavailable through both list and direct-read APIs.
78
- Active and pending-publication bytes are protected until settlement/acknowledgement.
79
- - `/app/automation/diagnostic/read` takes the execution identity and optional
80
- `cursor`, and returns `{logs, nextCursor}`. Follow the opaque cursor for older
81
- events. Pages contain up to 100 events with a target size of 256 KiB; a single
82
- larger event is returned intact. Pagination never removes stored content.
83
- Missing or damaged bodies produce an error; they are never represented as an
84
- empty successful page.
63
+ - `/app/automation/diagnostic/get` takes only `{automationId}` and returns
64
+ `{diagnostics}`. Every retained execution record includes its complete `logs`
65
+ array. Records and logs are newest first; there is no public cursor, limit,
66
+ separate metadata listing or per-instance log request. The backend consumes
67
+ internal journal pages without removing events or truncating their contents.
68
+ Each thread exposes its latest 10 retained terminal instances across revisions.
69
+ Failed/interrupted, DEBUG and explicitly stopped/captured executions share this
70
+ quota; ordinary successful runs retain no completed execution detail. Active
71
+ captures are additional. Retention has no age expiry and is unchanged by reads.
72
+ Internal storage may buffer about 20 records before trimming to 10; buffered
73
+ older records remain unavailable. Deleting the Automation removes its evidence.
74
+ Missing or damaged log bodies set that record's `logsMissing` to true and yield
75
+ a `partial` Facade outcome with `DIAGNOSTIC_LOGS_UNAVAILABLE` warnings. Metadata,
76
+ other instances and all successfully read log events remain available. An empty
77
+ retained record list is a successful `{diagnostics: []}` response.
85
78
 
86
79
  Events contain `sequence`, `timestamp`, `kind`, `operationId`, `level`, `message`
87
80
  and `details`. Ordinary events describe actual action/read requests, their results,
@@ -344,7 +344,7 @@
344
344
  "timestamp": 100,
345
345
  "status": "FAILED",
346
346
  "reportMode": "STD",
347
- "logCount": 2,
347
+ "logCount": 1,
348
348
  "logsMissing": false,
349
349
  "failure": {
350
350
  "message": "device unavailable",
@@ -354,10 +354,23 @@
354
354
  "startedAt": 90,
355
355
  "finishedAt": 100,
356
356
  "captured": false,
357
- "availableAt": 100
357
+ "availableAt": 100,
358
+ "logs": [
359
+ {
360
+ "sequence": 1,
361
+ "kind": "wait.started",
362
+ "operationId": "visit-1",
363
+ "level": "INFO",
364
+ "message": "Waiting",
365
+ "timestamp": 100,
366
+ "details": {
367
+ "dueAt": 1200100,
368
+ "taskId": 3
369
+ }
370
+ }
371
+ ]
358
372
  }
359
- ],
360
- "nextCursor": null
373
+ ]
361
374
  },
362
375
  "essential": {
363
376
  "diagnostics": [
@@ -369,7 +382,7 @@
369
382
  "timestamp": "1970-01-01 00:00:00.100 +00:00 (UTC)",
370
383
  "status": "FAILED",
371
384
  "reportMode": "STD",
372
- "logCount": 2,
385
+ "logCount": 1,
373
386
  "logsMissing": false,
374
387
  "failure": {
375
388
  "message": "device unavailable",
@@ -379,10 +392,23 @@
379
392
  "startedAt": "1970-01-01 00:00:00.090 +00:00 (UTC)",
380
393
  "finishedAt": "1970-01-01 00:00:00.100 +00:00 (UTC)",
381
394
  "captured": false,
382
- "availableAt": "1970-01-01 00:00:00.100 +00:00 (UTC)"
395
+ "availableAt": "1970-01-01 00:00:00.100 +00:00 (UTC)",
396
+ "logs": [
397
+ {
398
+ "sequence": 1,
399
+ "kind": "wait.started",
400
+ "operationId": "visit-1",
401
+ "level": "INFO",
402
+ "message": "Waiting",
403
+ "timestamp": "1970-01-01 00:00:00.100 +00:00 (UTC)",
404
+ "details": {
405
+ "dueAt": "1970-01-01 00:20:00.100 +00:00 (UTC)",
406
+ "taskId": 3
407
+ }
408
+ }
409
+ ]
383
410
  }
384
- ],
385
- "nextCursor": null
411
+ ]
386
412
  }
387
413
  },
388
414
  {
@@ -5021,69 +5047,110 @@
5021
5047
  "code": "OPERATION_FAILED"
5022
5048
  },
5023
5049
  {
5024
- "name": "automation-diagnostic-read",
5025
- "target": "/app/automation/diagnostic/read",
5050
+ "name": "automation-instance-list",
5051
+ "target": "/app/automation/instance/list",
5026
5052
  "timezone": "Asia/Shanghai",
5027
5053
  "status": "success",
5028
5054
  "data": {
5029
- "logs": [
5055
+ "instances": [
5030
5056
  {
5031
- "sequence": 1,
5032
- "kind": "wait.started",
5033
- "operationId": "visit-1",
5034
- "level": "INFO",
5035
- "message": "Waiting",
5036
- "timestamp": 100,
5037
- "details": {
5038
- "dueAt": 1200100,
5039
- "taskId": 3
5040
- }
5057
+ "threadId": 0,
5058
+ "instanceId": "run",
5059
+ "revision": 3,
5060
+ "phase": "STOPPING",
5061
+ "startedAt": 100
5041
5062
  }
5042
- ],
5043
- "nextCursor": "opaque"
5063
+ ]
5044
5064
  },
5045
5065
  "essential": {
5046
- "logs": [
5047
- {
5048
- "sequence": 1,
5049
- "kind": "wait.started",
5050
- "operationId": "visit-1",
5051
- "level": "INFO",
5052
- "message": "Waiting",
5053
- "timestamp": "1970-01-01 08:00:00.100 +08:00 (Asia/Shanghai)",
5054
- "details": {
5055
- "dueAt": "1970-01-01 08:20:00.100 +08:00 (Asia/Shanghai)",
5056
- "taskId": 3
5057
- }
5066
+ "instances": [
5067
+ {
5068
+ "threadId": 0,
5069
+ "instanceId": "run",
5070
+ "revision": 3,
5071
+ "phase": "STOPPING",
5072
+ "startedAt": "1970-01-01 08:00:00.100 +08:00 (Asia/Shanghai)"
5058
5073
  }
5059
- ],
5060
- "nextCursor": "opaque"
5074
+ ]
5061
5075
  }
5062
5076
  },
5063
5077
  {
5064
- "name": "automation-instance-list",
5065
- "target": "/app/automation/instance/list",
5066
- "timezone": "Asia/Shanghai",
5067
- "status": "success",
5078
+ "name": "automation-diagnostic-get-missing-logs",
5079
+ "target": "/app/automation/diagnostic/get",
5080
+ "status": "partial",
5068
5081
  "data": {
5069
- "instances": [
5082
+ "diagnostics": [
5070
5083
  {
5084
+ "automationId": "a1",
5085
+ "name": "Morning",
5071
5086
  "threadId": 0,
5072
5087
  "instanceId": "run",
5088
+ "timestamp": 100,
5089
+ "status": "FAILED",
5090
+ "reportMode": "STD",
5091
+ "logCount": 1,
5092
+ "logsMissing": true,
5093
+ "failure": {
5094
+ "message": "device unavailable",
5095
+ "code": "TIMEOUT"
5096
+ },
5073
5097
  "revision": 3,
5074
- "phase": "STOPPING",
5075
- "startedAt": 100
5098
+ "startedAt": 90,
5099
+ "finishedAt": 100,
5100
+ "captured": false,
5101
+ "availableAt": 100,
5102
+ "logs": [
5103
+ {
5104
+ "sequence": 1,
5105
+ "kind": "wait.started",
5106
+ "operationId": "visit-1",
5107
+ "level": "INFO",
5108
+ "message": "Waiting",
5109
+ "timestamp": 100,
5110
+ "details": {
5111
+ "dueAt": 1200100,
5112
+ "taskId": 3
5113
+ }
5114
+ }
5115
+ ]
5076
5116
  }
5077
5117
  ]
5078
5118
  },
5079
5119
  "essential": {
5080
- "instances": [
5120
+ "diagnostics": [
5081
5121
  {
5122
+ "automationId": "a1",
5123
+ "name": "Morning",
5082
5124
  "threadId": 0,
5083
5125
  "instanceId": "run",
5126
+ "timestamp": "1970-01-01 00:00:00.100 +00:00 (UTC)",
5127
+ "status": "FAILED",
5128
+ "reportMode": "STD",
5129
+ "logCount": 1,
5130
+ "logsMissing": true,
5131
+ "failure": {
5132
+ "message": "device unavailable",
5133
+ "code": "TIMEOUT"
5134
+ },
5084
5135
  "revision": 3,
5085
- "phase": "STOPPING",
5086
- "startedAt": "1970-01-01 08:00:00.100 +08:00 (Asia/Shanghai)"
5136
+ "startedAt": "1970-01-01 00:00:00.090 +00:00 (UTC)",
5137
+ "finishedAt": "1970-01-01 00:00:00.100 +00:00 (UTC)",
5138
+ "captured": false,
5139
+ "availableAt": "1970-01-01 00:00:00.100 +00:00 (UTC)",
5140
+ "logs": [
5141
+ {
5142
+ "sequence": 1,
5143
+ "kind": "wait.started",
5144
+ "operationId": "visit-1",
5145
+ "level": "INFO",
5146
+ "message": "Waiting",
5147
+ "timestamp": "1970-01-01 00:00:00.100 +00:00 (UTC)",
5148
+ "details": {
5149
+ "dueAt": "1970-01-01 00:20:00.100 +00:00 (UTC)",
5150
+ "taskId": 3
5151
+ }
5152
+ }
5153
+ ]
5087
5154
  }
5088
5155
  ]
5089
5156
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.v1",
3
- "contractVersion": "1.166.0",
3
+ "contractVersion": "1.168.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",
@@ -398,7 +398,6 @@
398
398
  "/app/automation/instance/stop",
399
399
  "/app/automation/instance/list",
400
400
  "/app/automation/diagnostic/get",
401
- "/app/automation/diagnostic/read",
402
401
  "/app/automation/rename",
403
402
  "/app/automation/description/update"
404
403
  ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractVersion": "1.166.0",
2
+ "contractVersion": "1.168.0",
3
3
  "operations": {
4
4
  "/app/agent/context/get": "spaceRead",
5
5
  "/app/agent/conversation/get": "spaceRead",
@@ -39,7 +39,6 @@
39
39
  "/app/automation/description/update": "spaceWrite",
40
40
  "/app/automation/detail/get": "spaceRead",
41
41
  "/app/automation/diagnostic/get": "spaceRead",
42
- "/app/automation/diagnostic/read": "spaceRead",
43
42
  "/app/automation/instance/stop": "spaceWrite",
44
43
  "/app/automation/instance/list": "spaceRead",
45
44
  "/app/automation/list": "spaceRead",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.host-provision.targets.v1",
3
- "contractVersion": "1.166.0",
3
+ "contractVersion": "1.168.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.166.0",
3
+ "contractVersion": "1.168.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.166.0",
3
+ "contractVersion": "1.168.0",
4
4
  "contract": "contract/pod-commissioning-v1.md",
5
5
  "localTargets": [
6
6
  "/local/pod/discovery/start",
@@ -47,13 +47,14 @@
47
47
  ]
48
48
  },
49
49
  "/app/automation/instance/list": { "ms": ["instances.*.startedAt"] },
50
- "/app/automation/diagnostic/read": { "ms": ["logs.*.timestamp", "logs.*.details.dueAt"] },
51
50
  "/app/automation/diagnostic/get": {
52
51
  "ms": [
53
52
  "diagnostics.*.timestamp",
54
53
  "diagnostics.*.startedAt",
55
54
  "diagnostics.*.finishedAt",
56
- "diagnostics.*.availableAt"
55
+ "diagnostics.*.availableAt",
56
+ "diagnostics.*.logs.*.timestamp",
57
+ "diagnostics.*.logs.*.details.dueAt"
57
58
  ]
58
59
  },
59
60
  "/app/group/list": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.app-facade.routing.v1",
3
- "contractVersion": "1.166.0",
3
+ "contractVersion": "1.168.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.166.0",
3
+ "contractVersion": "1.168.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.166.0",
3
+ "version": "1.168.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.166.0",
3
+ "contractVersion": "1.168.0",
4
4
  "manifest": "manifest/app-facade.v1.json",
5
5
  "schemas": {
6
6
  "dashboardCardAuthoring": "schema/dashboard-card-authoring.v1.schema.json",