@canonmsg/backend-contracts 1.7.0 → 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 -2
  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 -1
  192. package/package.json +8 -5
@@ -0,0 +1,105 @@
1
+ {
2
+ "$id": "canon:BridgeHelloResultSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "protocolVersion": {
7
+ "type": "number"
8
+ },
9
+ "agentId": {
10
+ "type": "string"
11
+ },
12
+ "agentName": {
13
+ "type": "string"
14
+ },
15
+ "agentContext": {
16
+ "type": "object",
17
+ "properties": {
18
+ "agentId": {
19
+ "type": "string"
20
+ },
21
+ "canonContactId": {
22
+ "type": "string"
23
+ },
24
+ "clientType": {
25
+ "type": "string"
26
+ },
27
+ "ownerId": {
28
+ "type": "string"
29
+ },
30
+ "ownerName": {
31
+ "type": "string"
32
+ },
33
+ "defaultBehavior": {
34
+ "type": "object",
35
+ "propertyNames": {
36
+ "type": "string"
37
+ },
38
+ "additionalProperties": {}
39
+ },
40
+ "inboundPolicy": {
41
+ "type": "string",
42
+ "enum": [
43
+ "open",
44
+ "approval-required",
45
+ "owner-only"
46
+ ]
47
+ },
48
+ "groupJoinPolicy": {
49
+ "type": "string",
50
+ "enum": [
51
+ "open",
52
+ "approval-required",
53
+ "owner-only"
54
+ ]
55
+ },
56
+ "discoverable": {
57
+ "type": "boolean"
58
+ }
59
+ },
60
+ "required": [
61
+ "agentId",
62
+ "ownerId",
63
+ "ownerName",
64
+ "inboundPolicy",
65
+ "groupJoinPolicy",
66
+ "discoverable"
67
+ ],
68
+ "additionalProperties": {}
69
+ },
70
+ "sinceCursor": {
71
+ "anyOf": [
72
+ {
73
+ "type": "string"
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ]
79
+ },
80
+ "resync": {
81
+ "type": "object",
82
+ "properties": {
83
+ "reason": {
84
+ "type": "string",
85
+ "enum": [
86
+ "cursor-expired",
87
+ "unknown-cursor"
88
+ ]
89
+ }
90
+ },
91
+ "required": [
92
+ "reason"
93
+ ],
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "required": [
98
+ "protocolVersion",
99
+ "agentId",
100
+ "agentName",
101
+ "agentContext",
102
+ "sinceCursor"
103
+ ],
104
+ "additionalProperties": false
105
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$id": "canon:BridgeHitlStateSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "status": {
7
+ "anyOf": [
8
+ {
9
+ "type": "string",
10
+ "const": "pending"
11
+ },
12
+ {
13
+ "type": "string",
14
+ "enum": [
15
+ "submitted",
16
+ "cancelled",
17
+ "timeout"
18
+ ]
19
+ }
20
+ ]
21
+ },
22
+ "answer": {
23
+ "type": "object",
24
+ "propertyNames": {
25
+ "type": "string"
26
+ },
27
+ "additionalProperties": {}
28
+ },
29
+ "expiresAt": {
30
+ "type": "string"
31
+ }
32
+ },
33
+ "required": [
34
+ "status",
35
+ "expiresAt"
36
+ ],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$id": "canon:BridgeOkResultSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "ok": {
7
+ "type": "boolean",
8
+ "const": true
9
+ }
10
+ },
11
+ "required": [
12
+ "ok"
13
+ ],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$id": "canon:BridgeReadyNotificationSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "agentId": {
7
+ "type": "string"
8
+ },
9
+ "agentContext": {
10
+ "type": "object",
11
+ "properties": {
12
+ "agentId": {
13
+ "type": "string"
14
+ },
15
+ "canonContactId": {
16
+ "type": "string"
17
+ },
18
+ "clientType": {
19
+ "type": "string"
20
+ },
21
+ "ownerId": {
22
+ "type": "string"
23
+ },
24
+ "ownerName": {
25
+ "type": "string"
26
+ },
27
+ "defaultBehavior": {
28
+ "type": "object",
29
+ "propertyNames": {
30
+ "type": "string"
31
+ },
32
+ "additionalProperties": {}
33
+ },
34
+ "inboundPolicy": {
35
+ "type": "string",
36
+ "enum": [
37
+ "open",
38
+ "approval-required",
39
+ "owner-only"
40
+ ]
41
+ },
42
+ "groupJoinPolicy": {
43
+ "type": "string",
44
+ "enum": [
45
+ "open",
46
+ "approval-required",
47
+ "owner-only"
48
+ ]
49
+ },
50
+ "discoverable": {
51
+ "type": "boolean"
52
+ }
53
+ },
54
+ "required": [
55
+ "agentId",
56
+ "ownerId",
57
+ "ownerName",
58
+ "inboundPolicy",
59
+ "groupJoinPolicy",
60
+ "discoverable"
61
+ ],
62
+ "additionalProperties": {}
63
+ },
64
+ "upstreamState": {
65
+ "type": "string",
66
+ "enum": [
67
+ "connected",
68
+ "reconnecting",
69
+ "down"
70
+ ]
71
+ }
72
+ },
73
+ "required": [
74
+ "agentId",
75
+ "agentContext",
76
+ "upstreamState"
77
+ ],
78
+ "additionalProperties": false
79
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "canon:BridgeResyncReasonSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "enum": [
6
+ "cursor-expired",
7
+ "unknown-cursor"
8
+ ]
9
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$id": "canon:BridgeResyncSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "reason": {
7
+ "type": "string",
8
+ "enum": [
9
+ "cursor-expired",
10
+ "unknown-cursor"
11
+ ]
12
+ }
13
+ },
14
+ "required": [
15
+ "reason"
16
+ ],
17
+ "additionalProperties": false
18
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$id": "canon:BridgeRpcErrorSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "code": {
7
+ "type": "number"
8
+ },
9
+ "message": {
10
+ "type": "string"
11
+ },
12
+ "data": {}
13
+ },
14
+ "required": [
15
+ "code",
16
+ "message"
17
+ ],
18
+ "additionalProperties": false
19
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$id": "canon:BridgeRpcIdSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "anyOf": [
5
+ {
6
+ "type": "string"
7
+ },
8
+ {
9
+ "type": "number"
10
+ }
11
+ ]
12
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$id": "canon:BridgeRpcNotificationSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "jsonrpc": {
7
+ "type": "string",
8
+ "const": "2.0"
9
+ },
10
+ "method": {
11
+ "type": "string"
12
+ },
13
+ "params": {}
14
+ },
15
+ "required": [
16
+ "jsonrpc",
17
+ "method"
18
+ ],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$id": "canon:BridgeRpcRequestSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "jsonrpc": {
7
+ "type": "string",
8
+ "const": "2.0"
9
+ },
10
+ "id": {
11
+ "anyOf": [
12
+ {
13
+ "type": "string"
14
+ },
15
+ {
16
+ "type": "number"
17
+ }
18
+ ]
19
+ },
20
+ "method": {
21
+ "type": "string"
22
+ },
23
+ "params": {}
24
+ },
25
+ "required": [
26
+ "jsonrpc",
27
+ "id",
28
+ "method"
29
+ ],
30
+ "additionalProperties": false
31
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$id": "canon:BridgeRpcResponseSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "anyOf": [
5
+ {
6
+ "type": "object",
7
+ "properties": {
8
+ "jsonrpc": {
9
+ "type": "string",
10
+ "const": "2.0"
11
+ },
12
+ "id": {
13
+ "anyOf": [
14
+ {
15
+ "type": "string"
16
+ },
17
+ {
18
+ "type": "number"
19
+ }
20
+ ]
21
+ },
22
+ "result": {}
23
+ },
24
+ "required": [
25
+ "jsonrpc",
26
+ "id",
27
+ "result"
28
+ ],
29
+ "additionalProperties": false
30
+ },
31
+ {
32
+ "type": "object",
33
+ "properties": {
34
+ "jsonrpc": {
35
+ "type": "string",
36
+ "const": "2.0"
37
+ },
38
+ "id": {
39
+ "anyOf": [
40
+ {
41
+ "anyOf": [
42
+ {
43
+ "type": "string"
44
+ },
45
+ {
46
+ "type": "number"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "type": "null"
52
+ }
53
+ ]
54
+ },
55
+ "error": {
56
+ "type": "object",
57
+ "properties": {
58
+ "code": {
59
+ "type": "number"
60
+ },
61
+ "message": {
62
+ "type": "string"
63
+ },
64
+ "data": {}
65
+ },
66
+ "required": [
67
+ "code",
68
+ "message"
69
+ ],
70
+ "additionalProperties": false
71
+ }
72
+ },
73
+ "required": [
74
+ "jsonrpc",
75
+ "id",
76
+ "error"
77
+ ],
78
+ "additionalProperties": false
79
+ }
80
+ ]
81
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$id": "canon:BridgeStatusResultSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "pid": {
7
+ "type": "number"
8
+ },
9
+ "version": {
10
+ "type": "string"
11
+ },
12
+ "protocolVersion": {
13
+ "type": "number"
14
+ },
15
+ "startedAt": {
16
+ "type": "string"
17
+ },
18
+ "uptimeMs": {
19
+ "type": "number"
20
+ },
21
+ "profile": {
22
+ "type": "string"
23
+ },
24
+ "socketPath": {
25
+ "anyOf": [
26
+ {
27
+ "type": "string"
28
+ },
29
+ {
30
+ "type": "null"
31
+ }
32
+ ]
33
+ },
34
+ "agentId": {
35
+ "type": "string"
36
+ },
37
+ "agentName": {
38
+ "type": "string"
39
+ },
40
+ "upstream": {
41
+ "type": "string",
42
+ "enum": [
43
+ "connected",
44
+ "reconnecting",
45
+ "down"
46
+ ]
47
+ },
48
+ "connectedClients": {
49
+ "type": "number"
50
+ },
51
+ "counters": {
52
+ "type": "object",
53
+ "propertyNames": {
54
+ "type": "string"
55
+ },
56
+ "additionalProperties": {
57
+ "type": "number"
58
+ }
59
+ }
60
+ },
61
+ "required": [
62
+ "pid",
63
+ "version",
64
+ "protocolVersion",
65
+ "startedAt",
66
+ "uptimeMs",
67
+ "profile",
68
+ "socketPath",
69
+ "agentId",
70
+ "agentName",
71
+ "upstream",
72
+ "connectedClients",
73
+ "counters"
74
+ ],
75
+ "additionalProperties": false
76
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$id": "canon:BridgeUploadMediaParamsSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "path": {
7
+ "type": "string"
8
+ },
9
+ "bytes": {
10
+ "type": "string"
11
+ },
12
+ "mime": {
13
+ "type": "string"
14
+ },
15
+ "fileName": {
16
+ "type": "string"
17
+ },
18
+ "conversationId": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "mime",
24
+ "fileName",
25
+ "conversationId"
26
+ ],
27
+ "additionalProperties": false
28
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$id": "canon:BridgeUpstreamStateSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "enum": [
6
+ "connected",
7
+ "reconnecting",
8
+ "down"
9
+ ]
10
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$id": "canon:ContactsResponseSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "contacts": {
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "id": {
12
+ "type": "string"
13
+ },
14
+ "source": {
15
+ "type": "string"
16
+ },
17
+ "addedAt": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string"
21
+ },
22
+ {
23
+ "type": "null"
24
+ }
25
+ ]
26
+ },
27
+ "displayNameOverride": {
28
+ "anyOf": [
29
+ {
30
+ "type": "string"
31
+ },
32
+ {
33
+ "type": "null"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ "required": [
39
+ "id",
40
+ "source",
41
+ "addedAt",
42
+ "displayNameOverride"
43
+ ],
44
+ "additionalProperties": false
45
+ }
46
+ }
47
+ },
48
+ "required": [
49
+ "contacts"
50
+ ],
51
+ "additionalProperties": false
52
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$id": "canon:ControlChannelKeySchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "string",
5
+ "enum": [
6
+ "session",
7
+ "signal",
8
+ "primitive"
9
+ ]
10
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$id": "canon:ControlPrimitiveEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "requestId": {
10
+ "type": "string"
11
+ },
12
+ "updatedAt": {
13
+ "type": "number"
14
+ },
15
+ "value": {
16
+ "type": "object",
17
+ "propertyNames": {
18
+ "type": "string"
19
+ },
20
+ "additionalProperties": {}
21
+ }
22
+ },
23
+ "required": [
24
+ "conversationId",
25
+ "requestId",
26
+ "updatedAt",
27
+ "value"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$id": "canon:ControlPrimitiveMapSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "propertyNames": {
6
+ "type": "string"
7
+ },
8
+ "additionalProperties": {
9
+ "type": "object",
10
+ "propertyNames": {
11
+ "type": "string"
12
+ },
13
+ "additionalProperties": {}
14
+ }
15
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$id": "canon:ControlSessionEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "updatedAt": {
10
+ "type": "number"
11
+ },
12
+ "control": {
13
+ "type": "object",
14
+ "propertyNames": {
15
+ "type": "string"
16
+ },
17
+ "additionalProperties": {}
18
+ }
19
+ },
20
+ "required": [
21
+ "conversationId",
22
+ "updatedAt",
23
+ "control"
24
+ ],
25
+ "additionalProperties": false
26
+ }