@mhome/conversation-protocol 4.4.0 → 5.2.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.
package/README.md CHANGED
@@ -196,3 +196,14 @@ returns an Artifact reference or text-only reason. Media steps retain the same
196
196
  owner. Upload grants and download descriptors reuse the Artifact contract,
197
197
  including pinned host identity when the owner is a local Core. Resolve responses
198
198
  include the content digest and require signed URLs, never data URLs.
199
+
200
+ `execution::tool_result_text` renders canonical tool outcomes for model and text interfaces.
201
+ Callers supply the known `ResponseDetail`; the renderer preserves Full JSON and exposes
202
+ Essential YAML with partial outcomes, warnings and late error observations intact.
203
+ It does not change the stored result or choose domain business fields.
204
+
205
+ `execution::essential_yaml` is the common Essential serializer: it omits
206
+ null-valued object fields recursively while preserving array positions, root null,
207
+ empty collections, false, zero and all string content. App Facade projections,
208
+ Agent workflow results and provider-visible diagnostics use the same rule; Full
209
+ business values and persisted execution state are unchanged.
@@ -47,10 +47,9 @@
47
47
  }
48
48
  },
49
49
  {
50
- "name": "success empty text",
50
+ "name": "success empty string data",
51
51
  "value": {
52
52
  "status": "success",
53
- "text": "",
54
53
  "warnings": [
55
54
  {
56
55
  "code": "STALE",
@@ -59,14 +58,14 @@
59
58
  "source": "cloud"
60
59
  }
61
60
  }
62
- ]
61
+ ],
62
+ "data": ""
63
63
  }
64
64
  },
65
65
  {
66
- "name": "success YAML text",
66
+ "name": "success YAML string data",
67
67
  "value": {
68
68
  "status": "success",
69
- "text": "ids:\n- a\n",
70
69
  "warnings": [
71
70
  {
72
71
  "code": "STALE",
@@ -75,7 +74,8 @@
75
74
  "source": "cloud"
76
75
  }
77
76
  }
78
- ]
77
+ ],
78
+ "data": "ids:\n- a\n"
79
79
  }
80
80
  },
81
81
  {
@@ -137,10 +137,9 @@
137
137
  }
138
138
  },
139
139
  {
140
- "name": "partial empty text",
140
+ "name": "partial empty string data",
141
141
  "value": {
142
142
  "status": "partial",
143
- "text": "",
144
143
  "warnings": [
145
144
  {
146
145
  "code": "STALE",
@@ -149,14 +148,14 @@
149
148
  "source": "cloud"
150
149
  }
151
150
  }
152
- ]
151
+ ],
152
+ "data": ""
153
153
  }
154
154
  },
155
155
  {
156
- "name": "partial YAML text",
156
+ "name": "partial YAML string data",
157
157
  "value": {
158
158
  "status": "partial",
159
- "text": "ids:\n- a\n",
160
159
  "warnings": [
161
160
  {
162
161
  "code": "STALE",
@@ -165,7 +164,8 @@
165
164
  "source": "cloud"
166
165
  }
167
166
  }
168
- ]
167
+ ],
168
+ "data": "ids:\n- a\n"
169
169
  }
170
170
  },
171
171
  {
@@ -253,15 +253,38 @@
253
253
  "status": "cancelled",
254
254
  "warnings": []
255
255
  }
256
- }
257
- ],
258
- "invalid": [
256
+ },
259
257
  {
260
- "name": "success no content",
258
+ "name": "success acknowledgement",
261
259
  "value": {
262
260
  "status": "success"
263
261
  }
264
262
  },
263
+ {
264
+ "name": "success acknowledgement warnings",
265
+ "value": {
266
+ "status": "success",
267
+ "warnings": [
268
+ {
269
+ "code": "SYNC_PENDING",
270
+ "message": "Saved"
271
+ }
272
+ ]
273
+ }
274
+ },
275
+ {
276
+ "name": "essential error diagnostic data",
277
+ "value": {
278
+ "status": "error",
279
+ "error": {
280
+ "code": "BAD_REQUEST",
281
+ "message": "Invalid description"
282
+ },
283
+ "data": "status: error\nerror:\n code: BAD_REQUEST\n message: Invalid description\n"
284
+ }
285
+ }
286
+ ],
287
+ "invalid": [
265
288
  {
266
289
  "name": "success both contents",
267
290
  "value": {
@@ -544,6 +567,42 @@
544
567
  {
545
568
  "name": "null response",
546
569
  "value": null
570
+ },
571
+ {
572
+ "name": "success legacy text",
573
+ "value": {
574
+ "status": "success",
575
+ "text": "ids: []"
576
+ }
577
+ },
578
+ {
579
+ "name": "partial legacy text",
580
+ "value": {
581
+ "status": "partial",
582
+ "text": "ids: []"
583
+ }
584
+ },
585
+ {
586
+ "name": "error nonstring data",
587
+ "value": {
588
+ "status": "error",
589
+ "error": {
590
+ "code": "BAD_REQUEST",
591
+ "message": "Invalid"
592
+ },
593
+ "data": {}
594
+ }
595
+ },
596
+ {
597
+ "name": "error legacy text",
598
+ "value": {
599
+ "status": "error",
600
+ "error": {
601
+ "code": "BAD_REQUEST",
602
+ "message": "Invalid"
603
+ },
604
+ "text": "legacy"
605
+ }
547
606
  }
548
607
  ]
549
608
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": "mhome.conversation.targets.v1",
3
- "contractVersion": "4.4.0",
3
+ "contractVersion": "5.2.1",
4
4
  "requestTargets": [
5
5
  "/chat/control/get",
6
6
  "/chat/thread/list",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/conversation-protocol",
3
- "version": "4.4.0",
3
+ "version": "5.2.1",
4
4
  "description": "Build-time protocol artifacts for mhome.conversation",
5
5
  "license": "MIT",
6
6
  "repository": {
package/protocol.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "protocol": "mhome.conversation",
3
- "contractVersion": "4.4.0",
3
+ "contractVersion": "5.2.1",
4
4
  "manifest": "manifest/targets.v1.json",
5
5
  "schemas": {
6
6
  "frame": "schema/conversation-frame.v2.schema.json",
@@ -2129,74 +2129,33 @@
2129
2129
  "const": "success"
2130
2130
  },
2131
2131
  "data": true,
2132
- "text": {
2133
- "type": "string"
2134
- },
2135
2132
  "warnings": {
2136
2133
  "type": "array",
2137
2134
  "items": {
2138
2135
  "$ref": "#/$defs/facade_response/$defs/problem"
2139
2136
  }
2140
2137
  }
2141
- },
2142
- "oneOf": [
2143
- {
2144
- "required": [
2145
- "data"
2146
- ],
2147
- "properties": {
2148
- "data": true
2149
- }
2150
- },
2151
- {
2152
- "required": [
2153
- "text"
2154
- ],
2155
- "properties": {
2156
- "text": true
2157
- }
2158
- }
2159
- ]
2138
+ }
2160
2139
  },
2161
2140
  {
2162
2141
  "type": "object",
2163
2142
  "additionalProperties": false,
2164
2143
  "required": [
2165
- "status"
2144
+ "status",
2145
+ "data"
2166
2146
  ],
2167
2147
  "properties": {
2168
2148
  "status": {
2169
2149
  "const": "partial"
2170
2150
  },
2171
2151
  "data": true,
2172
- "text": {
2173
- "type": "string"
2174
- },
2175
2152
  "warnings": {
2176
2153
  "type": "array",
2177
2154
  "items": {
2178
2155
  "$ref": "#/$defs/facade_response/$defs/problem"
2179
2156
  }
2180
2157
  }
2181
- },
2182
- "oneOf": [
2183
- {
2184
- "required": [
2185
- "data"
2186
- ],
2187
- "properties": {
2188
- "data": true
2189
- }
2190
- },
2191
- {
2192
- "required": [
2193
- "text"
2194
- ],
2195
- "properties": {
2196
- "text": true
2197
- }
2198
- }
2199
- ]
2158
+ }
2200
2159
  },
2201
2160
  {
2202
2161
  "type": "object",
@@ -2211,6 +2170,9 @@
2211
2170
  },
2212
2171
  "error": {
2213
2172
  "$ref": "#/$defs/facade_response/$defs/problem"
2173
+ },
2174
+ "data": {
2175
+ "type": "string"
2214
2176
  }
2215
2177
  }
2216
2178
  },