@canonmsg/backend-contracts 1.7.1 → 1.8.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 (192) hide show
  1. package/dist/agentBehaviorPolicy.d.ts +86 -45
  2. package/dist/agentBehaviorPolicy.js +53 -0
  3. package/dist/bridgeLocal.d.ts +1729 -0
  4. package/dist/bridgeLocal.js +673 -0
  5. package/dist/cjs/agentBehaviorPolicy.js +54 -1
  6. package/dist/cjs/bridgeLocal.js +676 -0
  7. package/dist/cjs/contactRequest.js +30 -0
  8. package/dist/cjs/controlSignals.js +44 -0
  9. package/dist/cjs/endpointRegistry.js +264 -0
  10. package/dist/cjs/hitl.js +171 -0
  11. package/dist/cjs/inboundFrame.js +92 -0
  12. package/dist/cjs/index.js +8 -0
  13. package/dist/cjs/media.js +13 -0
  14. package/dist/cjs/message.js +64 -0
  15. package/dist/cjs/restEndpoints.js +220 -0
  16. package/dist/cjs/runtimeCardFields.js +58 -1
  17. package/dist/cjs/sendContextual.js +92 -0
  18. package/dist/cjs/sseEvents.js +298 -0
  19. package/dist/cjs/turnProtocol.js +41 -1
  20. package/dist/contactRequest.d.ts +42 -23
  21. package/dist/contactRequest.js +29 -0
  22. package/dist/controlSignals.d.ts +55 -0
  23. package/dist/controlSignals.js +41 -0
  24. package/dist/endpointRegistry.d.ts +13 -0
  25. package/dist/endpointRegistry.js +261 -0
  26. package/dist/hitl.d.ts +303 -0
  27. package/dist/hitl.js +168 -0
  28. package/dist/inboundFrame.d.ts +229 -0
  29. package/dist/inboundFrame.js +89 -0
  30. package/dist/index.d.ts +8 -0
  31. package/dist/index.js +8 -0
  32. package/dist/media.d.ts +24 -11
  33. package/dist/media.js +12 -0
  34. package/dist/message.d.ts +133 -50
  35. package/dist/message.js +64 -1
  36. package/dist/restEndpoints.d.ts +496 -0
  37. package/dist/restEndpoints.js +217 -0
  38. package/dist/runtimeCardFields.d.ts +112 -39
  39. package/dist/runtimeCardFields.js +57 -0
  40. package/dist/schemas/agent-behavior-settings-record.schema.json +48 -0
  41. package/dist/schemas/bridge-connection-state-notification.schema.json +19 -0
  42. package/dist/schemas/bridge-get-attachment-params.schema.json +24 -0
  43. package/dist/schemas/bridge-get-attachment-result.schema.json +20 -0
  44. package/dist/schemas/bridge-hello-params.schema.json +42 -0
  45. package/dist/schemas/bridge-hello-result.schema.json +105 -0
  46. package/dist/schemas/bridge-hitl-state.schema.json +38 -0
  47. package/dist/schemas/bridge-ok-result.schema.json +15 -0
  48. package/dist/schemas/bridge-ready-notification.schema.json +79 -0
  49. package/dist/schemas/bridge-resync-reason.schema.json +9 -0
  50. package/dist/schemas/bridge-resync.schema.json +18 -0
  51. package/dist/schemas/bridge-rpc-error.schema.json +19 -0
  52. package/dist/schemas/bridge-rpc-id.schema.json +12 -0
  53. package/dist/schemas/bridge-rpc-notification.schema.json +20 -0
  54. package/dist/schemas/bridge-rpc-request.schema.json +31 -0
  55. package/dist/schemas/bridge-rpc-response.schema.json +81 -0
  56. package/dist/schemas/bridge-status-result.schema.json +76 -0
  57. package/dist/schemas/bridge-upload-media-params.schema.json +28 -0
  58. package/dist/schemas/bridge-upstream-state.schema.json +10 -0
  59. package/dist/schemas/contacts-response.schema.json +52 -0
  60. package/dist/schemas/control-channel-key.schema.json +10 -0
  61. package/dist/schemas/control-primitive-event.schema.json +30 -0
  62. package/dist/schemas/control-primitive-map.schema.json +15 -0
  63. package/dist/schemas/control-session-event.schema.json +26 -0
  64. package/dist/schemas/control-session-node.schema.json +11 -0
  65. package/dist/schemas/control-signal-event.schema.json +35 -0
  66. package/dist/schemas/control-signal-node.schema.json +22 -0
  67. package/dist/schemas/control-signal-type.schema.json +10 -0
  68. package/dist/schemas/conversations-response.schema.json +127 -0
  69. package/dist/schemas/create-contact-request-request.schema.json +17 -0
  70. package/dist/schemas/create-contact-request-response.schema.json +51 -0
  71. package/dist/schemas/create-conversation-request.schema.json +82 -0
  72. package/dist/schemas/create-conversation-response.schema.json +29 -0
  73. package/dist/schemas/delete-message-response.schema.json +11 -0
  74. package/dist/schemas/delivery-intent.schema.json +11 -0
  75. package/dist/schemas/forward-message-request.schema.json +25 -0
  76. package/dist/schemas/forward-message-response.schema.json +35 -0
  77. package/dist/schemas/forwarded-from.schema.json +18 -0
  78. package/dist/schemas/get-messages-query.schema.json +17 -0
  79. package/dist/schemas/hitl-approval-category.schema.json +15 -0
  80. package/dist/schemas/hitl-approval-detail.schema.json +21 -0
  81. package/dist/schemas/hitl-approval-outcome-record.schema.json +33 -0
  82. package/dist/schemas/hitl-approval-reply-record.schema.json +57 -0
  83. package/dist/schemas/hitl-approval-request-record.schema.json +105 -0
  84. package/dist/schemas/hitl-approval-risk.schema.json +11 -0
  85. package/dist/schemas/hitl-card-outcome-record.schema.json +48 -0
  86. package/dist/schemas/hitl-card-reply-record.schema.json +46 -0
  87. package/dist/schemas/hitl-card-request-record.schema.json +73 -0
  88. package/dist/schemas/hitl-input-answers.schema.json +23 -0
  89. package/dist/schemas/hitl-input-kind.schema.json +10 -0
  90. package/dist/schemas/hitl-input-outcome-record.schema.json +46 -0
  91. package/dist/schemas/hitl-input-question.schema.json +54 -0
  92. package/dist/schemas/hitl-input-reply-record.schema.json +44 -0
  93. package/dist/schemas/hitl-input-request-record.schema.json +134 -0
  94. package/dist/schemas/hitl-pending.schema.json +31 -0
  95. package/dist/schemas/hitl-request-accepted.schema.json +18 -0
  96. package/dist/schemas/hitl-request-kind.schema.json +10 -0
  97. package/dist/schemas/hitl-resolution-status.schema.json +10 -0
  98. package/dist/schemas/hitl-resolution.schema.json +38 -0
  99. package/dist/schemas/hitl-session-rule.schema.json +32 -0
  100. package/dist/schemas/inbound-disposition.schema.json +13 -0
  101. package/dist/schemas/inbound-frame-attachment-v1.schema.json +94 -0
  102. package/dist/schemas/inbound-frame-contact-card-v1.schema.json +59 -0
  103. package/dist/schemas/inbound-frame-group-context-v1.schema.json +96 -0
  104. package/dist/schemas/inbound-frame-reply-context-v1.schema.json +261 -0
  105. package/dist/schemas/inbound-frame-shape-v1.schema.json +12 -0
  106. package/dist/schemas/inbound-frame-v1.schema.json +506 -0
  107. package/dist/schemas/mark-read-response.schema.json +11 -0
  108. package/dist/schemas/media-attachment-kind.schema.json +11 -0
  109. package/dist/schemas/media-attachment.schema.json +42 -0
  110. package/dist/schemas/messages-page-response.schema.json +290 -0
  111. package/dist/schemas/participation-decision-input.schema.json +44 -0
  112. package/dist/schemas/participation-history-message.schema.json +23 -0
  113. package/dist/schemas/participation-history-snapshot.schema.json +37 -0
  114. package/dist/schemas/participation-style.schema.json +13 -0
  115. package/dist/schemas/react-request.schema.json +22 -0
  116. package/dist/schemas/react-response.schema.json +35 -0
  117. package/dist/schemas/resolve-admission-request.schema.json +30 -0
  118. package/dist/schemas/resolve-admission-response.schema.json +129 -0
  119. package/dist/schemas/resolved-agent-behavior-policy-record.schema.json +81 -0
  120. package/dist/schemas/rest-contact.schema.json +40 -0
  121. package/dist/schemas/rest-conversation.schema.json +115 -0
  122. package/dist/schemas/rest-message.schema.json +252 -0
  123. package/dist/schemas/rest-ok-response.schema.json +11 -0
  124. package/dist/schemas/rest-session-selection.schema.json +40 -0
  125. package/dist/schemas/runtime-card-field-choice.schema.json +23 -0
  126. package/dist/schemas/runtime-card-field-type.schema.json +17 -0
  127. package/dist/schemas/runtime-card-field.schema.json +180 -0
  128. package/dist/schemas/runtime-card-line-item-column-type.schema.json +12 -0
  129. package/dist/schemas/runtime-card-line-item-column.schema.json +74 -0
  130. package/dist/schemas/send-contextual-deferred-response.schema.json +39 -0
  131. package/dist/schemas/send-contextual-messaged-response.schema.json +42 -0
  132. package/dist/schemas/send-contextual-request.schema.json +103 -0
  133. package/dist/schemas/send-contextual-response.schema.json +105 -0
  134. package/dist/schemas/send-contextual-self-context.schema.json +19 -0
  135. package/dist/schemas/send-contextual-state-response.schema.json +24 -0
  136. package/dist/schemas/send-message-request.schema.json +106 -0
  137. package/dist/schemas/send-message-response.schema.json +14 -0
  138. package/dist/schemas/sender-type.schema.json +9 -0
  139. package/dist/schemas/serialize-message-input.schema.json +29 -0
  140. package/dist/schemas/serialized-agent-client-type.schema.json +12 -0
  141. package/dist/schemas/serialized-contact-card.schema.json +65 -0
  142. package/dist/schemas/serialized-contact-request-status.schema.json +11 -0
  143. package/dist/schemas/serialized-contact-request.schema.json +157 -0
  144. package/dist/schemas/serialized-content-type.schema.json +13 -0
  145. package/dist/schemas/serialized-message.schema.json +249 -0
  146. package/dist/schemas/serialized-reactions.schema.json +14 -0
  147. package/dist/schemas/serialized-sender-type.schema.json +9 -0
  148. package/dist/schemas/set-streaming-request.schema.json +67 -0
  149. package/dist/schemas/set-typing-request.schema.json +25 -0
  150. package/dist/schemas/sse-access-policy.schema.json +10 -0
  151. package/dist/schemas/sse-agent-context-payload.schema.json +57 -0
  152. package/dist/schemas/sse-connected-payload.schema.json +18 -0
  153. package/dist/schemas/sse-contact-payload.schema.json +40 -0
  154. package/dist/schemas/sse-contact-removed-payload.schema.json +14 -0
  155. package/dist/schemas/sse-contact-request-payload.schema.json +157 -0
  156. package/dist/schemas/sse-conversation-updated-payload.schema.json +48 -0
  157. package/dist/schemas/sse-error-payload.schema.json +23 -0
  158. package/dist/schemas/sse-event-envelope.schema.json +42 -0
  159. package/dist/schemas/sse-event-family.schema.json +12 -0
  160. package/dist/schemas/sse-event-type.schema.json +28 -0
  161. package/dist/schemas/sse-heartbeat-payload.schema.json +14 -0
  162. package/dist/schemas/sse-membership-change.schema.json +28 -0
  163. package/dist/schemas/sse-message-created-payload.schema.json +414 -0
  164. package/dist/schemas/sse-message-deleted-payload.schema.json +18 -0
  165. package/dist/schemas/sse-message-updated-payload.schema.json +46 -0
  166. package/dist/schemas/sse-presence-payload.schema.json +21 -0
  167. package/dist/schemas/sse-provenance.schema.json +64 -0
  168. package/dist/schemas/sse-replay-expired-payload.schema.json +21 -0
  169. package/dist/schemas/sse-runtime-control-kind.schema.json +13 -0
  170. package/dist/schemas/sse-runtime-control-payload.schema.json +44 -0
  171. package/dist/schemas/sse-runtime-updated-payload.schema.json +78 -0
  172. package/dist/schemas/sse-self-context.schema.json +45 -0
  173. package/dist/schemas/sse-turn-dispatch.schema.json +29 -0
  174. package/dist/schemas/sse-turn-updated-payload.schema.json +33 -0
  175. package/dist/schemas/sse-typing-payload.schema.json +32 -0
  176. package/dist/schemas/sse-voice-session-event-payload.schema.json +170 -0
  177. package/dist/schemas/sse-voice-session.schema.json +157 -0
  178. package/dist/schemas/trigger-decision.schema.json +27 -0
  179. package/dist/schemas/turn-lifecycle-state.schema.json +14 -0
  180. package/dist/schemas/turn-message-semantics.schema.json +10 -0
  181. package/dist/schemas/turn-metadata.schema.json +56 -0
  182. package/dist/schemas/turn-state-like.schema.json +39 -0
  183. package/dist/schemas/update-disposition-request.schema.json +22 -0
  184. package/dist/schemas/upload-media-request.schema.json +25 -0
  185. package/dist/schemas/upload-media-response.schema.json +55 -0
  186. package/dist/sendContextual.d.ts +114 -0
  187. package/dist/sendContextual.js +89 -0
  188. package/dist/sseEvents.d.ts +494 -0
  189. package/dist/sseEvents.js +295 -0
  190. package/dist/turnProtocol.d.ts +91 -24
  191. package/dist/turnProtocol.js +40 -0
  192. package/package.json +8 -5
@@ -0,0 +1,78 @@
1
+ {
2
+ "$id": "canon:SseRuntimeUpdatedPayloadSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "agentId": {
10
+ "type": "string"
11
+ },
12
+ "runtime": {
13
+ "anyOf": [
14
+ {
15
+ "type": "object",
16
+ "propertyNames": {
17
+ "type": "string"
18
+ },
19
+ "additionalProperties": {}
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ },
26
+ "runtimeInfo": {
27
+ "anyOf": [
28
+ {
29
+ "type": "object",
30
+ "propertyNames": {
31
+ "type": "string"
32
+ },
33
+ "additionalProperties": {}
34
+ },
35
+ {
36
+ "type": "null"
37
+ }
38
+ ]
39
+ },
40
+ "sessionState": {
41
+ "anyOf": [
42
+ {
43
+ "type": "object",
44
+ "propertyNames": {
45
+ "type": "string"
46
+ },
47
+ "additionalProperties": {}
48
+ },
49
+ {
50
+ "type": "null"
51
+ }
52
+ ]
53
+ },
54
+ "sessionConfig": {
55
+ "anyOf": [
56
+ {
57
+ "type": "object",
58
+ "propertyNames": {
59
+ "type": "string"
60
+ },
61
+ "additionalProperties": {}
62
+ },
63
+ {
64
+ "type": "null"
65
+ }
66
+ ]
67
+ }
68
+ },
69
+ "required": [
70
+ "conversationId",
71
+ "agentId",
72
+ "runtime",
73
+ "runtimeInfo",
74
+ "sessionState",
75
+ "sessionConfig"
76
+ ],
77
+ "additionalProperties": false
78
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$id": "canon:SseSelfContextSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string"
8
+ },
9
+ "type": {
10
+ "type": "string",
11
+ "const": "cross_session"
12
+ },
13
+ "context": {
14
+ "type": "string"
15
+ },
16
+ "createdAt": {
17
+ "anyOf": [
18
+ {
19
+ "type": "string"
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ },
26
+ "updatedAt": {
27
+ "anyOf": [
28
+ {
29
+ "type": "string"
30
+ },
31
+ {
32
+ "type": "null"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ "required": [
38
+ "id",
39
+ "type",
40
+ "context",
41
+ "createdAt",
42
+ "updatedAt"
43
+ ],
44
+ "additionalProperties": false
45
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$id": "canon:SseTurnDispatchSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "enum": [
9
+ "run_turn",
10
+ "observe_only"
11
+ ]
12
+ },
13
+ "reason": {
14
+ "type": "string"
15
+ },
16
+ "addressed": {
17
+ "type": "boolean"
18
+ },
19
+ "policyVersion": {
20
+ "type": "string"
21
+ }
22
+ },
23
+ "required": [
24
+ "kind",
25
+ "reason",
26
+ "addressed"
27
+ ],
28
+ "additionalProperties": {}
29
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "canon:SseTurnUpdatedPayloadSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "agentId": {
10
+ "type": "string"
11
+ },
12
+ "turn": {
13
+ "anyOf": [
14
+ {
15
+ "type": "object",
16
+ "propertyNames": {
17
+ "type": "string"
18
+ },
19
+ "additionalProperties": {}
20
+ },
21
+ {
22
+ "type": "null"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ "required": [
28
+ "conversationId",
29
+ "agentId",
30
+ "turn"
31
+ ],
32
+ "additionalProperties": false
33
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$id": "canon:SseTypingPayloadSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "userId": {
10
+ "type": "string"
11
+ },
12
+ "isTyping": {
13
+ "type": "boolean"
14
+ },
15
+ "status": {
16
+ "type": "string",
17
+ "enum": [
18
+ "thinking",
19
+ "typing"
20
+ ]
21
+ },
22
+ "timestamp": {
23
+ "type": "number"
24
+ }
25
+ },
26
+ "required": [
27
+ "conversationId",
28
+ "userId",
29
+ "isTyping"
30
+ ],
31
+ "additionalProperties": false
32
+ }
@@ -0,0 +1,170 @@
1
+ {
2
+ "$id": "canon:SseVoiceSessionEventPayloadSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "session": {
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "conversationId": {
16
+ "type": "string"
17
+ },
18
+ "roomName": {
19
+ "type": "string"
20
+ },
21
+ "mode": {
22
+ "type": "string",
23
+ "enum": [
24
+ "human",
25
+ "runtime_voice"
26
+ ]
27
+ },
28
+ "status": {
29
+ "type": "string",
30
+ "enum": [
31
+ "active",
32
+ "ended",
33
+ "error"
34
+ ]
35
+ },
36
+ "createdBy": {
37
+ "type": "string"
38
+ },
39
+ "participantIds": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "participants": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "object",
49
+ "properties": {
50
+ "userId": {
51
+ "type": "string"
52
+ },
53
+ "userType": {
54
+ "type": "string",
55
+ "enum": [
56
+ "human",
57
+ "ai_agent",
58
+ "system"
59
+ ]
60
+ },
61
+ "displayName": {
62
+ "anyOf": [
63
+ {
64
+ "type": "string"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ]
70
+ },
71
+ "joinedAt": {
72
+ "anyOf": [
73
+ {
74
+ "type": "string"
75
+ },
76
+ {
77
+ "type": "null"
78
+ }
79
+ ]
80
+ },
81
+ "leftAt": {
82
+ "anyOf": [
83
+ {
84
+ "type": "string"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ "required": [
93
+ "userId",
94
+ "userType",
95
+ "displayName",
96
+ "joinedAt",
97
+ "leftAt"
98
+ ],
99
+ "additionalProperties": {}
100
+ }
101
+ },
102
+ "targetAgentId": {
103
+ "anyOf": [
104
+ {
105
+ "type": "string"
106
+ },
107
+ {
108
+ "type": "null"
109
+ }
110
+ ]
111
+ },
112
+ "createdAt": {
113
+ "anyOf": [
114
+ {
115
+ "type": "string"
116
+ },
117
+ {
118
+ "type": "null"
119
+ }
120
+ ]
121
+ },
122
+ "updatedAt": {
123
+ "anyOf": [
124
+ {
125
+ "type": "string"
126
+ },
127
+ {
128
+ "type": "null"
129
+ }
130
+ ]
131
+ },
132
+ "endedAt": {
133
+ "anyOf": [
134
+ {
135
+ "type": "string"
136
+ },
137
+ {
138
+ "type": "null"
139
+ }
140
+ ]
141
+ },
142
+ "error": {
143
+ "anyOf": [
144
+ {
145
+ "type": "string"
146
+ },
147
+ {
148
+ "type": "null"
149
+ }
150
+ ]
151
+ }
152
+ },
153
+ "required": [
154
+ "id",
155
+ "conversationId",
156
+ "roomName",
157
+ "mode",
158
+ "status",
159
+ "createdBy",
160
+ "participantIds"
161
+ ],
162
+ "additionalProperties": {}
163
+ }
164
+ },
165
+ "required": [
166
+ "conversationId",
167
+ "session"
168
+ ],
169
+ "additionalProperties": false
170
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "$id": "canon:SseVoiceSessionSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string"
8
+ },
9
+ "conversationId": {
10
+ "type": "string"
11
+ },
12
+ "roomName": {
13
+ "type": "string"
14
+ },
15
+ "mode": {
16
+ "type": "string",
17
+ "enum": [
18
+ "human",
19
+ "runtime_voice"
20
+ ]
21
+ },
22
+ "status": {
23
+ "type": "string",
24
+ "enum": [
25
+ "active",
26
+ "ended",
27
+ "error"
28
+ ]
29
+ },
30
+ "createdBy": {
31
+ "type": "string"
32
+ },
33
+ "participantIds": {
34
+ "type": "array",
35
+ "items": {
36
+ "type": "string"
37
+ }
38
+ },
39
+ "participants": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "userId": {
45
+ "type": "string"
46
+ },
47
+ "userType": {
48
+ "type": "string",
49
+ "enum": [
50
+ "human",
51
+ "ai_agent",
52
+ "system"
53
+ ]
54
+ },
55
+ "displayName": {
56
+ "anyOf": [
57
+ {
58
+ "type": "string"
59
+ },
60
+ {
61
+ "type": "null"
62
+ }
63
+ ]
64
+ },
65
+ "joinedAt": {
66
+ "anyOf": [
67
+ {
68
+ "type": "string"
69
+ },
70
+ {
71
+ "type": "null"
72
+ }
73
+ ]
74
+ },
75
+ "leftAt": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string"
79
+ },
80
+ {
81
+ "type": "null"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "required": [
87
+ "userId",
88
+ "userType",
89
+ "displayName",
90
+ "joinedAt",
91
+ "leftAt"
92
+ ],
93
+ "additionalProperties": {}
94
+ }
95
+ },
96
+ "targetAgentId": {
97
+ "anyOf": [
98
+ {
99
+ "type": "string"
100
+ },
101
+ {
102
+ "type": "null"
103
+ }
104
+ ]
105
+ },
106
+ "createdAt": {
107
+ "anyOf": [
108
+ {
109
+ "type": "string"
110
+ },
111
+ {
112
+ "type": "null"
113
+ }
114
+ ]
115
+ },
116
+ "updatedAt": {
117
+ "anyOf": [
118
+ {
119
+ "type": "string"
120
+ },
121
+ {
122
+ "type": "null"
123
+ }
124
+ ]
125
+ },
126
+ "endedAt": {
127
+ "anyOf": [
128
+ {
129
+ "type": "string"
130
+ },
131
+ {
132
+ "type": "null"
133
+ }
134
+ ]
135
+ },
136
+ "error": {
137
+ "anyOf": [
138
+ {
139
+ "type": "string"
140
+ },
141
+ {
142
+ "type": "null"
143
+ }
144
+ ]
145
+ }
146
+ },
147
+ "required": [
148
+ "id",
149
+ "conversationId",
150
+ "roomName",
151
+ "mode",
152
+ "status",
153
+ "createdBy",
154
+ "participantIds"
155
+ ],
156
+ "additionalProperties": {}
157
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "$id": "canon:TriggerDecisionSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "allow": {
7
+ "type": "boolean"
8
+ },
9
+ "semantics": {
10
+ "type": "string",
11
+ "enum": [
12
+ "progress",
13
+ "turn_complete",
14
+ "control"
15
+ ]
16
+ },
17
+ "reason": {
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "allow",
23
+ "semantics",
24
+ "reason"
25
+ ],
26
+ "additionalProperties": false
27
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$id": "canon:TurnLifecycleStateSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "enum": [
6
+ "idle",
7
+ "thinking",
8
+ "streaming",
9
+ "tool",
10
+ "waiting_input",
11
+ "completed",
12
+ "interrupted"
13
+ ]
14
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$id": "canon:TurnMessageSemanticsSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "enum": [
6
+ "progress",
7
+ "turn_complete",
8
+ "control"
9
+ ]
10
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$id": "canon:TurnMetadataSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "turnId": {
7
+ "anyOf": [
8
+ {
9
+ "type": "string"
10
+ },
11
+ {
12
+ "type": "null"
13
+ }
14
+ ]
15
+ },
16
+ "turnSemantics": {
17
+ "type": "string",
18
+ "enum": [
19
+ "progress",
20
+ "turn_complete",
21
+ "control"
22
+ ]
23
+ },
24
+ "deliveryIntent": {
25
+ "type": "string",
26
+ "enum": [
27
+ "queue",
28
+ "interrupt",
29
+ "interleave",
30
+ "stop"
31
+ ]
32
+ },
33
+ "replyBehavior": {
34
+ "type": "string",
35
+ "enum": [
36
+ "allow_auto_reply",
37
+ "suppress_auto_reply"
38
+ ]
39
+ },
40
+ "inboundDisposition": {
41
+ "type": "string",
42
+ "enum": [
43
+ "queued",
44
+ "accepted_now",
45
+ "interleaved",
46
+ "trigger_suppressed",
47
+ "rejected",
48
+ "cancelled"
49
+ ]
50
+ },
51
+ "requestedTurnMode": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "additionalProperties": false
56
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$id": "canon:TurnStateLikeSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "state": {
7
+ "type": "string",
8
+ "enum": [
9
+ "idle",
10
+ "thinking",
11
+ "streaming",
12
+ "tool",
13
+ "waiting_input",
14
+ "completed",
15
+ "interrupted"
16
+ ]
17
+ },
18
+ "openedAt": {
19
+ "type": "number"
20
+ },
21
+ "updatedAt": {
22
+ "type": "number"
23
+ },
24
+ "turnUpdatedAt": {
25
+ "anyOf": [
26
+ {
27
+ "type": "number"
28
+ },
29
+ {
30
+ "type": "null"
31
+ }
32
+ ]
33
+ }
34
+ },
35
+ "required": [
36
+ "state"
37
+ ],
38
+ "additionalProperties": false
39
+ }