@mhome/conversation-protocol 4.3.0 → 4.4.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 +15 -1
- package/fixtures/operation-report.interaction-answer.request.json +28 -0
- package/fixtures/operation-report.interaction.request.json +27 -0
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +1 -1
- package/schema/conversation-frame.v2.schema.json +50 -0
- package/schema/execution/envelope.v1.schema.json +50 -0
package/README.md
CHANGED
|
@@ -55,11 +55,25 @@ data. The UI operates on that exact session. A status check returns its actual r
|
|
|
55
55
|
only a new tool call can request further human interaction. Prepared approvals retain their
|
|
56
56
|
business prepare/commit contract. Card state and responses are separate from model history.
|
|
57
57
|
|
|
58
|
+
A UserAction response may carry optional `clientReport` beside `actionId` and
|
|
59
|
+
`response`: `{ "warnings": [{ "code": "SYNC_PENDING", "message": "Sync pending" }] }`.
|
|
60
|
+
It is allowed with continue or cancel, never approve/reject. Warning code/message
|
|
61
|
+
must be nonblank, the list nonempty, and unknown report fields are rejected. No
|
|
62
|
+
report is required when the Operation observed no warning. This contains only
|
|
63
|
+
public client observations during the Operation; it is not proof of completion.
|
|
64
|
+
Business handlers still validate the input or read authoritative state. Runtime
|
|
65
|
+
adds the report to the final result only after execution: a framework-owned
|
|
66
|
+
`CLIENT_OPERATION_REPORT` warning on success/partial/cancelled, or
|
|
67
|
+
`error.details.clientReport` on error. The source is `frontend_operation` with
|
|
68
|
+
`verified: false`; neither status nor business data is overwritten. Reports are
|
|
69
|
+
private answer data until included, explicitly attributed, in the tool result.
|
|
70
|
+
|
|
58
71
|
The Conversation backend accepts a nonempty subset of distinct known item answers, persists
|
|
59
72
|
partial responses privately with their responder identities, and resumes Runtime only after
|
|
60
73
|
all items are answered. Public `PendingInteraction.answeredActionIds` is required and carries
|
|
61
74
|
only progress. Clients show the first unanswered item and advance after canonical acknowledgement.
|
|
62
|
-
Identical retries by the same responder are idempotent; accepted answers
|
|
75
|
+
Identical retries by the same responder are idempotent; accepted answers, including
|
|
76
|
+
their client reports, cannot be edited.
|
|
63
77
|
Runtime's execution command still carries the complete batch. User actions may open a shared
|
|
64
78
|
frontend Operation that performs its business writes before returning a safe result. The
|
|
65
79
|
saved handler validates or reads that result rather than repeating the write.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/chat/interaction/answer",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"requestId": "request-1",
|
|
6
|
+
"batchId": "batch-1",
|
|
7
|
+
"occurredAtUnixMs": 1787587200000,
|
|
8
|
+
"responses": [
|
|
9
|
+
{
|
|
10
|
+
"actionId": "action-1",
|
|
11
|
+
"response": {
|
|
12
|
+
"action": "continue",
|
|
13
|
+
"data": {
|
|
14
|
+
"spaceId": "space-demo"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"clientReport": {
|
|
18
|
+
"warnings": [
|
|
19
|
+
{
|
|
20
|
+
"code": "SYNC_PENDING",
|
|
21
|
+
"message": "Saved; synchronization is pending"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/chat/interaction/submit",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"threadId": "thread-2",
|
|
6
|
+
"batchId": "batch-1",
|
|
7
|
+
"responses": [
|
|
8
|
+
{
|
|
9
|
+
"actionId": "action-1",
|
|
10
|
+
"response": {
|
|
11
|
+
"action": "continue",
|
|
12
|
+
"data": {
|
|
13
|
+
"spaceId": "space-demo"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"clientReport": {
|
|
17
|
+
"warnings": [
|
|
18
|
+
{
|
|
19
|
+
"code": "SYNC_PENDING",
|
|
20
|
+
"message": "Saved; synchronization is pending"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
}
|
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -3059,6 +3059,56 @@
|
|
|
3059
3059
|
}
|
|
3060
3060
|
}
|
|
3061
3061
|
]
|
|
3062
|
+
},
|
|
3063
|
+
"clientReport": {
|
|
3064
|
+
"type": "object",
|
|
3065
|
+
"additionalProperties": false,
|
|
3066
|
+
"required": [
|
|
3067
|
+
"warnings"
|
|
3068
|
+
],
|
|
3069
|
+
"properties": {
|
|
3070
|
+
"warnings": {
|
|
3071
|
+
"type": "array",
|
|
3072
|
+
"minItems": 1,
|
|
3073
|
+
"items": {
|
|
3074
|
+
"type": "object",
|
|
3075
|
+
"additionalProperties": false,
|
|
3076
|
+
"required": [
|
|
3077
|
+
"code",
|
|
3078
|
+
"message"
|
|
3079
|
+
],
|
|
3080
|
+
"properties": {
|
|
3081
|
+
"code": {
|
|
3082
|
+
"type": "string",
|
|
3083
|
+
"minLength": 1,
|
|
3084
|
+
"pattern": "\\S"
|
|
3085
|
+
},
|
|
3086
|
+
"message": {
|
|
3087
|
+
"type": "string",
|
|
3088
|
+
"minLength": 1,
|
|
3089
|
+
"pattern": "\\S"
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
},
|
|
3097
|
+
"dependentSchemas": {
|
|
3098
|
+
"clientReport": {
|
|
3099
|
+
"properties": {
|
|
3100
|
+
"response": {
|
|
3101
|
+
"type": "object",
|
|
3102
|
+
"properties": {
|
|
3103
|
+
"action": {
|
|
3104
|
+
"enum": [
|
|
3105
|
+
"continue",
|
|
3106
|
+
"cancel"
|
|
3107
|
+
]
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3062
3112
|
}
|
|
3063
3113
|
}
|
|
3064
3114
|
}
|
|
@@ -2062,6 +2062,56 @@
|
|
|
2062
2062
|
}
|
|
2063
2063
|
}
|
|
2064
2064
|
]
|
|
2065
|
+
},
|
|
2066
|
+
"clientReport": {
|
|
2067
|
+
"type": "object",
|
|
2068
|
+
"additionalProperties": false,
|
|
2069
|
+
"required": [
|
|
2070
|
+
"warnings"
|
|
2071
|
+
],
|
|
2072
|
+
"properties": {
|
|
2073
|
+
"warnings": {
|
|
2074
|
+
"type": "array",
|
|
2075
|
+
"minItems": 1,
|
|
2076
|
+
"items": {
|
|
2077
|
+
"type": "object",
|
|
2078
|
+
"additionalProperties": false,
|
|
2079
|
+
"required": [
|
|
2080
|
+
"code",
|
|
2081
|
+
"message"
|
|
2082
|
+
],
|
|
2083
|
+
"properties": {
|
|
2084
|
+
"code": {
|
|
2085
|
+
"type": "string",
|
|
2086
|
+
"minLength": 1,
|
|
2087
|
+
"pattern": "\\S"
|
|
2088
|
+
},
|
|
2089
|
+
"message": {
|
|
2090
|
+
"type": "string",
|
|
2091
|
+
"minLength": 1,
|
|
2092
|
+
"pattern": "\\S"
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
},
|
|
2100
|
+
"dependentSchemas": {
|
|
2101
|
+
"clientReport": {
|
|
2102
|
+
"properties": {
|
|
2103
|
+
"response": {
|
|
2104
|
+
"type": "object",
|
|
2105
|
+
"properties": {
|
|
2106
|
+
"action": {
|
|
2107
|
+
"enum": [
|
|
2108
|
+
"continue",
|
|
2109
|
+
"cancel"
|
|
2110
|
+
]
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2065
2115
|
}
|
|
2066
2116
|
}
|
|
2067
2117
|
},
|