@mhome/conversation-protocol 3.12.0 → 3.13.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 +44 -0
- package/fixtures/talk/audio-transcribe.request.json +9 -0
- package/fixtures/talk/audio-transcribe.response.json +8 -0
- package/fixtures/talk/audio-upload-prepare.request.json +11 -0
- package/fixtures/talk/audio-upload-prepare.response.json +12 -0
- package/fixtures/talk/changed.event.json +9 -0
- package/fixtures/talk/interaction-answer.request.json +13 -0
- package/fixtures/talk/interaction-answer.response.json +8 -0
- package/fixtures/talk/media-resolve.request.json +8 -0
- package/fixtures/talk/media-resolve.response.json +22 -0
- package/fixtures/talk/reply-read.request.json +12 -0
- package/fixtures/talk/reply-read.response.json +15 -0
- package/fixtures/talk/request-cancel.request.json +8 -0
- package/fixtures/talk/request-cancel.response.json +9 -0
- package/fixtures/talk/request-get.request.json +8 -0
- package/fixtures/talk/request-get.response.json +34 -0
- package/fixtures/talk/speech-prepare.request.json +12 -0
- package/fixtures/talk/speech-prepare.response.json +9 -0
- package/fixtures/talk/turn-submit.request.json +10 -0
- package/fixtures/talk/turn-submit.response.json +9 -0
- package/fixtures/talk/view-agent_failed.response.json +34 -0
- package/fixtures/talk/view-completed.response.json +34 -0
- package/fixtures/talk/view-get.request.json +5 -0
- package/fixtures/talk/view-get.response.json +45 -0
- package/fixtures/talk/view-interrupted.response.json +34 -0
- package/fixtures/talk/view-system_failed.response.json +34 -0
- package/manifest/targets.v1.json +23 -2
- package/package.json +1 -1
- package/protocol.json +1 -1
package/README.md
CHANGED
|
@@ -115,3 +115,47 @@ receipt by request ID, returning null admission for an unknown request. It recov
|
|
|
115
115
|
missed `admission.changed` events without reenqueuing or guessing from an empty
|
|
116
116
|
queue. Retry of the original submission still checks its original content, even
|
|
117
117
|
when the queued execution content was later edited.
|
|
118
|
+
|
|
119
|
+
## Pod Talk
|
|
120
|
+
|
|
121
|
+
`talk` is a separate bounded presentation facade for small voice devices. Its
|
|
122
|
+
targets appear under `podTalk` in the target manifest, with independent schema
|
|
123
|
+
`schema/pod-talk.v1.schema.json` and cross-language examples in `fixtures/talk/`.
|
|
124
|
+
The canonical `/chat/*` targets and Agent execution wire remain unchanged.
|
|
125
|
+
|
|
126
|
+
Each view carries the authoritative owner, authenticated conversation surface,
|
|
127
|
+
active thread, control version and exact decimal history version. Personal
|
|
128
|
+
Clients retain their own `cp`; Space Clients share only `cg:space-clients` in the
|
|
129
|
+
same tenant and scope. Admission receipts never establish a run outcome. Results
|
|
130
|
+
are read by original request ID, including after active-thread rotation; unknown
|
|
131
|
+
results remain unknown. Request cancellation may omit the thread and resolve it
|
|
132
|
+
through the original durable admission. No automatic write replay is implied.
|
|
133
|
+
|
|
134
|
+
When the active thread has no running, queued or pending request, a view's
|
|
135
|
+
`settlement` carries the latest run's `requestId` and bounded `outcome`, even
|
|
136
|
+
without assistant text. It is null in other phases. `interaction_required` is
|
|
137
|
+
not a terminal outcome, and reply text alone does not establish success. This
|
|
138
|
+
lets a restarted device or another Pod recover the same terminal presentation
|
|
139
|
+
without persisting a local request. The context's thread identifies the
|
|
140
|
+
settlement; archived-thread results never replace a different active view.
|
|
141
|
+
|
|
142
|
+
Reply offsets count UTF-8 bytes in the immutable plain text identified by
|
|
143
|
+
`contentRevision`. A single bounded window includes explicit next/previous
|
|
144
|
+
offsets. Pending previews mark omissions and prohibit approving incomplete
|
|
145
|
+
previews or unsupported client tasks. Spoken responses target the original
|
|
146
|
+
thread, request and batch, with a second validation before canonical submission.
|
|
147
|
+
|
|
148
|
+
The complete escaped MWS frame is limited to 64 KiB, changed notifications to
|
|
149
|
+
2 KiB, transcripts to 4 KiB UTF-8 and reply windows to 16 KiB. Implementations
|
|
150
|
+
must enforce bytes and parsing depth/node budgets in addition to schema string
|
|
151
|
+
lengths. All egress paths to Pod, including bridged pushes and errors, must honor
|
|
152
|
+
these limits before entering the physical WebSocket queue.
|
|
153
|
+
|
|
154
|
+
Audio uses short-lived binary HTTP grants, not base64 in MWS. Input is mono
|
|
155
|
+
16 kHz PCM16 WAV, 300–30,000 ms and at most 960,044 bytes; metadata, actual bytes
|
|
156
|
+
and SHA-256 must agree. TTS references a formal assistant message, permits only
|
|
157
|
+
finite PCM16 mono WAV at 16/24/48 kHz, at most 32 seconds and 1,536,044 bytes, and
|
|
158
|
+
returns an Artifact reference or text-only reason. Media steps retain the same
|
|
159
|
+
owner. Upload grants and download descriptors reuse the Artifact contract,
|
|
160
|
+
including pinned host identity when the owner is a local Core. Resolve responses
|
|
161
|
+
include the content digest and require signed URLs, never data URLs.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/audio/transcribe",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"ownerId": "core:one",
|
|
6
|
+
"operationId": "operation",
|
|
7
|
+
"uri": "meow-artifact://v3/tenant/space/tmp/man/operation/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/eyJrIjoiYSIsIm0iOiJhdWRpby93YXYiLCJzIjozMjA0NCwiZCI6MTAwMH0"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/audio/upload/prepare",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"ownerId": "core:one",
|
|
6
|
+
"operationId": "operation",
|
|
7
|
+
"sizeBytes": 32044,
|
|
8
|
+
"durationMs": 1000,
|
|
9
|
+
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/interaction/answer",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"ownerId": "core:one",
|
|
6
|
+
"threadId": "thread",
|
|
7
|
+
"requestId": "request",
|
|
8
|
+
"batchId": "batch",
|
|
9
|
+
"operationId": "operation",
|
|
10
|
+
"text": "全部同意",
|
|
11
|
+
"occurredAtUnixMs": 12345
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/media/resolve",
|
|
3
|
+
"direction": "request",
|
|
4
|
+
"body": {
|
|
5
|
+
"ownerId": "core:one",
|
|
6
|
+
"uri": "meow-artifact://v3/tenant/space/tmp/man/operation/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/eyJrIjoiYSIsIm0iOiJhdWRpby93YXYiLCJzIjozMjA0NCwiZCI6MTAwMH0"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/media/resolve",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"descriptor": {
|
|
6
|
+
"uri": "meow-artifact://v3/tenant/space/tmp/man/operation/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/eyJrIjoiYSIsIm0iOiJhdWRpby93YXYiLCJzIjozMjA0NCwiZCI6MTAwMH0",
|
|
7
|
+
"kind": "AUDIO",
|
|
8
|
+
"mimeType": "audio/wav",
|
|
9
|
+
"sizeBytes": 32044,
|
|
10
|
+
"durationMillis": 1000,
|
|
11
|
+
"identity": "man",
|
|
12
|
+
"retention": "tmp",
|
|
13
|
+
"expiresAtUnixMs": 1800000000000,
|
|
14
|
+
"delivery": {
|
|
15
|
+
"type": "SIGNED_URL",
|
|
16
|
+
"url": "https://core.example/audio/read",
|
|
17
|
+
"expiresAtUnixMs": 1800000000000
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/reply/read",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"threadId": "thread",
|
|
6
|
+
"requestId": "request",
|
|
7
|
+
"messageId": "message",
|
|
8
|
+
"contentRevision": "revision",
|
|
9
|
+
"offset": 6,
|
|
10
|
+
"nextOffset": null,
|
|
11
|
+
"previousOffset": 0,
|
|
12
|
+
"text": "done",
|
|
13
|
+
"hasUnsupportedParts": false
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/request/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"requestId": "request",
|
|
14
|
+
"admission": "bound",
|
|
15
|
+
"phase": "settled",
|
|
16
|
+
"outcome": {
|
|
17
|
+
"status": "completed",
|
|
18
|
+
"errorCode": null,
|
|
19
|
+
"message": null
|
|
20
|
+
},
|
|
21
|
+
"pending": null,
|
|
22
|
+
"reply": {
|
|
23
|
+
"threadId": "thread",
|
|
24
|
+
"requestId": "request",
|
|
25
|
+
"messageId": "message",
|
|
26
|
+
"contentRevision": "revision",
|
|
27
|
+
"offset": 0,
|
|
28
|
+
"nextOffset": 6,
|
|
29
|
+
"previousOffset": null,
|
|
30
|
+
"text": "猫猫",
|
|
31
|
+
"hasUnsupportedParts": false
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/view/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"capabilities": {
|
|
14
|
+
"submit": true,
|
|
15
|
+
"answer": true,
|
|
16
|
+
"transcribe": true,
|
|
17
|
+
"speak": true,
|
|
18
|
+
"unavailableReason": null
|
|
19
|
+
},
|
|
20
|
+
"phase": "settled",
|
|
21
|
+
"activeRequestId": null,
|
|
22
|
+
"queueCount": 0,
|
|
23
|
+
"pending": null,
|
|
24
|
+
"reply": null,
|
|
25
|
+
"settlement": {
|
|
26
|
+
"requestId": "request",
|
|
27
|
+
"outcome": {
|
|
28
|
+
"status": "agent_failed",
|
|
29
|
+
"errorCode": null,
|
|
30
|
+
"message": null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/view/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"capabilities": {
|
|
14
|
+
"submit": true,
|
|
15
|
+
"answer": true,
|
|
16
|
+
"transcribe": true,
|
|
17
|
+
"speak": true,
|
|
18
|
+
"unavailableReason": null
|
|
19
|
+
},
|
|
20
|
+
"phase": "settled",
|
|
21
|
+
"activeRequestId": null,
|
|
22
|
+
"queueCount": 0,
|
|
23
|
+
"pending": null,
|
|
24
|
+
"reply": null,
|
|
25
|
+
"settlement": {
|
|
26
|
+
"requestId": "request",
|
|
27
|
+
"outcome": {
|
|
28
|
+
"status": "completed",
|
|
29
|
+
"errorCode": null,
|
|
30
|
+
"message": null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/view/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"capabilities": {
|
|
14
|
+
"submit": true,
|
|
15
|
+
"answer": true,
|
|
16
|
+
"transcribe": true,
|
|
17
|
+
"speak": true,
|
|
18
|
+
"unavailableReason": null
|
|
19
|
+
},
|
|
20
|
+
"phase": "pending",
|
|
21
|
+
"activeRequestId": "request",
|
|
22
|
+
"queueCount": 0,
|
|
23
|
+
"pending": {
|
|
24
|
+
"threadId": "thread",
|
|
25
|
+
"requestId": "request",
|
|
26
|
+
"batchId": "batch",
|
|
27
|
+
"text": "Turn off the light?",
|
|
28
|
+
"actionCount": 1,
|
|
29
|
+
"complete": true,
|
|
30
|
+
"canApprove": true
|
|
31
|
+
},
|
|
32
|
+
"reply": {
|
|
33
|
+
"threadId": "thread",
|
|
34
|
+
"requestId": "request",
|
|
35
|
+
"messageId": "message",
|
|
36
|
+
"contentRevision": "revision",
|
|
37
|
+
"offset": 0,
|
|
38
|
+
"nextOffset": 6,
|
|
39
|
+
"previousOffset": null,
|
|
40
|
+
"text": "猫猫",
|
|
41
|
+
"hasUnsupportedParts": false
|
|
42
|
+
},
|
|
43
|
+
"settlement": null
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/view/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"capabilities": {
|
|
14
|
+
"submit": true,
|
|
15
|
+
"answer": true,
|
|
16
|
+
"transcribe": true,
|
|
17
|
+
"speak": true,
|
|
18
|
+
"unavailableReason": null
|
|
19
|
+
},
|
|
20
|
+
"phase": "settled",
|
|
21
|
+
"activeRequestId": null,
|
|
22
|
+
"queueCount": 0,
|
|
23
|
+
"pending": null,
|
|
24
|
+
"reply": null,
|
|
25
|
+
"settlement": {
|
|
26
|
+
"requestId": "request",
|
|
27
|
+
"outcome": {
|
|
28
|
+
"status": "interrupted",
|
|
29
|
+
"errorCode": null,
|
|
30
|
+
"message": null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"target": "/pod/talk/view/get",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"body": {
|
|
5
|
+
"context": {
|
|
6
|
+
"ownerId": "core:one",
|
|
7
|
+
"scopeId": "space",
|
|
8
|
+
"surfaceId": "cs1:cg:c3BhY2UtY2xpZW50cw",
|
|
9
|
+
"threadId": "thread",
|
|
10
|
+
"controlVersion": "00000000000000000001:00000000000000000002",
|
|
11
|
+
"historyVersion": "9007199254740993"
|
|
12
|
+
},
|
|
13
|
+
"capabilities": {
|
|
14
|
+
"submit": true,
|
|
15
|
+
"answer": true,
|
|
16
|
+
"transcribe": true,
|
|
17
|
+
"speak": true,
|
|
18
|
+
"unavailableReason": null
|
|
19
|
+
},
|
|
20
|
+
"phase": "settled",
|
|
21
|
+
"activeRequestId": null,
|
|
22
|
+
"queueCount": 0,
|
|
23
|
+
"pending": null,
|
|
24
|
+
"reply": null,
|
|
25
|
+
"settlement": {
|
|
26
|
+
"requestId": "request",
|
|
27
|
+
"outcome": {
|
|
28
|
+
"status": "system_failed",
|
|
29
|
+
"errorCode": null,
|
|
30
|
+
"message": null
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/manifest/targets.v1.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest": "mhome.conversation.targets.v1",
|
|
3
|
-
"contractVersion": "3.
|
|
3
|
+
"contractVersion": "3.13.0",
|
|
4
4
|
"requestTargets": [
|
|
5
5
|
"/chat/control/get",
|
|
6
6
|
"/chat/thread/list",
|
|
@@ -21,5 +21,26 @@
|
|
|
21
21
|
"eventTargets": [
|
|
22
22
|
"/chat/event",
|
|
23
23
|
"/chat/debug"
|
|
24
|
-
]
|
|
24
|
+
],
|
|
25
|
+
"podTalk": {
|
|
26
|
+
"requestTargets": [
|
|
27
|
+
"/pod/talk/view/get",
|
|
28
|
+
"/pod/talk/turn/submit",
|
|
29
|
+
"/pod/talk/request/get",
|
|
30
|
+
"/pod/talk/request/cancel",
|
|
31
|
+
"/pod/talk/reply/read",
|
|
32
|
+
"/pod/talk/interaction/answer",
|
|
33
|
+
"/pod/talk/audio/upload/prepare",
|
|
34
|
+
"/pod/talk/audio/transcribe",
|
|
35
|
+
"/pod/talk/speech/prepare",
|
|
36
|
+
"/pod/talk/media/resolve"
|
|
37
|
+
],
|
|
38
|
+
"eventTargets": [
|
|
39
|
+
"/pod/talk/changed"
|
|
40
|
+
],
|
|
41
|
+
"frameBytes": 65536,
|
|
42
|
+
"changedBytes": 2048,
|
|
43
|
+
"textBytes": 4096,
|
|
44
|
+
"replyBytes": 16384
|
|
45
|
+
}
|
|
25
46
|
}
|
package/package.json
CHANGED