@mhome/conversation-protocol 1.1.1 → 1.3.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 +10 -0
- package/fixtures/admission.event.json +17 -0
- package/fixtures/execution/admission.v1.json +37 -0
- package/fixtures/execution/app-facade-prepare.v1.json +43 -0
- package/fixtures/execution/app-facade-prepared.v1.json +53 -0
- package/fixtures/execution/app-facade-user-action.v1.json +54 -0
- package/fixtures/execution/checkpoint-purge-ack.v1.json +23 -0
- package/fixtures/execution/checkpoint-purge.v1.json +26 -0
- package/fixtures/execution/completed-event.v1.json +62 -0
- package/fixtures/execution/enqueue.v1.json +213 -0
- package/fixtures/execution/event-ack.v1.json +24 -0
- package/fixtures/execution/failed-event.v1.json +61 -0
- package/fixtures/execution/interaction-required-event.v1.json +73 -0
- package/fixtures/execution/observation.v1.json +39 -0
- package/fixtures/request-cancel-waiting.request.json +7 -0
- package/fixtures/request-cancel-waiting.response.json +10 -0
- package/fixtures/turn-submit-waiting.response.json +13 -0
- package/manifest/targets.v1.json +1 -1
- package/package.json +1 -1
- package/protocol.json +3 -2
- package/schema/conversation-frame.v2.schema.json +126 -12
- package/schema/execution/envelope.v1.schema.json +1846 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"version": 1,
|
|
4
|
+
"message_id": "message-2",
|
|
5
|
+
"correlation_id": "correlation-1",
|
|
6
|
+
"causation_id": "message-1",
|
|
7
|
+
"sent_at_unix_ms": 1700000001000,
|
|
8
|
+
"dispatch": {
|
|
9
|
+
"dispatch_id": "dispatch-1",
|
|
10
|
+
"agent_session_id": "agent-session-1"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"payload": {
|
|
14
|
+
"family": "event",
|
|
15
|
+
"payload": {
|
|
16
|
+
"event": {
|
|
17
|
+
"id": "event-1",
|
|
18
|
+
"sequence": 2,
|
|
19
|
+
"context": {
|
|
20
|
+
"scope": { "tenant_id": "tenant-1", "scope_id": "scope-1" },
|
|
21
|
+
"actor": { "user_id": "user-1", "client_id": "client-1" },
|
|
22
|
+
"thread_id": "thread-1",
|
|
23
|
+
"run_id": "run-1",
|
|
24
|
+
"operation_id": "operation-1",
|
|
25
|
+
"deadline_unix_ms": null,
|
|
26
|
+
"traceparent": null,
|
|
27
|
+
"surface_id": "cs1:cp:dXNlci0x"
|
|
28
|
+
},
|
|
29
|
+
"event": {
|
|
30
|
+
"type": "interaction_required",
|
|
31
|
+
"batch_id": "batch-1",
|
|
32
|
+
"actions": [
|
|
33
|
+
{
|
|
34
|
+
"action_id": "action-1",
|
|
35
|
+
"operation_id": "operation-1",
|
|
36
|
+
"preview": {
|
|
37
|
+
"actionCode": "dashboard.canvas.delete",
|
|
38
|
+
"title": "Delete canvas",
|
|
39
|
+
"message": "Delete this canvas?",
|
|
40
|
+
"tone": "danger",
|
|
41
|
+
"details": [],
|
|
42
|
+
"proceedLabel": "Delete",
|
|
43
|
+
"rejectLabel": "Cancel"
|
|
44
|
+
},
|
|
45
|
+
"payload": { "canvasId": "canvas-1" },
|
|
46
|
+
"revision": 1,
|
|
47
|
+
"approval": "when_interactive",
|
|
48
|
+
"interaction_kind": "approval"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"usage": {
|
|
52
|
+
"model_requests": 2,
|
|
53
|
+
"reported_model_requests": 2,
|
|
54
|
+
"input_tokens": 30,
|
|
55
|
+
"output_tokens": 6,
|
|
56
|
+
"cached_input_tokens": null,
|
|
57
|
+
"reasoning_output_tokens": null,
|
|
58
|
+
"peak_input_tokens": 20,
|
|
59
|
+
"credits": 3,
|
|
60
|
+
"tool_calls": 1,
|
|
61
|
+
"window_truncations": 0,
|
|
62
|
+
"trimmed_messages": 0
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"checkpoint": {
|
|
67
|
+
"object_key": "checkpoints/abc.json",
|
|
68
|
+
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
69
|
+
"format_version": 1
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"version": 1,
|
|
4
|
+
"message_id": "message-4",
|
|
5
|
+
"correlation_id": "correlation-1",
|
|
6
|
+
"causation_id": "message-1",
|
|
7
|
+
"sent_at_unix_ms": 1700000000250,
|
|
8
|
+
"dispatch": {
|
|
9
|
+
"dispatch_id": "dispatch-1",
|
|
10
|
+
"agent_session_id": "agent-session-1"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"payload": {
|
|
14
|
+
"family": "observation",
|
|
15
|
+
"payload": {
|
|
16
|
+
"context": {
|
|
17
|
+
"scope": {
|
|
18
|
+
"tenant_id": "tenant-1",
|
|
19
|
+
"scope_id": "scope-1"
|
|
20
|
+
},
|
|
21
|
+
"actor": {
|
|
22
|
+
"user_id": "user-1",
|
|
23
|
+
"client_id": "client-1"
|
|
24
|
+
},
|
|
25
|
+
"thread_id": "thread-1",
|
|
26
|
+
"run_id": "run-1",
|
|
27
|
+
"operation_id": "operation-1",
|
|
28
|
+
"deadline_unix_ms": null,
|
|
29
|
+
"traceparent": null,
|
|
30
|
+
"surface_id": "cs1:cp:dXNlci0x"
|
|
31
|
+
},
|
|
32
|
+
"observation": {
|
|
33
|
+
"type": "companion_text",
|
|
34
|
+
"content": "I will check that now.",
|
|
35
|
+
"append": false
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/manifest/targets.v1.json
CHANGED
package/package.json
CHANGED
package/protocol.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"protocol": "mhome.conversation",
|
|
3
|
-
"contractVersion": "1.
|
|
3
|
+
"contractVersion": "1.3.0",
|
|
4
4
|
"manifest": "manifest/targets.v1.json",
|
|
5
5
|
"schemas": {
|
|
6
|
-
"frame": "schema/conversation-frame.v2.schema.json"
|
|
6
|
+
"frame": "schema/conversation-frame.v2.schema.json",
|
|
7
|
+
"execution": "schema/execution/envelope.v1.schema.json"
|
|
7
8
|
},
|
|
8
9
|
"fixtures": {
|
|
9
10
|
"valid": "fixtures"
|
|
@@ -10,12 +10,83 @@
|
|
|
10
10
|
},
|
|
11
11
|
"surfaceId": {
|
|
12
12
|
"type": "string",
|
|
13
|
-
"pattern": "^cs1:(?:(?:cp|cg):[A-Za-z0-9_-]+|(?:mp|mg):[a-z][a-z0-9_]*:[A-Za-z0-9_-]+:[A-Za-z0-9_-]+(?::[A-Za-z0-9_-]+)?)$"
|
|
13
|
+
"pattern": "^cs1:(?:(?:cp|cg):[A-Za-z0-9_-]+|n:[a-z][a-z0-9_]*:[A-Za-z0-9_-]+:[A-Za-z0-9_-]+:[A-Za-z0-9_-]+|(?:mp|mg):[a-z][a-z0-9_]*:[A-Za-z0-9_-]+:[A-Za-z0-9_-]+(?::[A-Za-z0-9_-]+)?)$"
|
|
14
14
|
},
|
|
15
15
|
"time": {
|
|
16
16
|
"type": "string",
|
|
17
17
|
"format": "date-time"
|
|
18
18
|
},
|
|
19
|
+
"requestAdmission": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": [
|
|
23
|
+
"state",
|
|
24
|
+
"admissionVersion"
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"state": {
|
|
28
|
+
"enum": [
|
|
29
|
+
"waiting_handoff",
|
|
30
|
+
"bound",
|
|
31
|
+
"cancelled",
|
|
32
|
+
"failed"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"admissionVersion": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 0
|
|
38
|
+
},
|
|
39
|
+
"reason": {
|
|
40
|
+
"enum": [
|
|
41
|
+
"mode_handoff",
|
|
42
|
+
"waiting_for_prior_turn",
|
|
43
|
+
"accepted",
|
|
44
|
+
"cancelled",
|
|
45
|
+
"handoff_failed"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"threadId": {
|
|
49
|
+
"$ref": "#/$defs/id"
|
|
50
|
+
},
|
|
51
|
+
"queueVersion": {
|
|
52
|
+
"type": "integer",
|
|
53
|
+
"minimum": 0
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"requestAdmissionData": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": [
|
|
61
|
+
"state"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"state": {
|
|
65
|
+
"enum": [
|
|
66
|
+
"waiting_handoff",
|
|
67
|
+
"bound",
|
|
68
|
+
"cancelled",
|
|
69
|
+
"failed"
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"reason": {
|
|
73
|
+
"enum": [
|
|
74
|
+
"mode_handoff",
|
|
75
|
+
"waiting_for_prior_turn",
|
|
76
|
+
"accepted",
|
|
77
|
+
"cancelled",
|
|
78
|
+
"handoff_failed"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"threadId": {
|
|
82
|
+
"$ref": "#/$defs/id"
|
|
83
|
+
},
|
|
84
|
+
"queueVersion": {
|
|
85
|
+
"type": "integer",
|
|
86
|
+
"minimum": 0
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
19
90
|
"previewValue": {
|
|
20
91
|
"oneOf": [
|
|
21
92
|
{
|
|
@@ -1331,6 +1402,39 @@
|
|
|
1331
1402
|
}
|
|
1332
1403
|
}
|
|
1333
1404
|
},
|
|
1405
|
+
"admissionEvent": {
|
|
1406
|
+
"type": "object",
|
|
1407
|
+
"additionalProperties": false,
|
|
1408
|
+
"required": [
|
|
1409
|
+
"type",
|
|
1410
|
+
"surfaceId",
|
|
1411
|
+
"requestId",
|
|
1412
|
+
"admissionVersion",
|
|
1413
|
+
"occurredAt",
|
|
1414
|
+
"data"
|
|
1415
|
+
],
|
|
1416
|
+
"properties": {
|
|
1417
|
+
"type": {
|
|
1418
|
+
"const": "admission.changed"
|
|
1419
|
+
},
|
|
1420
|
+
"surfaceId": {
|
|
1421
|
+
"$ref": "#/$defs/surfaceId"
|
|
1422
|
+
},
|
|
1423
|
+
"requestId": {
|
|
1424
|
+
"$ref": "#/$defs/id"
|
|
1425
|
+
},
|
|
1426
|
+
"admissionVersion": {
|
|
1427
|
+
"type": "integer",
|
|
1428
|
+
"minimum": 0
|
|
1429
|
+
},
|
|
1430
|
+
"occurredAt": {
|
|
1431
|
+
"$ref": "#/$defs/time"
|
|
1432
|
+
},
|
|
1433
|
+
"data": {
|
|
1434
|
+
"$ref": "#/$defs/requestAdmissionData"
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
},
|
|
1334
1438
|
"debugEvent": {
|
|
1335
1439
|
"type": "object",
|
|
1336
1440
|
"additionalProperties": false,
|
|
@@ -1669,7 +1773,8 @@
|
|
|
1669
1773
|
"accessMode": {
|
|
1670
1774
|
"enum": [
|
|
1671
1775
|
"interactive",
|
|
1672
|
-
"full_access"
|
|
1776
|
+
"full_access",
|
|
1777
|
+
"no_access"
|
|
1673
1778
|
]
|
|
1674
1779
|
},
|
|
1675
1780
|
"agentModelMode": {
|
|
@@ -1734,7 +1839,8 @@
|
|
|
1734
1839
|
"accessMode": {
|
|
1735
1840
|
"enum": [
|
|
1736
1841
|
"interactive",
|
|
1737
|
-
"full_access"
|
|
1842
|
+
"full_access",
|
|
1843
|
+
"no_access"
|
|
1738
1844
|
]
|
|
1739
1845
|
},
|
|
1740
1846
|
"agentModelMode": {
|
|
@@ -1825,7 +1931,6 @@
|
|
|
1825
1931
|
"type": "object",
|
|
1826
1932
|
"additionalProperties": false,
|
|
1827
1933
|
"required": [
|
|
1828
|
-
"threadId",
|
|
1829
1934
|
"requestId"
|
|
1830
1935
|
],
|
|
1831
1936
|
"properties": {
|
|
@@ -1961,8 +2066,7 @@
|
|
|
1961
2066
|
"additionalProperties": false,
|
|
1962
2067
|
"required": [
|
|
1963
2068
|
"requestId",
|
|
1964
|
-
"disposition"
|
|
1965
|
-
"queueVersion"
|
|
2069
|
+
"disposition"
|
|
1966
2070
|
],
|
|
1967
2071
|
"properties": {
|
|
1968
2072
|
"requestId": {
|
|
@@ -1977,6 +2081,9 @@
|
|
|
1977
2081
|
"queueVersion": {
|
|
1978
2082
|
"type": "integer",
|
|
1979
2083
|
"minimum": 0
|
|
2084
|
+
},
|
|
2085
|
+
"admission": {
|
|
2086
|
+
"$ref": "#/$defs/requestAdmission"
|
|
1980
2087
|
}
|
|
1981
2088
|
}
|
|
1982
2089
|
}
|
|
@@ -2002,10 +2109,7 @@
|
|
|
2002
2109
|
"additionalProperties": false,
|
|
2003
2110
|
"required": [
|
|
2004
2111
|
"requestId",
|
|
2005
|
-
"
|
|
2006
|
-
"disposition",
|
|
2007
|
-
"sessionDisposition",
|
|
2008
|
-
"queueVersion"
|
|
2112
|
+
"disposition"
|
|
2009
2113
|
],
|
|
2010
2114
|
"properties": {
|
|
2011
2115
|
"requestId": {
|
|
@@ -2031,6 +2135,9 @@
|
|
|
2031
2135
|
"queueVersion": {
|
|
2032
2136
|
"type": "integer",
|
|
2033
2137
|
"minimum": 0
|
|
2138
|
+
},
|
|
2139
|
+
"admission": {
|
|
2140
|
+
"$ref": "#/$defs/requestAdmission"
|
|
2034
2141
|
}
|
|
2035
2142
|
}
|
|
2036
2143
|
}
|
|
@@ -2077,8 +2184,7 @@
|
|
|
2077
2184
|
"required": [
|
|
2078
2185
|
"requestId",
|
|
2079
2186
|
"phase",
|
|
2080
|
-
"outcome"
|
|
2081
|
-
"queueVersion"
|
|
2187
|
+
"outcome"
|
|
2082
2188
|
],
|
|
2083
2189
|
"properties": {
|
|
2084
2190
|
"requestId": {
|
|
@@ -2086,6 +2192,7 @@
|
|
|
2086
2192
|
},
|
|
2087
2193
|
"phase": {
|
|
2088
2194
|
"enum": [
|
|
2195
|
+
"admission_waiting",
|
|
2089
2196
|
"waiting",
|
|
2090
2197
|
"running"
|
|
2091
2198
|
]
|
|
@@ -2099,6 +2206,10 @@
|
|
|
2099
2206
|
"queueVersion": {
|
|
2100
2207
|
"type": "integer",
|
|
2101
2208
|
"minimum": 0
|
|
2209
|
+
},
|
|
2210
|
+
"admissionVersion": {
|
|
2211
|
+
"type": "integer",
|
|
2212
|
+
"minimum": 0
|
|
2102
2213
|
}
|
|
2103
2214
|
}
|
|
2104
2215
|
}
|
|
@@ -2166,6 +2277,9 @@
|
|
|
2166
2277
|
{
|
|
2167
2278
|
"$ref": "#/$defs/sessionEvent"
|
|
2168
2279
|
},
|
|
2280
|
+
{
|
|
2281
|
+
"$ref": "#/$defs/admissionEvent"
|
|
2282
|
+
},
|
|
2169
2283
|
{
|
|
2170
2284
|
"$ref": "#/$defs/liveEvent"
|
|
2171
2285
|
}
|