@mhome/conversation-protocol 3.3.0 → 3.6.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.
Files changed (31) hide show
  1. package/README.md +20 -0
  2. package/fixtures/control-get.request.json +5 -0
  3. package/fixtures/control-get.response.json +24 -0
  4. package/fixtures/control.event.json +28 -0
  5. package/fixtures/enqueue.response.json +25 -3
  6. package/fixtures/execution/enqueue.v1.json +30 -278
  7. package/fixtures/execution/observation.v1.json +3 -3
  8. package/fixtures/interaction-answer.response.json +25 -3
  9. package/fixtures/interaction.response.json +24 -2
  10. package/fixtures/live.event.json +4 -2
  11. package/fixtures/progress-planning.event.json +4 -2
  12. package/fixtures/progress-thinking.event.json +4 -2
  13. package/fixtures/progress-tool-scheduled.event.json +8 -2
  14. package/fixtures/progress-tool-started.event.json +5 -2
  15. package/fixtures/progress-waiting.event.json +4 -2
  16. package/fixtures/queue-reorder.response.json +24 -2
  17. package/fixtures/request-cancel-waiting.response.json +26 -4
  18. package/fixtures/request-cancel.response.json +26 -4
  19. package/fixtures/session-start.response.json +39 -9
  20. package/fixtures/system-failed.event.json +5 -2
  21. package/fixtures/thread-archive.response.json +36 -5
  22. package/fixtures/thread-create.response.json +35 -5
  23. package/fixtures/thread-load.response.json +26 -5
  24. package/fixtures/thread-rotate.response.json +45 -6
  25. package/fixtures/turn-submit-waiting.response.json +28 -6
  26. package/fixtures/turn-submit.response.json +27 -5
  27. package/manifest/targets.v1.json +2 -1
  28. package/package.json +1 -1
  29. package/protocol.json +1 -1
  30. package/schema/conversation-frame.v2.schema.json +440 -157
  31. package/schema/execution/envelope.v1.schema.json +8 -27
@@ -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
  }
@@ -7,8 +7,11 @@
7
7
  "threadId": "thread-1",
8
8
  "requestId": "request-1",
9
9
  "baseSnapshotVersion": 3,
10
- "offset": 7,
11
10
  "occurredAt": "2026-08-22T00:00:06Z",
12
- "data": { "code": "AGENT_UNAVAILABLE", "message": "Agent connection was lost" }
11
+ "data": {
12
+ "code": "AGENT_UNAVAILABLE",
13
+ "message": "Agent connection was lost"
14
+ },
15
+ "sequence": 7
13
16
  }
14
17
  }
@@ -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,10 +2,31 @@
2
2
  "target": "/chat/thread/load",
3
3
  "direction": "response",
4
4
  "body": {
5
- "thread": { "threadId": "thread-2", "title": "New conversation", "state": "active", "createdAt": "2026-08-22T00:00:00Z", "updatedAt": "2026-08-22T00:00:00Z", "archivedAt": null, "purgeAfter": null },
6
- "session": { "activityAtUnixMs": 0 },
7
- "sync": { "mode": "snapshot", "snapshot": { "version": 0, "messages": [], "activeRun": null, "pendingInteraction": null, "runOutcomes": [] } },
8
- "live": { "baseSnapshotVersion": 0, "lastOffset": 0, "events": [] },
9
- "queue": { "queueVersion": 0, "items": [] }
5
+ "thread": {
6
+ "threadId": "thread-2",
7
+ "title": "New conversation",
8
+ "state": "active",
9
+ "createdAt": "2026-08-22T00:00:00Z",
10
+ "updatedAt": "2026-08-22T00:00:00Z",
11
+ "archivedAt": null,
12
+ "purgeAfter": null
13
+ },
14
+ "session": {
15
+ "activityAtUnixMs": 0
16
+ },
17
+ "sync": {
18
+ "mode": "snapshot",
19
+ "snapshot": {
20
+ "version": 0,
21
+ "messages": [],
22
+ "activeRun": null,
23
+ "pendingInteraction": null,
24
+ "runOutcomes": []
25
+ }
26
+ },
27
+ "queue": {
28
+ "queueVersion": 0,
29
+ "items": []
30
+ }
10
31
  }
11
32
  }
@@ -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.3.0",
3
+ "contractVersion": "3.6.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.3.0",
3
+ "version": "3.6.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.3.0",
3
+ "contractVersion": "3.6.0",
4
4
  "manifest": "manifest/targets.v1.json",
5
5
  "schemas": {
6
6
  "frame": "schema/conversation-frame.v2.schema.json",