@canonmsg/backend-contracts 1.8.0 → 1.9.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,138 @@
1
+ {
2
+ "$id": "canon:BridgePublishStreamingEventParamsSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "conversationId": {
7
+ "type": "string"
8
+ },
9
+ "turnId": {
10
+ "anyOf": [
11
+ {
12
+ "type": "string"
13
+ },
14
+ {
15
+ "type": "null"
16
+ }
17
+ ]
18
+ },
19
+ "messageId": {
20
+ "type": "string"
21
+ },
22
+ "event": {
23
+ "oneOf": [
24
+ {
25
+ "type": "object",
26
+ "properties": {
27
+ "kind": {
28
+ "type": "string",
29
+ "const": "text"
30
+ },
31
+ "id": {
32
+ "type": "string"
33
+ },
34
+ "mode": {
35
+ "type": "string",
36
+ "enum": [
37
+ "append",
38
+ "replace"
39
+ ]
40
+ },
41
+ "text": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "required": [
46
+ "kind",
47
+ "id",
48
+ "mode",
49
+ "text"
50
+ ],
51
+ "additionalProperties": false
52
+ },
53
+ {
54
+ "type": "object",
55
+ "properties": {
56
+ "kind": {
57
+ "type": "string",
58
+ "const": "tool"
59
+ },
60
+ "id": {
61
+ "type": "string"
62
+ },
63
+ "status": {
64
+ "type": "string",
65
+ "enum": [
66
+ "running",
67
+ "completed",
68
+ "failed"
69
+ ]
70
+ },
71
+ "title": {
72
+ "type": "string"
73
+ },
74
+ "summary": {
75
+ "type": "string"
76
+ },
77
+ "detail": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "required": [
82
+ "kind",
83
+ "id"
84
+ ],
85
+ "additionalProperties": false
86
+ },
87
+ {
88
+ "type": "object",
89
+ "properties": {
90
+ "kind": {
91
+ "type": "string",
92
+ "const": "thinking"
93
+ }
94
+ },
95
+ "required": [
96
+ "kind"
97
+ ],
98
+ "additionalProperties": false
99
+ },
100
+ {
101
+ "type": "object",
102
+ "properties": {
103
+ "kind": {
104
+ "type": "string",
105
+ "const": "final"
106
+ },
107
+ "text": {
108
+ "type": "string"
109
+ }
110
+ },
111
+ "required": [
112
+ "kind",
113
+ "text"
114
+ ],
115
+ "additionalProperties": false
116
+ },
117
+ {
118
+ "type": "object",
119
+ "properties": {
120
+ "kind": {
121
+ "type": "string",
122
+ "const": "clear"
123
+ }
124
+ },
125
+ "required": [
126
+ "kind"
127
+ ],
128
+ "additionalProperties": false
129
+ }
130
+ ]
131
+ }
132
+ },
133
+ "required": [
134
+ "conversationId",
135
+ "event"
136
+ ],
137
+ "additionalProperties": false
138
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$id": "canon:BridgeStreamClearEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "clear"
9
+ }
10
+ },
11
+ "required": [
12
+ "kind"
13
+ ],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "$id": "canon:BridgeStreamEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "oneOf": [
5
+ {
6
+ "type": "object",
7
+ "properties": {
8
+ "kind": {
9
+ "type": "string",
10
+ "const": "text"
11
+ },
12
+ "id": {
13
+ "type": "string"
14
+ },
15
+ "mode": {
16
+ "type": "string",
17
+ "enum": [
18
+ "append",
19
+ "replace"
20
+ ]
21
+ },
22
+ "text": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": [
27
+ "kind",
28
+ "id",
29
+ "mode",
30
+ "text"
31
+ ],
32
+ "additionalProperties": false
33
+ },
34
+ {
35
+ "type": "object",
36
+ "properties": {
37
+ "kind": {
38
+ "type": "string",
39
+ "const": "tool"
40
+ },
41
+ "id": {
42
+ "type": "string"
43
+ },
44
+ "status": {
45
+ "type": "string",
46
+ "enum": [
47
+ "running",
48
+ "completed",
49
+ "failed"
50
+ ]
51
+ },
52
+ "title": {
53
+ "type": "string"
54
+ },
55
+ "summary": {
56
+ "type": "string"
57
+ },
58
+ "detail": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "required": [
63
+ "kind",
64
+ "id"
65
+ ],
66
+ "additionalProperties": false
67
+ },
68
+ {
69
+ "type": "object",
70
+ "properties": {
71
+ "kind": {
72
+ "type": "string",
73
+ "const": "thinking"
74
+ }
75
+ },
76
+ "required": [
77
+ "kind"
78
+ ],
79
+ "additionalProperties": false
80
+ },
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "kind": {
85
+ "type": "string",
86
+ "const": "final"
87
+ },
88
+ "text": {
89
+ "type": "string"
90
+ }
91
+ },
92
+ "required": [
93
+ "kind",
94
+ "text"
95
+ ],
96
+ "additionalProperties": false
97
+ },
98
+ {
99
+ "type": "object",
100
+ "properties": {
101
+ "kind": {
102
+ "type": "string",
103
+ "const": "clear"
104
+ }
105
+ },
106
+ "required": [
107
+ "kind"
108
+ ],
109
+ "additionalProperties": false
110
+ }
111
+ ]
112
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$id": "canon:BridgeStreamFinalEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "final"
9
+ },
10
+ "text": {
11
+ "type": "string"
12
+ }
13
+ },
14
+ "required": [
15
+ "kind",
16
+ "text"
17
+ ],
18
+ "additionalProperties": false
19
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$id": "canon:BridgeStreamTextEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "text"
9
+ },
10
+ "id": {
11
+ "type": "string"
12
+ },
13
+ "mode": {
14
+ "type": "string",
15
+ "enum": [
16
+ "append",
17
+ "replace"
18
+ ]
19
+ },
20
+ "text": {
21
+ "type": "string"
22
+ }
23
+ },
24
+ "required": [
25
+ "kind",
26
+ "id",
27
+ "mode",
28
+ "text"
29
+ ],
30
+ "additionalProperties": false
31
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$id": "canon:BridgeStreamThinkingEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "thinking"
9
+ }
10
+ },
11
+ "required": [
12
+ "kind"
13
+ ],
14
+ "additionalProperties": false
15
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$id": "canon:BridgeStreamToolEventSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "kind": {
7
+ "type": "string",
8
+ "const": "tool"
9
+ },
10
+ "id": {
11
+ "type": "string"
12
+ },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": [
16
+ "running",
17
+ "completed",
18
+ "failed"
19
+ ]
20
+ },
21
+ "title": {
22
+ "type": "string"
23
+ },
24
+ "summary": {
25
+ "type": "string"
26
+ },
27
+ "detail": {
28
+ "type": "string"
29
+ }
30
+ },
31
+ "required": [
32
+ "kind",
33
+ "id"
34
+ ],
35
+ "additionalProperties": false
36
+ }
@@ -63,40 +63,73 @@
63
63
  "type": "object",
64
64
  "properties": {
65
65
  "text": {
66
- "type": "string"
66
+ "anyOf": [
67
+ {
68
+ "type": "string"
69
+ },
70
+ {
71
+ "type": "null"
72
+ }
73
+ ]
67
74
  },
68
75
  "messageId": {
69
76
  "type": "string"
70
77
  },
71
78
  "senderId": {
72
- "type": "string"
79
+ "anyOf": [
80
+ {
81
+ "type": "string"
82
+ },
83
+ {
84
+ "type": "null"
85
+ }
86
+ ]
73
87
  },
74
88
  "senderType": {
75
- "type": "string",
76
- "enum": [
77
- "human",
78
- "ai_agent"
89
+ "anyOf": [
90
+ {
91
+ "type": "string",
92
+ "enum": [
93
+ "human",
94
+ "ai_agent"
95
+ ]
96
+ },
97
+ {
98
+ "type": "null"
99
+ }
79
100
  ]
80
101
  },
81
102
  "contentType": {
82
- "type": "string",
83
- "enum": [
84
- "text",
85
- "image",
86
- "audio",
87
- "video",
88
- "file",
89
- "contact_card"
103
+ "anyOf": [
104
+ {
105
+ "type": "string",
106
+ "enum": [
107
+ "text",
108
+ "image",
109
+ "audio",
110
+ "video",
111
+ "file",
112
+ "contact_card"
113
+ ]
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
90
118
  ]
91
119
  },
92
120
  "timestamp": {
93
- "type": "string"
121
+ "anyOf": [
122
+ {
123
+ "type": "string"
124
+ },
125
+ {
126
+ "type": "null"
127
+ }
128
+ ]
94
129
  }
95
130
  },
96
131
  "required": [
97
132
  "text",
98
- "senderId",
99
- "senderType",
100
133
  "timestamp"
101
134
  ],
102
135
  "additionalProperties": {}
@@ -107,7 +140,14 @@
107
140
  ]
108
141
  },
109
142
  "createdAt": {
110
- "type": "string"
143
+ "anyOf": [
144
+ {
145
+ "type": "string"
146
+ },
147
+ {
148
+ "type": "null"
149
+ }
150
+ ]
111
151
  }
112
152
  },
113
153
  "required": [
@@ -0,0 +1,77 @@
1
+ {
2
+ "$id": "canon:RestConversationLastMessageSchema",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "type": "object",
5
+ "properties": {
6
+ "text": {
7
+ "anyOf": [
8
+ {
9
+ "type": "string"
10
+ },
11
+ {
12
+ "type": "null"
13
+ }
14
+ ]
15
+ },
16
+ "messageId": {
17
+ "type": "string"
18
+ },
19
+ "senderId": {
20
+ "anyOf": [
21
+ {
22
+ "type": "string"
23
+ },
24
+ {
25
+ "type": "null"
26
+ }
27
+ ]
28
+ },
29
+ "senderType": {
30
+ "anyOf": [
31
+ {
32
+ "type": "string",
33
+ "enum": [
34
+ "human",
35
+ "ai_agent"
36
+ ]
37
+ },
38
+ {
39
+ "type": "null"
40
+ }
41
+ ]
42
+ },
43
+ "contentType": {
44
+ "anyOf": [
45
+ {
46
+ "type": "string",
47
+ "enum": [
48
+ "text",
49
+ "image",
50
+ "audio",
51
+ "video",
52
+ "file",
53
+ "contact_card"
54
+ ]
55
+ },
56
+ {
57
+ "type": "null"
58
+ }
59
+ ]
60
+ },
61
+ "timestamp": {
62
+ "anyOf": [
63
+ {
64
+ "type": "string"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ]
70
+ }
71
+ },
72
+ "required": [
73
+ "text",
74
+ "timestamp"
75
+ ],
76
+ "additionalProperties": {}
77
+ }
@@ -58,40 +58,73 @@
58
58
  "type": "object",
59
59
  "properties": {
60
60
  "text": {
61
- "type": "string"
61
+ "anyOf": [
62
+ {
63
+ "type": "string"
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ]
62
69
  },
63
70
  "messageId": {
64
71
  "type": "string"
65
72
  },
66
73
  "senderId": {
67
- "type": "string"
74
+ "anyOf": [
75
+ {
76
+ "type": "string"
77
+ },
78
+ {
79
+ "type": "null"
80
+ }
81
+ ]
68
82
  },
69
83
  "senderType": {
70
- "type": "string",
71
- "enum": [
72
- "human",
73
- "ai_agent"
84
+ "anyOf": [
85
+ {
86
+ "type": "string",
87
+ "enum": [
88
+ "human",
89
+ "ai_agent"
90
+ ]
91
+ },
92
+ {
93
+ "type": "null"
94
+ }
74
95
  ]
75
96
  },
76
97
  "contentType": {
77
- "type": "string",
78
- "enum": [
79
- "text",
80
- "image",
81
- "audio",
82
- "video",
83
- "file",
84
- "contact_card"
98
+ "anyOf": [
99
+ {
100
+ "type": "string",
101
+ "enum": [
102
+ "text",
103
+ "image",
104
+ "audio",
105
+ "video",
106
+ "file",
107
+ "contact_card"
108
+ ]
109
+ },
110
+ {
111
+ "type": "null"
112
+ }
85
113
  ]
86
114
  },
87
115
  "timestamp": {
88
- "type": "string"
116
+ "anyOf": [
117
+ {
118
+ "type": "string"
119
+ },
120
+ {
121
+ "type": "null"
122
+ }
123
+ ]
89
124
  }
90
125
  },
91
126
  "required": [
92
127
  "text",
93
- "senderId",
94
- "senderType",
95
128
  "timestamp"
96
129
  ],
97
130
  "additionalProperties": {}
@@ -102,7 +135,14 @@
102
135
  ]
103
136
  },
104
137
  "createdAt": {
105
- "type": "string"
138
+ "anyOf": [
139
+ {
140
+ "type": "string"
141
+ },
142
+ {
143
+ "type": "null"
144
+ }
145
+ ]
106
146
  }
107
147
  },
108
148
  "required": [
@@ -23,8 +23,6 @@
23
23
  "contact.removed",
24
24
  "typing",
25
25
  "presence",
26
- "runtime.updated",
27
- "turn.updated",
28
26
  "runtime.control",
29
27
  "voice.session.started",
30
28
  "voice.session.ended",
@@ -17,8 +17,6 @@
17
17
  "contact.removed",
18
18
  "typing",
19
19
  "presence",
20
- "runtime.updated",
21
- "turn.updated",
22
20
  "runtime.control",
23
21
  "voice.session.started",
24
22
  "voice.session.ended",