@mhome/conversation-protocol 3.2.0 → 3.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.
@@ -0,0 +1,5 @@
1
+ {
2
+ "target": "/chat/control/get",
3
+ "direction": "request",
4
+ "body": {}
5
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "target": "/chat/control/get",
3
+ "direction": "response",
4
+ "body": {
5
+ "surfaceId": "cs1:cp:dXNlcg",
6
+ "version": "00000000000000000001:00000000000000000001",
7
+ "activeThread": {
8
+ "threadId": "thread-2",
9
+ "title": "New conversation",
10
+ "state": "active",
11
+ "createdAt": "2026-08-22T00:00:00Z",
12
+ "updatedAt": "2026-08-22T00:00:00Z",
13
+ "archivedAt": null,
14
+ "purgeAfter": null
15
+ },
16
+ "activeRun": null,
17
+ "pendingInteraction": null,
18
+ "queue": {
19
+ "queueVersion": 0,
20
+ "items": []
21
+ },
22
+ "historyVersion": 0
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "target": "/chat/event",
3
+ "direction": "event",
4
+ "body": {
5
+ "type": "control.updated",
6
+ "surfaceId": "cs1:cp:dXNlcg",
7
+ "data": {
8
+ "surfaceId": "cs1:cp:dXNlcg",
9
+ "version": "00000000000000000001:00000000000000000001",
10
+ "activeThread": {
11
+ "threadId": "thread-2",
12
+ "title": "New conversation",
13
+ "state": "active",
14
+ "createdAt": "2026-08-22T00:00:00Z",
15
+ "updatedAt": "2026-08-22T00:00:00Z",
16
+ "archivedAt": null,
17
+ "purgeAfter": null
18
+ },
19
+ "activeRun": null,
20
+ "pendingInteraction": null,
21
+ "queue": {
22
+ "queueVersion": 0,
23
+ "items": []
24
+ },
25
+ "historyVersion": 0
26
+ }
27
+ }
28
+ }
@@ -2,8 +2,30 @@
2
2
  "target": "/chat/message/enqueue",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-1",
6
- "disposition": "queued",
7
- "queueVersion": 4
5
+ "receipt": {
6
+ "requestId": "request-1",
7
+ "disposition": "queued",
8
+ "queueVersion": 4
9
+ },
10
+ "control": {
11
+ "surfaceId": "cs1:cp:dXNlcg",
12
+ "version": "00000000000000000001:00000000000000000001",
13
+ "activeThread": {
14
+ "threadId": "thread-2",
15
+ "title": "New conversation",
16
+ "state": "active",
17
+ "createdAt": "2026-08-22T00:00:00Z",
18
+ "updatedAt": "2026-08-22T00:00:00Z",
19
+ "archivedAt": null,
20
+ "purgeAfter": null
21
+ },
22
+ "activeRun": null,
23
+ "pendingInteraction": null,
24
+ "queue": {
25
+ "queueVersion": 0,
26
+ "items": []
27
+ },
28
+ "historyVersion": 0
29
+ }
8
30
  }
9
31
  }
@@ -2,8 +2,30 @@
2
2
  "target": "/chat/interaction/answer",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-1",
6
- "threadId": "thread-3",
7
- "disposition": "accepted"
5
+ "receipt": {
6
+ "requestId": "request-1",
7
+ "threadId": "thread-3",
8
+ "disposition": "accepted"
9
+ },
10
+ "control": {
11
+ "surfaceId": "cs1:cp:dXNlcg",
12
+ "version": "00000000000000000001:00000000000000000001",
13
+ "activeThread": {
14
+ "threadId": "thread-2",
15
+ "title": "New conversation",
16
+ "state": "active",
17
+ "createdAt": "2026-08-22T00:00:00Z",
18
+ "updatedAt": "2026-08-22T00:00:00Z",
19
+ "archivedAt": null,
20
+ "purgeAfter": null
21
+ },
22
+ "activeRun": null,
23
+ "pendingInteraction": null,
24
+ "queue": {
25
+ "queueVersion": 0,
26
+ "items": []
27
+ },
28
+ "historyVersion": 0
29
+ }
8
30
  }
9
31
  }
@@ -2,7 +2,29 @@
2
2
  "target": "/chat/interaction/submit",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-1",
6
- "disposition": "accepted"
5
+ "receipt": {
6
+ "requestId": "request-1",
7
+ "disposition": "accepted"
8
+ },
9
+ "control": {
10
+ "surfaceId": "cs1:cp:dXNlcg",
11
+ "version": "00000000000000000001:00000000000000000001",
12
+ "activeThread": {
13
+ "threadId": "thread-2",
14
+ "title": "New conversation",
15
+ "state": "active",
16
+ "createdAt": "2026-08-22T00:00:00Z",
17
+ "updatedAt": "2026-08-22T00:00:00Z",
18
+ "archivedAt": null,
19
+ "purgeAfter": null
20
+ },
21
+ "activeRun": null,
22
+ "pendingInteraction": null,
23
+ "queue": {
24
+ "queueVersion": 0,
25
+ "items": []
26
+ },
27
+ "historyVersion": 0
28
+ }
7
29
  }
8
30
  }
@@ -2,7 +2,29 @@
2
2
  "target": "/chat/queue/reorder",
3
3
  "direction": "response",
4
4
  "body": {
5
- "queueVersion": 4,
6
- "items": []
5
+ "receipt": {
6
+ "queueVersion": 4,
7
+ "items": []
8
+ },
9
+ "control": {
10
+ "surfaceId": "cs1:cp:dXNlcg",
11
+ "version": "00000000000000000001:00000000000000000001",
12
+ "activeThread": {
13
+ "threadId": "thread-2",
14
+ "title": "New conversation",
15
+ "state": "active",
16
+ "createdAt": "2026-08-22T00:00:00Z",
17
+ "updatedAt": "2026-08-22T00:00:00Z",
18
+ "archivedAt": null,
19
+ "purgeAfter": null
20
+ },
21
+ "activeRun": null,
22
+ "pendingInteraction": null,
23
+ "queue": {
24
+ "queueVersion": 0,
25
+ "items": []
26
+ },
27
+ "historyVersion": 0
28
+ }
7
29
  }
8
30
  }
@@ -2,9 +2,31 @@
2
2
  "target": "/chat/request/cancel",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-3",
6
- "phase": "admission_waiting",
7
- "outcome": "cancelled",
8
- "admissionVersion": 8
5
+ "receipt": {
6
+ "requestId": "request-3",
7
+ "phase": "admission_waiting",
8
+ "outcome": "cancelled",
9
+ "admissionVersion": 8
10
+ },
11
+ "control": {
12
+ "surfaceId": "cs1:cp:dXNlcg",
13
+ "version": "00000000000000000001:00000000000000000001",
14
+ "activeThread": {
15
+ "threadId": "thread-2",
16
+ "title": "New conversation",
17
+ "state": "active",
18
+ "createdAt": "2026-08-22T00:00:00Z",
19
+ "updatedAt": "2026-08-22T00:00:00Z",
20
+ "archivedAt": null,
21
+ "purgeAfter": null
22
+ },
23
+ "activeRun": null,
24
+ "pendingInteraction": null,
25
+ "queue": {
26
+ "queueVersion": 0,
27
+ "items": []
28
+ },
29
+ "historyVersion": 0
30
+ }
9
31
  }
10
32
  }
@@ -2,9 +2,31 @@
2
2
  "target": "/chat/request/cancel",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-1",
6
- "phase": "running",
7
- "outcome": "cancelling",
8
- "queueVersion": 4
5
+ "receipt": {
6
+ "requestId": "request-1",
7
+ "phase": "running",
8
+ "outcome": "cancelling",
9
+ "queueVersion": 4
10
+ },
11
+ "control": {
12
+ "surfaceId": "cs1:cp:dXNlcg",
13
+ "version": "00000000000000000001:00000000000000000001",
14
+ "activeThread": {
15
+ "threadId": "thread-2",
16
+ "title": "New conversation",
17
+ "state": "active",
18
+ "createdAt": "2026-08-22T00:00:00Z",
19
+ "updatedAt": "2026-08-22T00:00:00Z",
20
+ "archivedAt": null,
21
+ "purgeAfter": null
22
+ },
23
+ "activeRun": null,
24
+ "pendingInteraction": null,
25
+ "queue": {
26
+ "queueVersion": 0,
27
+ "items": []
28
+ },
29
+ "historyVersion": 0
30
+ }
9
31
  }
10
32
  }
@@ -2,15 +2,45 @@
2
2
  "target": "/chat/session/start",
3
3
  "direction": "response",
4
4
  "body": {
5
- "operationId": "operation-2",
6
- "threadId": "thread-3",
7
- "disposition": "rotated",
8
- "catalog": {
9
- "catalogVersion": 4,
10
- "activeThreadId": "thread-3",
11
- "threads": [
12
- { "threadId": "thread-3", "title": "New conversation", "state": "active", "createdAt": "2026-08-22T02:00:00Z", "updatedAt": "2026-08-22T02:00:00Z", "archivedAt": null, "purgeAfter": null }
13
- ]
5
+ "receipt": {
6
+ "operationId": "operation-2",
7
+ "threadId": "thread-3",
8
+ "disposition": "rotated",
9
+ "catalog": {
10
+ "catalogVersion": 4,
11
+ "activeThreadId": "thread-3",
12
+ "threads": [
13
+ {
14
+ "threadId": "thread-3",
15
+ "title": "New conversation",
16
+ "state": "active",
17
+ "createdAt": "2026-08-22T02:00:00Z",
18
+ "updatedAt": "2026-08-22T02:00:00Z",
19
+ "archivedAt": null,
20
+ "purgeAfter": null
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ "control": {
26
+ "surfaceId": "cs1:cp:dXNlcg",
27
+ "version": "00000000000000000001:00000000000000000001",
28
+ "activeThread": {
29
+ "threadId": "thread-2",
30
+ "title": "New conversation",
31
+ "state": "active",
32
+ "createdAt": "2026-08-22T00:00:00Z",
33
+ "updatedAt": "2026-08-22T00:00:00Z",
34
+ "archivedAt": null,
35
+ "purgeAfter": null
36
+ },
37
+ "activeRun": null,
38
+ "pendingInteraction": null,
39
+ "queue": {
40
+ "queueVersion": 0,
41
+ "items": []
42
+ },
43
+ "historyVersion": 0
14
44
  }
15
45
  }
16
46
  }
@@ -2,10 +2,41 @@
2
2
  "target": "/chat/thread/archive",
3
3
  "direction": "response",
4
4
  "body": {
5
- "catalogVersion": 3,
6
- "activeThreadId": null,
7
- "threads": [
8
- { "threadId": "thread-2", "title": "New conversation", "state": "archived", "createdAt": "2026-08-22T00:00:00Z", "updatedAt": "2026-08-22T01:00:00Z", "archivedAt": "2026-08-22T01:00:00Z", "archiveReason": "user_requested", "purgeAfter": "2026-08-25T01:00:00Z" }
9
- ]
5
+ "receipt": {
6
+ "catalogVersion": 3,
7
+ "activeThreadId": null,
8
+ "threads": [
9
+ {
10
+ "threadId": "thread-2",
11
+ "title": "New conversation",
12
+ "state": "archived",
13
+ "createdAt": "2026-08-22T00:00:00Z",
14
+ "updatedAt": "2026-08-22T01:00:00Z",
15
+ "archivedAt": "2026-08-22T01:00:00Z",
16
+ "archiveReason": "user_requested",
17
+ "purgeAfter": "2026-08-25T01:00:00Z"
18
+ }
19
+ ]
20
+ },
21
+ "control": {
22
+ "surfaceId": "cs1:cp:dXNlcg",
23
+ "version": "00000000000000000001:00000000000000000001",
24
+ "activeThread": {
25
+ "threadId": "thread-2",
26
+ "title": "New conversation",
27
+ "state": "active",
28
+ "createdAt": "2026-08-22T00:00:00Z",
29
+ "updatedAt": "2026-08-22T00:00:00Z",
30
+ "archivedAt": null,
31
+ "purgeAfter": null
32
+ },
33
+ "activeRun": null,
34
+ "pendingInteraction": null,
35
+ "queue": {
36
+ "queueVersion": 0,
37
+ "items": []
38
+ },
39
+ "historyVersion": 0
40
+ }
10
41
  }
11
42
  }
@@ -2,10 +2,40 @@
2
2
  "target": "/chat/thread/create",
3
3
  "direction": "response",
4
4
  "body": {
5
- "catalogVersion": 2,
6
- "activeThreadId": "thread-2",
7
- "threads": [
8
- { "threadId": "thread-2", "title": "New conversation", "state": "active", "createdAt": "2026-08-22T00:00:00Z", "updatedAt": "2026-08-22T00:00:00Z", "archivedAt": null, "purgeAfter": null }
9
- ]
5
+ "receipt": {
6
+ "catalogVersion": 2,
7
+ "activeThreadId": "thread-2",
8
+ "threads": [
9
+ {
10
+ "threadId": "thread-2",
11
+ "title": "New conversation",
12
+ "state": "active",
13
+ "createdAt": "2026-08-22T00:00:00Z",
14
+ "updatedAt": "2026-08-22T00:00:00Z",
15
+ "archivedAt": null,
16
+ "purgeAfter": null
17
+ }
18
+ ]
19
+ },
20
+ "control": {
21
+ "surfaceId": "cs1:cp:dXNlcg",
22
+ "version": "00000000000000000001:00000000000000000001",
23
+ "activeThread": {
24
+ "threadId": "thread-2",
25
+ "title": "New conversation",
26
+ "state": "active",
27
+ "createdAt": "2026-08-22T00:00:00Z",
28
+ "updatedAt": "2026-08-22T00:00:00Z",
29
+ "archivedAt": null,
30
+ "purgeAfter": null
31
+ },
32
+ "activeRun": null,
33
+ "pendingInteraction": null,
34
+ "queue": {
35
+ "queueVersion": 0,
36
+ "items": []
37
+ },
38
+ "historyVersion": 0
39
+ }
10
40
  }
11
41
  }
@@ -2,11 +2,50 @@
2
2
  "target": "/chat/thread/rotate",
3
3
  "direction": "response",
4
4
  "body": {
5
- "catalogVersion": 4,
6
- "activeThreadId": "thread-3",
7
- "threads": [
8
- { "threadId": "thread-3", "title": "New conversation", "state": "active", "createdAt": "2026-08-22T02:00:00Z", "updatedAt": "2026-08-22T02:00:00Z", "archivedAt": null, "purgeAfter": null },
9
- { "threadId": "thread-2", "title": "Previous", "state": "archived", "createdAt": "2026-08-22T00:00:00Z", "updatedAt": "2026-08-22T02:00:00Z", "archivedAt": "2026-08-22T02:00:00Z", "archiveReason": "replaced", "purgeAfter": "2026-08-25T02:00:00Z" }
10
- ]
5
+ "receipt": {
6
+ "catalogVersion": 4,
7
+ "activeThreadId": "thread-3",
8
+ "threads": [
9
+ {
10
+ "threadId": "thread-3",
11
+ "title": "New conversation",
12
+ "state": "active",
13
+ "createdAt": "2026-08-22T02:00:00Z",
14
+ "updatedAt": "2026-08-22T02:00:00Z",
15
+ "archivedAt": null,
16
+ "purgeAfter": null
17
+ },
18
+ {
19
+ "threadId": "thread-2",
20
+ "title": "Previous",
21
+ "state": "archived",
22
+ "createdAt": "2026-08-22T00:00:00Z",
23
+ "updatedAt": "2026-08-22T02:00:00Z",
24
+ "archivedAt": "2026-08-22T02:00:00Z",
25
+ "archiveReason": "replaced",
26
+ "purgeAfter": "2026-08-25T02:00:00Z"
27
+ }
28
+ ]
29
+ },
30
+ "control": {
31
+ "surfaceId": "cs1:cp:dXNlcg",
32
+ "version": "00000000000000000001:00000000000000000001",
33
+ "activeThread": {
34
+ "threadId": "thread-2",
35
+ "title": "New conversation",
36
+ "state": "active",
37
+ "createdAt": "2026-08-22T00:00:00Z",
38
+ "updatedAt": "2026-08-22T00:00:00Z",
39
+ "archivedAt": null,
40
+ "purgeAfter": null
41
+ },
42
+ "activeRun": null,
43
+ "pendingInteraction": null,
44
+ "queue": {
45
+ "queueVersion": 0,
46
+ "items": []
47
+ },
48
+ "historyVersion": 0
49
+ }
11
50
  }
12
51
  }
@@ -2,12 +2,34 @@
2
2
  "target": "/chat/turn/submit",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-3",
6
- "disposition": "queued",
7
- "admission": {
8
- "state": "waiting_handoff",
9
- "admissionVersion": 7,
10
- "reason": "mode_handoff"
5
+ "receipt": {
6
+ "requestId": "request-3",
7
+ "disposition": "queued",
8
+ "admission": {
9
+ "state": "waiting_handoff",
10
+ "admissionVersion": 7,
11
+ "reason": "mode_handoff"
12
+ }
13
+ },
14
+ "control": {
15
+ "surfaceId": "cs1:cp:dXNlcg",
16
+ "version": "00000000000000000001:00000000000000000001",
17
+ "activeThread": {
18
+ "threadId": "thread-2",
19
+ "title": "New conversation",
20
+ "state": "active",
21
+ "createdAt": "2026-08-22T00:00:00Z",
22
+ "updatedAt": "2026-08-22T00:00:00Z",
23
+ "archivedAt": null,
24
+ "purgeAfter": null
25
+ },
26
+ "activeRun": null,
27
+ "pendingInteraction": null,
28
+ "queue": {
29
+ "queueVersion": 0,
30
+ "items": []
31
+ },
32
+ "historyVersion": 0
11
33
  }
12
34
  }
13
35
  }
@@ -2,10 +2,32 @@
2
2
  "target": "/chat/turn/submit",
3
3
  "direction": "response",
4
4
  "body": {
5
- "requestId": "request-2",
6
- "threadId": "thread-3",
7
- "disposition": "queued",
8
- "sessionDisposition": "rotated_idle_timeout",
9
- "queueVersion": 1
5
+ "receipt": {
6
+ "requestId": "request-2",
7
+ "threadId": "thread-3",
8
+ "disposition": "queued",
9
+ "sessionDisposition": "rotated_idle_timeout",
10
+ "queueVersion": 1
11
+ },
12
+ "control": {
13
+ "surfaceId": "cs1:cp:dXNlcg",
14
+ "version": "00000000000000000001:00000000000000000001",
15
+ "activeThread": {
16
+ "threadId": "thread-2",
17
+ "title": "New conversation",
18
+ "state": "active",
19
+ "createdAt": "2026-08-22T00:00:00Z",
20
+ "updatedAt": "2026-08-22T00:00:00Z",
21
+ "archivedAt": null,
22
+ "purgeAfter": null
23
+ },
24
+ "activeRun": null,
25
+ "pendingInteraction": null,
26
+ "queue": {
27
+ "queueVersion": 0,
28
+ "items": []
29
+ },
30
+ "historyVersion": 0
31
+ }
10
32
  }
11
33
  }
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "manifest": "mhome.conversation.targets.v1",
3
- "contractVersion": "3.2.0",
3
+ "contractVersion": "3.4.0",
4
4
  "requestTargets": [
5
+ "/chat/control/get",
5
6
  "/chat/thread/list",
6
7
  "/chat/thread/create",
7
8
  "/chat/thread/archive",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhome/conversation-protocol",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
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": "3.2.0",
3
+ "contractVersion": "3.4.0",
4
4
  "manifest": "manifest/targets.v1.json",
5
5
  "schemas": {
6
6
  "frame": "schema/conversation-frame.v2.schema.json",
@@ -1595,6 +1595,15 @@
1595
1595
  },
1596
1596
  {
1597
1597
  "$ref": "#/$defs/debugEventFrame"
1598
+ },
1599
+ {
1600
+ "$ref": "#/$defs/controlRequest"
1601
+ },
1602
+ {
1603
+ "$ref": "#/$defs/controlResponse"
1604
+ },
1605
+ {
1606
+ "$ref": "#/$defs/catalogCommandResponse"
1598
1607
  }
1599
1608
  ]
1600
1609
  },
@@ -2058,12 +2067,7 @@
2058
2067
  ],
2059
2068
  "properties": {
2060
2069
  "target": {
2061
- "enum": [
2062
- "/chat/thread/list",
2063
- "/chat/thread/create",
2064
- "/chat/thread/archive",
2065
- "/chat/thread/rotate"
2066
- ]
2070
+ "const": "/chat/thread/list"
2067
2071
  },
2068
2072
  "direction": {
2069
2073
  "const": "response"
@@ -2112,25 +2116,45 @@
2112
2116
  "type": "object",
2113
2117
  "additionalProperties": false,
2114
2118
  "required": [
2115
- "requestId",
2116
- "disposition"
2119
+ "receipt",
2120
+ "control"
2117
2121
  ],
2118
2122
  "properties": {
2119
- "requestId": {
2120
- "$ref": "#/$defs/id"
2123
+ "receipt": {
2124
+ "type": "object",
2125
+ "additionalProperties": false,
2126
+ "required": [
2127
+ "requestId",
2128
+ "disposition"
2129
+ ],
2130
+ "properties": {
2131
+ "requestId": {
2132
+ "$ref": "#/$defs/id"
2133
+ },
2134
+ "disposition": {
2135
+ "enum": [
2136
+ "queued",
2137
+ "duplicate"
2138
+ ]
2139
+ },
2140
+ "queueVersion": {
2141
+ "type": "integer",
2142
+ "minimum": 0
2143
+ },
2144
+ "admission": {
2145
+ "$ref": "#/$defs/requestAdmission"
2146
+ }
2147
+ }
2121
2148
  },
2122
- "disposition": {
2123
- "enum": [
2124
- "queued",
2125
- "duplicate"
2149
+ "control": {
2150
+ "oneOf": [
2151
+ {
2152
+ "$ref": "#/$defs/control"
2153
+ },
2154
+ {
2155
+ "type": "null"
2156
+ }
2126
2157
  ]
2127
- },
2128
- "queueVersion": {
2129
- "type": "integer",
2130
- "minimum": 0
2131
- },
2132
- "admission": {
2133
- "$ref": "#/$defs/requestAdmission"
2134
2158
  }
2135
2159
  }
2136
2160
  }
@@ -2155,36 +2179,56 @@
2155
2179
  "type": "object",
2156
2180
  "additionalProperties": false,
2157
2181
  "required": [
2158
- "requestId",
2159
- "disposition"
2182
+ "receipt",
2183
+ "control"
2160
2184
  ],
2161
2185
  "properties": {
2162
- "requestId": {
2163
- "$ref": "#/$defs/id"
2164
- },
2165
- "threadId": {
2166
- "$ref": "#/$defs/id"
2167
- },
2168
- "disposition": {
2169
- "enum": [
2170
- "queued",
2171
- "duplicate",
2172
- "blocked_pending_interaction"
2173
- ]
2186
+ "receipt": {
2187
+ "type": "object",
2188
+ "additionalProperties": false,
2189
+ "required": [
2190
+ "requestId",
2191
+ "disposition"
2192
+ ],
2193
+ "properties": {
2194
+ "requestId": {
2195
+ "$ref": "#/$defs/id"
2196
+ },
2197
+ "threadId": {
2198
+ "$ref": "#/$defs/id"
2199
+ },
2200
+ "disposition": {
2201
+ "enum": [
2202
+ "queued",
2203
+ "duplicate",
2204
+ "blocked_pending_interaction"
2205
+ ]
2206
+ },
2207
+ "sessionDisposition": {
2208
+ "enum": [
2209
+ "existing",
2210
+ "created",
2211
+ "rotated_idle_timeout"
2212
+ ]
2213
+ },
2214
+ "queueVersion": {
2215
+ "type": "integer",
2216
+ "minimum": 0
2217
+ },
2218
+ "admission": {
2219
+ "$ref": "#/$defs/requestAdmission"
2220
+ }
2221
+ }
2174
2222
  },
2175
- "sessionDisposition": {
2176
- "enum": [
2177
- "existing",
2178
- "created",
2179
- "rotated_idle_timeout"
2223
+ "control": {
2224
+ "oneOf": [
2225
+ {
2226
+ "$ref": "#/$defs/control"
2227
+ },
2228
+ {
2229
+ "type": "null"
2230
+ }
2180
2231
  ]
2181
- },
2182
- "queueVersion": {
2183
- "type": "integer",
2184
- "minimum": 0
2185
- },
2186
- "admission": {
2187
- "$ref": "#/$defs/requestAdmission"
2188
2232
  }
2189
2233
  }
2190
2234
  }
@@ -2206,7 +2250,27 @@
2206
2250
  "const": "response"
2207
2251
  },
2208
2252
  "body": {
2209
- "$ref": "#/$defs/queue"
2253
+ "type": "object",
2254
+ "additionalProperties": false,
2255
+ "required": [
2256
+ "receipt",
2257
+ "control"
2258
+ ],
2259
+ "properties": {
2260
+ "receipt": {
2261
+ "$ref": "#/$defs/queue"
2262
+ },
2263
+ "control": {
2264
+ "oneOf": [
2265
+ {
2266
+ "$ref": "#/$defs/control"
2267
+ },
2268
+ {
2269
+ "type": "null"
2270
+ }
2271
+ ]
2272
+ }
2273
+ }
2210
2274
  }
2211
2275
  }
2212
2276
  },
@@ -2229,34 +2293,54 @@
2229
2293
  "type": "object",
2230
2294
  "additionalProperties": false,
2231
2295
  "required": [
2232
- "requestId",
2233
- "phase",
2234
- "outcome"
2296
+ "receipt",
2297
+ "control"
2235
2298
  ],
2236
2299
  "properties": {
2237
- "requestId": {
2238
- "$ref": "#/$defs/id"
2239
- },
2240
- "phase": {
2241
- "enum": [
2242
- "admission_waiting",
2243
- "waiting",
2244
- "running"
2245
- ]
2300
+ "receipt": {
2301
+ "type": "object",
2302
+ "additionalProperties": false,
2303
+ "required": [
2304
+ "requestId",
2305
+ "phase",
2306
+ "outcome"
2307
+ ],
2308
+ "properties": {
2309
+ "requestId": {
2310
+ "$ref": "#/$defs/id"
2311
+ },
2312
+ "phase": {
2313
+ "enum": [
2314
+ "admission_waiting",
2315
+ "waiting",
2316
+ "running"
2317
+ ]
2318
+ },
2319
+ "outcome": {
2320
+ "enum": [
2321
+ "cancelled",
2322
+ "cancelling"
2323
+ ]
2324
+ },
2325
+ "queueVersion": {
2326
+ "type": "integer",
2327
+ "minimum": 0
2328
+ },
2329
+ "admissionVersion": {
2330
+ "type": "integer",
2331
+ "minimum": 0
2332
+ }
2333
+ }
2246
2334
  },
2247
- "outcome": {
2248
- "enum": [
2249
- "cancelled",
2250
- "cancelling"
2335
+ "control": {
2336
+ "oneOf": [
2337
+ {
2338
+ "$ref": "#/$defs/control"
2339
+ },
2340
+ {
2341
+ "type": "null"
2342
+ }
2251
2343
  ]
2252
- },
2253
- "queueVersion": {
2254
- "type": "integer",
2255
- "minimum": 0
2256
- },
2257
- "admissionVersion": {
2258
- "type": "integer",
2259
- "minimum": 0
2260
2344
  }
2261
2345
  }
2262
2346
  }
@@ -2281,15 +2365,35 @@
2281
2365
  "type": "object",
2282
2366
  "additionalProperties": false,
2283
2367
  "required": [
2284
- "requestId",
2285
- "disposition"
2368
+ "receipt",
2369
+ "control"
2286
2370
  ],
2287
2371
  "properties": {
2288
- "requestId": {
2289
- "$ref": "#/$defs/id"
2372
+ "receipt": {
2373
+ "type": "object",
2374
+ "additionalProperties": false,
2375
+ "required": [
2376
+ "requestId",
2377
+ "disposition"
2378
+ ],
2379
+ "properties": {
2380
+ "requestId": {
2381
+ "$ref": "#/$defs/id"
2382
+ },
2383
+ "disposition": {
2384
+ "const": "accepted"
2385
+ }
2386
+ }
2290
2387
  },
2291
- "disposition": {
2292
- "const": "accepted"
2388
+ "control": {
2389
+ "oneOf": [
2390
+ {
2391
+ "$ref": "#/$defs/control"
2392
+ },
2393
+ {
2394
+ "type": "null"
2395
+ }
2396
+ ]
2293
2397
  }
2294
2398
  }
2295
2399
  }
@@ -2329,6 +2433,9 @@
2329
2433
  },
2330
2434
  {
2331
2435
  "$ref": "#/$defs/liveEvent"
2436
+ },
2437
+ {
2438
+ "$ref": "#/$defs/controlEvent"
2332
2439
  }
2333
2440
  ]
2334
2441
  }
@@ -2406,26 +2513,46 @@
2406
2513
  "type": "object",
2407
2514
  "additionalProperties": false,
2408
2515
  "required": [
2409
- "operationId",
2410
- "threadId",
2411
- "disposition",
2412
- "catalog"
2516
+ "receipt",
2517
+ "control"
2413
2518
  ],
2414
2519
  "properties": {
2415
- "operationId": {
2416
- "$ref": "#/$defs/id"
2417
- },
2418
- "threadId": {
2419
- "$ref": "#/$defs/id"
2520
+ "receipt": {
2521
+ "type": "object",
2522
+ "additionalProperties": false,
2523
+ "required": [
2524
+ "operationId",
2525
+ "threadId",
2526
+ "disposition",
2527
+ "catalog"
2528
+ ],
2529
+ "properties": {
2530
+ "operationId": {
2531
+ "$ref": "#/$defs/id"
2532
+ },
2533
+ "threadId": {
2534
+ "$ref": "#/$defs/id"
2535
+ },
2536
+ "disposition": {
2537
+ "enum": [
2538
+ "rotated",
2539
+ "already_applied"
2540
+ ]
2541
+ },
2542
+ "catalog": {
2543
+ "$ref": "#/$defs/catalog"
2544
+ }
2545
+ }
2420
2546
  },
2421
- "disposition": {
2422
- "enum": [
2423
- "rotated",
2424
- "already_applied"
2547
+ "control": {
2548
+ "oneOf": [
2549
+ {
2550
+ "$ref": "#/$defs/control"
2551
+ },
2552
+ {
2553
+ "type": "null"
2554
+ }
2425
2555
  ]
2426
- },
2427
- "catalog": {
2428
- "$ref": "#/$defs/catalog"
2429
2556
  }
2430
2557
  }
2431
2558
  }
@@ -2512,23 +2639,209 @@
2512
2639
  "type": "object",
2513
2640
  "additionalProperties": false,
2514
2641
  "required": [
2515
- "requestId",
2516
- "threadId",
2517
- "disposition"
2642
+ "receipt",
2643
+ "control"
2518
2644
  ],
2519
2645
  "properties": {
2520
- "requestId": {
2521
- "$ref": "#/$defs/id"
2646
+ "receipt": {
2647
+ "type": "object",
2648
+ "additionalProperties": false,
2649
+ "required": [
2650
+ "requestId",
2651
+ "threadId",
2652
+ "disposition"
2653
+ ],
2654
+ "properties": {
2655
+ "requestId": {
2656
+ "$ref": "#/$defs/id"
2657
+ },
2658
+ "threadId": {
2659
+ "$ref": "#/$defs/id"
2660
+ },
2661
+ "disposition": {
2662
+ "enum": [
2663
+ "accepted",
2664
+ "duplicate",
2665
+ "unavailable",
2666
+ "expired_session"
2667
+ ]
2668
+ }
2669
+ }
2522
2670
  },
2523
- "threadId": {
2524
- "$ref": "#/$defs/id"
2671
+ "control": {
2672
+ "oneOf": [
2673
+ {
2674
+ "$ref": "#/$defs/control"
2675
+ },
2676
+ {
2677
+ "type": "null"
2678
+ }
2679
+ ]
2680
+ }
2681
+ }
2682
+ }
2683
+ }
2684
+ },
2685
+ "control": {
2686
+ "type": "object",
2687
+ "additionalProperties": false,
2688
+ "required": [
2689
+ "surfaceId",
2690
+ "version",
2691
+ "activeThread",
2692
+ "activeRun",
2693
+ "pendingInteraction",
2694
+ "queue",
2695
+ "historyVersion"
2696
+ ],
2697
+ "properties": {
2698
+ "surfaceId": {
2699
+ "$ref": "#/$defs/surfaceId"
2700
+ },
2701
+ "version": {
2702
+ "type": "string",
2703
+ "pattern": "^[0-9]{20}:[0-9]{20}$"
2704
+ },
2705
+ "activeThread": {
2706
+ "oneOf": [
2707
+ {
2708
+ "$ref": "#/$defs/threadSummary"
2525
2709
  },
2526
- "disposition": {
2527
- "enum": [
2528
- "accepted",
2529
- "duplicate",
2530
- "unavailable",
2531
- "expired_session"
2710
+ {
2711
+ "type": "null"
2712
+ }
2713
+ ]
2714
+ },
2715
+ "activeRun": {
2716
+ "oneOf": [
2717
+ {
2718
+ "$ref": "#/$defs/activeRun"
2719
+ },
2720
+ {
2721
+ "type": "null"
2722
+ }
2723
+ ]
2724
+ },
2725
+ "pendingInteraction": {
2726
+ "oneOf": [
2727
+ {
2728
+ "$ref": "#/$defs/pendingInteraction"
2729
+ },
2730
+ {
2731
+ "type": "null"
2732
+ }
2733
+ ]
2734
+ },
2735
+ "queue": {
2736
+ "$ref": "#/$defs/queue"
2737
+ },
2738
+ "historyVersion": {
2739
+ "type": "integer",
2740
+ "minimum": 0
2741
+ }
2742
+ }
2743
+ },
2744
+ "controlEvent": {
2745
+ "type": "object",
2746
+ "additionalProperties": false,
2747
+ "required": [
2748
+ "type",
2749
+ "surfaceId",
2750
+ "data"
2751
+ ],
2752
+ "properties": {
2753
+ "type": {
2754
+ "const": "control.updated"
2755
+ },
2756
+ "surfaceId": {
2757
+ "$ref": "#/$defs/surfaceId"
2758
+ },
2759
+ "data": {
2760
+ "$ref": "#/$defs/control"
2761
+ }
2762
+ }
2763
+ },
2764
+ "controlRequest": {
2765
+ "type": "object",
2766
+ "additionalProperties": false,
2767
+ "required": [
2768
+ "target",
2769
+ "direction",
2770
+ "body"
2771
+ ],
2772
+ "properties": {
2773
+ "target": {
2774
+ "const": "/chat/control/get"
2775
+ },
2776
+ "direction": {
2777
+ "const": "request"
2778
+ },
2779
+ "body": {
2780
+ "type": "object",
2781
+ "additionalProperties": false,
2782
+ "required": [],
2783
+ "properties": {}
2784
+ }
2785
+ }
2786
+ },
2787
+ "controlResponse": {
2788
+ "type": "object",
2789
+ "additionalProperties": false,
2790
+ "required": [
2791
+ "target",
2792
+ "direction",
2793
+ "body"
2794
+ ],
2795
+ "properties": {
2796
+ "target": {
2797
+ "const": "/chat/control/get"
2798
+ },
2799
+ "direction": {
2800
+ "const": "response"
2801
+ },
2802
+ "body": {
2803
+ "$ref": "#/$defs/control"
2804
+ }
2805
+ }
2806
+ },
2807
+ "catalogCommandResponse": {
2808
+ "type": "object",
2809
+ "additionalProperties": false,
2810
+ "required": [
2811
+ "target",
2812
+ "direction",
2813
+ "body"
2814
+ ],
2815
+ "properties": {
2816
+ "target": {
2817
+ "enum": [
2818
+ "/chat/thread/create",
2819
+ "/chat/thread/archive",
2820
+ "/chat/thread/rotate"
2821
+ ]
2822
+ },
2823
+ "direction": {
2824
+ "const": "response"
2825
+ },
2826
+ "body": {
2827
+ "type": "object",
2828
+ "additionalProperties": false,
2829
+ "required": [
2830
+ "receipt",
2831
+ "control"
2832
+ ],
2833
+ "properties": {
2834
+ "receipt": {
2835
+ "$ref": "#/$defs/catalog"
2836
+ },
2837
+ "control": {
2838
+ "oneOf": [
2839
+ {
2840
+ "$ref": "#/$defs/control"
2841
+ },
2842
+ {
2843
+ "type": "null"
2844
+ }
2532
2845
  ]
2533
2846
  }
2534
2847
  }
@@ -302,8 +302,7 @@
302
302
  "additionalProperties": false,
303
303
  "required": [
304
304
  "type",
305
- "uri",
306
- "mime_type"
305
+ "uri"
307
306
  ],
308
307
  "properties": {
309
308
  "type": {
@@ -312,10 +311,6 @@
312
311
  "uri": {
313
312
  "type": "string",
314
313
  "pattern": "^meow-artifact://v1/"
315
- },
316
- "mime_type": {
317
- "type": "string",
318
- "minLength": 1
319
314
  }
320
315
  }
321
316
  },
@@ -362,22 +357,6 @@
362
357
  "type": "boolean"
363
358
  }
364
359
  }
365
- },
366
- {
367
- "type": "object",
368
- "additionalProperties": false,
369
- "required": [
370
- "type",
371
- "image"
372
- ],
373
- "properties": {
374
- "type": {
375
- "const": "image"
376
- },
377
- "image": {
378
- "$ref": "#/$defs/image"
379
- }
380
- }
381
360
  }
382
361
  ]
383
362
  },
@@ -1852,24 +1831,6 @@
1852
1831
  "payload": true
1853
1832
  }
1854
1833
  },
1855
- "image": {
1856
- "type": "object",
1857
- "additionalProperties": false,
1858
- "properties": {
1859
- "url": {
1860
- "type": "string"
1861
- },
1862
- "base64": {
1863
- "type": "string"
1864
- },
1865
- "mimeType": {
1866
- "type": "string"
1867
- },
1868
- "createdAt": {
1869
- "type": "integer"
1870
- }
1871
- }
1872
- },
1873
1834
  "llm_generation_support": {
1874
1835
  "type": "object",
1875
1836
  "additionalProperties": false,
@@ -1956,7 +1917,12 @@
1956
1917
  "uniqueItems": true,
1957
1918
  "items": {
1958
1919
  "type": "string",
1959
- "enum": ["image", "video", "audio", "file"]
1920
+ "enum": [
1921
+ "image",
1922
+ "video",
1923
+ "audio",
1924
+ "file"
1925
+ ]
1960
1926
  }
1961
1927
  },
1962
1928
  "tool_calling": {