@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.
- package/dist/agentBehaviorPolicy.d.ts +86 -45
- package/dist/agentBehaviorPolicy.js +53 -0
- package/dist/bridgeLocal.d.ts +1729 -0
- package/dist/bridgeLocal.js +673 -0
- package/dist/cjs/agentBehaviorPolicy.js +54 -1
- package/dist/cjs/bridgeLocal.js +676 -0
- package/dist/cjs/contactRequest.js +30 -0
- package/dist/cjs/controlSignals.js +44 -0
- package/dist/cjs/endpointRegistry.js +264 -0
- package/dist/cjs/hitl.js +171 -0
- package/dist/cjs/inboundFrame.js +92 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/media.js +13 -0
- package/dist/cjs/message.js +64 -0
- package/dist/cjs/restEndpoints.js +220 -0
- package/dist/cjs/runtimeCardFields.js +58 -1
- package/dist/cjs/sendContextual.js +92 -0
- package/dist/cjs/sseEvents.js +298 -0
- package/dist/cjs/turnProtocol.js +41 -2
- package/dist/contactRequest.d.ts +42 -23
- package/dist/contactRequest.js +29 -0
- package/dist/controlSignals.d.ts +55 -0
- package/dist/controlSignals.js +41 -0
- package/dist/endpointRegistry.d.ts +13 -0
- package/dist/endpointRegistry.js +261 -0
- package/dist/hitl.d.ts +303 -0
- package/dist/hitl.js +168 -0
- package/dist/inboundFrame.d.ts +229 -0
- package/dist/inboundFrame.js +89 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/media.d.ts +24 -11
- package/dist/media.js +12 -0
- package/dist/message.d.ts +133 -50
- package/dist/message.js +64 -1
- package/dist/restEndpoints.d.ts +496 -0
- package/dist/restEndpoints.js +217 -0
- package/dist/runtimeCardFields.d.ts +112 -39
- package/dist/runtimeCardFields.js +57 -0
- package/dist/schemas/agent-behavior-settings-record.schema.json +48 -0
- package/dist/schemas/bridge-connection-state-notification.schema.json +19 -0
- package/dist/schemas/bridge-get-attachment-params.schema.json +24 -0
- package/dist/schemas/bridge-get-attachment-result.schema.json +20 -0
- package/dist/schemas/bridge-hello-params.schema.json +42 -0
- package/dist/schemas/bridge-hello-result.schema.json +105 -0
- package/dist/schemas/bridge-hitl-state.schema.json +38 -0
- package/dist/schemas/bridge-ok-result.schema.json +15 -0
- package/dist/schemas/bridge-ready-notification.schema.json +79 -0
- package/dist/schemas/bridge-resync-reason.schema.json +9 -0
- package/dist/schemas/bridge-resync.schema.json +18 -0
- package/dist/schemas/bridge-rpc-error.schema.json +19 -0
- package/dist/schemas/bridge-rpc-id.schema.json +12 -0
- package/dist/schemas/bridge-rpc-notification.schema.json +20 -0
- package/dist/schemas/bridge-rpc-request.schema.json +31 -0
- package/dist/schemas/bridge-rpc-response.schema.json +81 -0
- package/dist/schemas/bridge-status-result.schema.json +76 -0
- package/dist/schemas/bridge-upload-media-params.schema.json +28 -0
- package/dist/schemas/bridge-upstream-state.schema.json +10 -0
- package/dist/schemas/contacts-response.schema.json +52 -0
- package/dist/schemas/control-channel-key.schema.json +10 -0
- package/dist/schemas/control-primitive-event.schema.json +30 -0
- package/dist/schemas/control-primitive-map.schema.json +15 -0
- package/dist/schemas/control-session-event.schema.json +26 -0
- package/dist/schemas/control-session-node.schema.json +11 -0
- package/dist/schemas/control-signal-event.schema.json +35 -0
- package/dist/schemas/control-signal-node.schema.json +22 -0
- package/dist/schemas/control-signal-type.schema.json +10 -0
- package/dist/schemas/conversations-response.schema.json +127 -0
- package/dist/schemas/create-contact-request-request.schema.json +17 -0
- package/dist/schemas/create-contact-request-response.schema.json +51 -0
- package/dist/schemas/create-conversation-request.schema.json +82 -0
- package/dist/schemas/create-conversation-response.schema.json +29 -0
- package/dist/schemas/delete-message-response.schema.json +11 -0
- package/dist/schemas/delivery-intent.schema.json +11 -0
- package/dist/schemas/forward-message-request.schema.json +25 -0
- package/dist/schemas/forward-message-response.schema.json +35 -0
- package/dist/schemas/forwarded-from.schema.json +18 -0
- package/dist/schemas/get-messages-query.schema.json +17 -0
- package/dist/schemas/hitl-approval-category.schema.json +15 -0
- package/dist/schemas/hitl-approval-detail.schema.json +21 -0
- package/dist/schemas/hitl-approval-outcome-record.schema.json +33 -0
- package/dist/schemas/hitl-approval-reply-record.schema.json +57 -0
- package/dist/schemas/hitl-approval-request-record.schema.json +105 -0
- package/dist/schemas/hitl-approval-risk.schema.json +11 -0
- package/dist/schemas/hitl-card-outcome-record.schema.json +48 -0
- package/dist/schemas/hitl-card-reply-record.schema.json +46 -0
- package/dist/schemas/hitl-card-request-record.schema.json +73 -0
- package/dist/schemas/hitl-input-answers.schema.json +23 -0
- package/dist/schemas/hitl-input-kind.schema.json +10 -0
- package/dist/schemas/hitl-input-outcome-record.schema.json +46 -0
- package/dist/schemas/hitl-input-question.schema.json +54 -0
- package/dist/schemas/hitl-input-reply-record.schema.json +44 -0
- package/dist/schemas/hitl-input-request-record.schema.json +134 -0
- package/dist/schemas/hitl-pending.schema.json +31 -0
- package/dist/schemas/hitl-request-accepted.schema.json +18 -0
- package/dist/schemas/hitl-request-kind.schema.json +10 -0
- package/dist/schemas/hitl-resolution-status.schema.json +10 -0
- package/dist/schemas/hitl-resolution.schema.json +38 -0
- package/dist/schemas/hitl-session-rule.schema.json +32 -0
- package/dist/schemas/inbound-disposition.schema.json +13 -0
- package/dist/schemas/inbound-frame-attachment-v1.schema.json +94 -0
- package/dist/schemas/inbound-frame-contact-card-v1.schema.json +59 -0
- package/dist/schemas/inbound-frame-group-context-v1.schema.json +96 -0
- package/dist/schemas/inbound-frame-reply-context-v1.schema.json +261 -0
- package/dist/schemas/inbound-frame-shape-v1.schema.json +12 -0
- package/dist/schemas/inbound-frame-v1.schema.json +506 -0
- package/dist/schemas/mark-read-response.schema.json +11 -0
- package/dist/schemas/media-attachment-kind.schema.json +11 -0
- package/dist/schemas/media-attachment.schema.json +42 -0
- package/dist/schemas/messages-page-response.schema.json +290 -0
- package/dist/schemas/participation-decision-input.schema.json +44 -0
- package/dist/schemas/participation-history-message.schema.json +23 -0
- package/dist/schemas/participation-history-snapshot.schema.json +37 -0
- package/dist/schemas/participation-style.schema.json +13 -0
- package/dist/schemas/react-request.schema.json +22 -0
- package/dist/schemas/react-response.schema.json +35 -0
- package/dist/schemas/resolve-admission-request.schema.json +30 -0
- package/dist/schemas/resolve-admission-response.schema.json +129 -0
- package/dist/schemas/resolved-agent-behavior-policy-record.schema.json +81 -0
- package/dist/schemas/rest-contact.schema.json +40 -0
- package/dist/schemas/rest-conversation.schema.json +115 -0
- package/dist/schemas/rest-message.schema.json +252 -0
- package/dist/schemas/rest-ok-response.schema.json +11 -0
- package/dist/schemas/rest-session-selection.schema.json +40 -0
- package/dist/schemas/runtime-card-field-choice.schema.json +23 -0
- package/dist/schemas/runtime-card-field-type.schema.json +17 -0
- package/dist/schemas/runtime-card-field.schema.json +180 -0
- package/dist/schemas/runtime-card-line-item-column-type.schema.json +12 -0
- package/dist/schemas/runtime-card-line-item-column.schema.json +74 -0
- package/dist/schemas/send-contextual-deferred-response.schema.json +39 -0
- package/dist/schemas/send-contextual-messaged-response.schema.json +42 -0
- package/dist/schemas/send-contextual-request.schema.json +103 -0
- package/dist/schemas/send-contextual-response.schema.json +105 -0
- package/dist/schemas/send-contextual-self-context.schema.json +19 -0
- package/dist/schemas/send-contextual-state-response.schema.json +24 -0
- package/dist/schemas/send-message-request.schema.json +106 -0
- package/dist/schemas/send-message-response.schema.json +14 -0
- package/dist/schemas/sender-type.schema.json +9 -0
- package/dist/schemas/serialize-message-input.schema.json +29 -0
- package/dist/schemas/serialized-agent-client-type.schema.json +12 -0
- package/dist/schemas/serialized-contact-card.schema.json +65 -0
- package/dist/schemas/serialized-contact-request-status.schema.json +11 -0
- package/dist/schemas/serialized-contact-request.schema.json +157 -0
- package/dist/schemas/serialized-content-type.schema.json +13 -0
- package/dist/schemas/serialized-message.schema.json +249 -0
- package/dist/schemas/serialized-reactions.schema.json +14 -0
- package/dist/schemas/serialized-sender-type.schema.json +9 -0
- package/dist/schemas/set-streaming-request.schema.json +67 -0
- package/dist/schemas/set-typing-request.schema.json +25 -0
- package/dist/schemas/sse-access-policy.schema.json +10 -0
- package/dist/schemas/sse-agent-context-payload.schema.json +57 -0
- package/dist/schemas/sse-connected-payload.schema.json +18 -0
- package/dist/schemas/sse-contact-payload.schema.json +40 -0
- package/dist/schemas/sse-contact-removed-payload.schema.json +14 -0
- package/dist/schemas/sse-contact-request-payload.schema.json +157 -0
- package/dist/schemas/sse-conversation-updated-payload.schema.json +48 -0
- package/dist/schemas/sse-error-payload.schema.json +23 -0
- package/dist/schemas/sse-event-envelope.schema.json +42 -0
- package/dist/schemas/sse-event-family.schema.json +12 -0
- package/dist/schemas/sse-event-type.schema.json +28 -0
- package/dist/schemas/sse-heartbeat-payload.schema.json +14 -0
- package/dist/schemas/sse-membership-change.schema.json +28 -0
- package/dist/schemas/sse-message-created-payload.schema.json +414 -0
- package/dist/schemas/sse-message-deleted-payload.schema.json +18 -0
- package/dist/schemas/sse-message-updated-payload.schema.json +46 -0
- package/dist/schemas/sse-presence-payload.schema.json +21 -0
- package/dist/schemas/sse-provenance.schema.json +64 -0
- package/dist/schemas/sse-replay-expired-payload.schema.json +21 -0
- package/dist/schemas/sse-runtime-control-kind.schema.json +13 -0
- package/dist/schemas/sse-runtime-control-payload.schema.json +44 -0
- package/dist/schemas/sse-runtime-updated-payload.schema.json +78 -0
- package/dist/schemas/sse-self-context.schema.json +45 -0
- package/dist/schemas/sse-turn-dispatch.schema.json +29 -0
- package/dist/schemas/sse-turn-updated-payload.schema.json +33 -0
- package/dist/schemas/sse-typing-payload.schema.json +32 -0
- package/dist/schemas/sse-voice-session-event-payload.schema.json +170 -0
- package/dist/schemas/sse-voice-session.schema.json +157 -0
- package/dist/schemas/trigger-decision.schema.json +27 -0
- package/dist/schemas/turn-lifecycle-state.schema.json +14 -0
- package/dist/schemas/turn-message-semantics.schema.json +10 -0
- package/dist/schemas/turn-metadata.schema.json +56 -0
- package/dist/schemas/turn-state-like.schema.json +39 -0
- package/dist/schemas/update-disposition-request.schema.json +22 -0
- package/dist/schemas/upload-media-request.schema.json +25 -0
- package/dist/schemas/upload-media-response.schema.json +55 -0
- package/dist/sendContextual.d.ts +114 -0
- package/dist/sendContextual.js +89 -0
- package/dist/sseEvents.d.ts +494 -0
- package/dist/sseEvents.js +295 -0
- package/dist/turnProtocol.d.ts +91 -24
- package/dist/turnProtocol.js +40 -1
- package/package.json +8 -5
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:ResolvedAgentBehaviorPolicyRecordSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"participation": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"style": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": [
|
|
12
|
+
"natural",
|
|
13
|
+
"collaborative",
|
|
14
|
+
"mention-first",
|
|
15
|
+
"approval-gated",
|
|
16
|
+
"handoff-only",
|
|
17
|
+
"observer"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"allowAgentToAgent": {
|
|
21
|
+
"type": "boolean"
|
|
22
|
+
},
|
|
23
|
+
"allowHumanToAgent": {
|
|
24
|
+
"type": "boolean"
|
|
25
|
+
},
|
|
26
|
+
"allowLongRunningCollaboration": {
|
|
27
|
+
"type": "boolean"
|
|
28
|
+
},
|
|
29
|
+
"requireMentionForGroupReplies": {
|
|
30
|
+
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"maxConsecutiveAgentTurns": {
|
|
33
|
+
"anyOf": [
|
|
34
|
+
{
|
|
35
|
+
"type": "number"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "null"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"required": [
|
|
44
|
+
"style",
|
|
45
|
+
"allowAgentToAgent",
|
|
46
|
+
"allowHumanToAgent",
|
|
47
|
+
"allowLongRunningCollaboration",
|
|
48
|
+
"requireMentionForGroupReplies"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
},
|
|
52
|
+
"instructions": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"source": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"hasAgentDefault": {
|
|
62
|
+
"type": "boolean"
|
|
63
|
+
},
|
|
64
|
+
"hasConversationOverride": {
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"hasAgentDefault",
|
|
70
|
+
"hasConversationOverride"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": [
|
|
76
|
+
"participation",
|
|
77
|
+
"instructions",
|
|
78
|
+
"source"
|
|
79
|
+
],
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RestContactSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"source": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"addedAt": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "null"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"displayNameOverride": {
|
|
23
|
+
"anyOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "null"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": [
|
|
34
|
+
"id",
|
|
35
|
+
"source",
|
|
36
|
+
"addedAt",
|
|
37
|
+
"displayNameOverride"
|
|
38
|
+
],
|
|
39
|
+
"additionalProperties": false
|
|
40
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RestConversationSchema",
|
|
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
|
+
"enum": [
|
|
12
|
+
"direct",
|
|
13
|
+
"group"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "null"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"topic": {
|
|
27
|
+
"anyOf": [
|
|
28
|
+
{
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "null"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"memberIds": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"isAgentChat": {
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
},
|
|
45
|
+
"behavior": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"propertyNames": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"additionalProperties": {}
|
|
51
|
+
},
|
|
52
|
+
"hasUnread": {
|
|
53
|
+
"type": "boolean"
|
|
54
|
+
},
|
|
55
|
+
"lastMessage": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "object",
|
|
59
|
+
"properties": {
|
|
60
|
+
"text": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"messageId": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"senderId": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"senderType": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"enum": [
|
|
72
|
+
"human",
|
|
73
|
+
"ai_agent"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"contentType": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": [
|
|
79
|
+
"text",
|
|
80
|
+
"image",
|
|
81
|
+
"audio",
|
|
82
|
+
"video",
|
|
83
|
+
"file",
|
|
84
|
+
"contact_card"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"timestamp": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"text",
|
|
93
|
+
"senderId",
|
|
94
|
+
"senderType",
|
|
95
|
+
"timestamp"
|
|
96
|
+
],
|
|
97
|
+
"additionalProperties": {}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "null"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"createdAt": {
|
|
105
|
+
"type": "string"
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": [
|
|
109
|
+
"id",
|
|
110
|
+
"type",
|
|
111
|
+
"memberIds",
|
|
112
|
+
"lastMessage"
|
|
113
|
+
],
|
|
114
|
+
"additionalProperties": {}
|
|
115
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RestMessageSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"senderId": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"senderName": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"senderType": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"human",
|
|
19
|
+
"ai_agent"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"isOwner": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"contentType": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"text",
|
|
29
|
+
"image",
|
|
30
|
+
"audio",
|
|
31
|
+
"video",
|
|
32
|
+
"file",
|
|
33
|
+
"contact_card"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"text": {
|
|
37
|
+
"anyOf": [
|
|
38
|
+
{
|
|
39
|
+
"type": "string"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "null"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"attachments": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"properties": {
|
|
51
|
+
"kind": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"image",
|
|
55
|
+
"audio",
|
|
56
|
+
"video",
|
|
57
|
+
"file"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"url": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"mimeType": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"fileName": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"sizeBytes": {
|
|
70
|
+
"type": "number"
|
|
71
|
+
},
|
|
72
|
+
"width": {
|
|
73
|
+
"type": "number"
|
|
74
|
+
},
|
|
75
|
+
"height": {
|
|
76
|
+
"type": "number"
|
|
77
|
+
},
|
|
78
|
+
"durationMs": {
|
|
79
|
+
"type": "number"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": [
|
|
83
|
+
"kind",
|
|
84
|
+
"url"
|
|
85
|
+
],
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"mentions": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"items": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"replyTo": {
|
|
96
|
+
"anyOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "null"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"replyToPosition": {
|
|
106
|
+
"anyOf": [
|
|
107
|
+
{
|
|
108
|
+
"type": "number"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "null"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"forwarded": {
|
|
116
|
+
"type": "boolean"
|
|
117
|
+
},
|
|
118
|
+
"forwardedFrom": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"sourceConversationId": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"messageId": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"required": [
|
|
129
|
+
"sourceConversationId",
|
|
130
|
+
"messageId"
|
|
131
|
+
],
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
},
|
|
134
|
+
"status": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"enum": [
|
|
137
|
+
"sent",
|
|
138
|
+
"read"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"createdAt": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"metadata": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"propertyNames": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"additionalProperties": {}
|
|
150
|
+
},
|
|
151
|
+
"contactCard": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"properties": {
|
|
154
|
+
"userId": {
|
|
155
|
+
"type": "string"
|
|
156
|
+
},
|
|
157
|
+
"canonContactId": {
|
|
158
|
+
"type": "string"
|
|
159
|
+
},
|
|
160
|
+
"displayName": {
|
|
161
|
+
"type": "string"
|
|
162
|
+
},
|
|
163
|
+
"avatarUrl": {
|
|
164
|
+
"anyOf": [
|
|
165
|
+
{
|
|
166
|
+
"type": "string"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "null"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"userType": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"enum": [
|
|
176
|
+
"human",
|
|
177
|
+
"ai_agent"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"clientType": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"enum": [
|
|
183
|
+
"claude-code",
|
|
184
|
+
"openclaw",
|
|
185
|
+
"codex",
|
|
186
|
+
"hermes",
|
|
187
|
+
"generic"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"about": {
|
|
191
|
+
"type": "string"
|
|
192
|
+
},
|
|
193
|
+
"isActive": {
|
|
194
|
+
"type": "boolean"
|
|
195
|
+
},
|
|
196
|
+
"ownerId": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"ownerName": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"lifecycleState": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"required": [
|
|
207
|
+
"userId",
|
|
208
|
+
"displayName",
|
|
209
|
+
"avatarUrl",
|
|
210
|
+
"userType"
|
|
211
|
+
],
|
|
212
|
+
"additionalProperties": false
|
|
213
|
+
},
|
|
214
|
+
"runtimeCard": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"propertyNames": {
|
|
217
|
+
"type": "string"
|
|
218
|
+
},
|
|
219
|
+
"additionalProperties": {}
|
|
220
|
+
},
|
|
221
|
+
"reactions": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"propertyNames": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"additionalProperties": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"items": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"deleted": {
|
|
234
|
+
"type": "boolean"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": [
|
|
238
|
+
"id",
|
|
239
|
+
"senderId",
|
|
240
|
+
"senderType",
|
|
241
|
+
"isOwner",
|
|
242
|
+
"contentType",
|
|
243
|
+
"text",
|
|
244
|
+
"attachments",
|
|
245
|
+
"mentions",
|
|
246
|
+
"replyTo",
|
|
247
|
+
"replyToPosition",
|
|
248
|
+
"status",
|
|
249
|
+
"createdAt"
|
|
250
|
+
],
|
|
251
|
+
"additionalProperties": false
|
|
252
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RestSessionSelectionSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"anyOf": [
|
|
5
|
+
{
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"mode": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"new",
|
|
12
|
+
"continue_latest",
|
|
13
|
+
"continue_or_create"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": [
|
|
18
|
+
"mode"
|
|
19
|
+
],
|
|
20
|
+
"additionalProperties": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"mode": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"const": "specific"
|
|
28
|
+
},
|
|
29
|
+
"conversationId": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": [
|
|
34
|
+
"mode",
|
|
35
|
+
"conversationId"
|
|
36
|
+
],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RuntimeCardFieldChoiceSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"label": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"value": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"preview": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"required": [
|
|
20
|
+
"label"
|
|
21
|
+
],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "canon:RuntimeCardFieldTypeSchema",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"enum": [
|
|
6
|
+
"text",
|
|
7
|
+
"textarea",
|
|
8
|
+
"select",
|
|
9
|
+
"multiSelect",
|
|
10
|
+
"boolean",
|
|
11
|
+
"date",
|
|
12
|
+
"number",
|
|
13
|
+
"currency",
|
|
14
|
+
"searchSelect",
|
|
15
|
+
"lineItems"
|
|
16
|
+
]
|
|
17
|
+
}
|