@canonmsg/backend-contracts 8.6.0 → 8.6.2
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.
|
@@ -19,10 +19,10 @@ exports.ENDPOINT_CONTENT_ACTIONS = [
|
|
|
19
19
|
'create_upload', 'finalize_upload', 'delete_upload', 'retry_video_processing',
|
|
20
20
|
'finalize_memo_stream', 'abort_memo_stream', 'create_voice_session',
|
|
21
21
|
'join_voice_session', 'decline_voice_session', 'end_voice_session',
|
|
22
|
-
'consume_runtime_signal', 'generate_image',
|
|
22
|
+
'consume_runtime_signal', 'consume_runtime_primitive', 'generate_image',
|
|
23
23
|
];
|
|
24
24
|
exports.ENDPOINT_CONTENT_FUNCTION_QUERIES = [
|
|
25
|
-
'discover_agents', 'get_unread_summary', 'peek_runtime_signal',
|
|
25
|
+
'discover_agents', 'get_unread_summary', 'peek_runtime_signal', 'list_runtime_primitives',
|
|
26
26
|
'get_work_session_catalog', 'get_work_session_request', 'get_agent_behavior_policy',
|
|
27
27
|
'get_conversation_agent_behavior_policy', 'get_ephemeral', 'list_voice_sessions',
|
|
28
28
|
'list_contact_requests', 'list_conversations', 'list_messages', 'get_messages',
|
|
@@ -34,7 +34,7 @@ exports.ENDPOINT_CONTENT_FUNCTION_QUERIES = [
|
|
|
34
34
|
exports.ENDPOINT_CONTENT_QUERIES = [...exports.ENDPOINT_CONTENT_FUNCTION_QUERIES, 'admit_messages'];
|
|
35
35
|
exports.ENDPOINT_CONTENT_EPHEMERALS = [
|
|
36
36
|
'create_memo_stream', 'publish_presence', 'publish_typing', 'publish_streaming',
|
|
37
|
-
'publish_turn', 'publish_runtime_status', 'append_memo_chunk',
|
|
37
|
+
'publish_turn', 'publish_runtime_status', 'publish_session_state', 'publish_runtime_info', 'publish_runtime_activity', 'append_memo_chunk',
|
|
38
38
|
];
|
|
39
39
|
exports.ENDPOINT_CONTENT_EPHEMERAL_FAMILIES = [
|
|
40
40
|
'typing', 'streaming', 'turn-state', 'agent-session', 'runtime-card-state',
|
|
@@ -42,7 +42,7 @@ exports.ENDPOINT_CONTENT_EPHEMERAL_FAMILIES = [
|
|
|
42
42
|
'runtime-silence', 'runtime-attention', 'call-attention', 'agent-runtime', 'presence',
|
|
43
43
|
];
|
|
44
44
|
exports.ENDPOINT_CONTENT_EVENTS = [
|
|
45
|
-
'connected', 'heartbeat', 'agent.context', 'replay.expired',
|
|
45
|
+
'connected', 'heartbeat', 'agent.context', 'replay.expired', 'error', 'participation.suppressed',
|
|
46
46
|
'message.created', 'message.snapshot', 'message.updated', 'message.deleted',
|
|
47
47
|
'message.media_terminal', 'conversation.updated', 'conversation.changed',
|
|
48
48
|
'conversation.removed', 'conversations.changed', 'contacts.changed',
|
|
@@ -96,7 +96,7 @@ const actionRouting = {
|
|
|
96
96
|
update_message_disposition: ['conversationId', 'messageId'], create_upload: ['conversationId'], finalize_upload: ['uploadId'], delete_upload: ['uploadId'], retry_video_processing: ['uploadId'],
|
|
97
97
|
finalize_memo_stream: ['conversationId', 'streamId'], abort_memo_stream: ['streamId'],
|
|
98
98
|
create_voice_session: ['conversationId'], join_voice_session: ['conversationId', 'sessionId'], decline_voice_session: ['conversationId', 'sessionId'], end_voice_session: ['conversationId', 'sessionId'],
|
|
99
|
-
consume_runtime_signal: ['conversationId', 'expectedSignalId'], generate_image: ['conversationId', 'requestId'],
|
|
99
|
+
consume_runtime_signal: ['conversationId', 'expectedSignalId'], consume_runtime_primitive: ['conversationId', 'requestId', 'expectedRevision'], generate_image: ['conversationId', 'requestId'],
|
|
100
100
|
request_work_session: ['conversationId', 'agentId', 'requestId'], resolve_work_session_request: ['requestId'],
|
|
101
101
|
update_agent_behavior_policy: ['agentId'], update_conversation_agent_behavior_policy: ['conversationId', 'agentId'],
|
|
102
102
|
};
|
|
@@ -106,13 +106,13 @@ const queryRouting = {
|
|
|
106
106
|
list_contacts: ['limit', 'before'], get_contact: ['contactId', 'contactUserId', 'userId'], get_members: ['conversationId'],
|
|
107
107
|
list_contact_requests: ['direction', 'limit', 'before'], admission_fences: ['conversationId', 'targetUserId'],
|
|
108
108
|
resolve_admission: ['targetUserId'], resolve_group_admission: ['conversationId', 'targetUserId'], get_runtime_card_state: ['conversationId', 'cardId'],
|
|
109
|
-
get_ephemeral: ['family', 'scopeId'], peek_runtime_signal: ['conversationId'], list_voice_sessions: ['conversationId', 'limit'],
|
|
109
|
+
get_ephemeral: ['family', 'scopeId'], peek_runtime_signal: ['conversationId'], list_runtime_primitives: ['conversationId'], list_voice_sessions: ['conversationId', 'limit'],
|
|
110
110
|
get_upload: ['uploadId'], get_voice_session: ['conversationId', 'sessionId'], get_image_generation: ['requestId'],
|
|
111
111
|
get_work_session_catalog: ['agentId'], get_work_session_request: ['requestId'], get_agent_behavior_policy: ['agentId'], get_conversation_agent_behavior_policy: ['conversationId', 'agentId'],
|
|
112
112
|
};
|
|
113
113
|
const transientRouting = {
|
|
114
114
|
create_memo_stream: ['conversationId', 'streamId'], append_memo_chunk: ['streamId'],
|
|
115
|
-
publish_presence: [], publish_typing: ['conversationId'], publish_streaming: ['conversationId'], publish_turn: ['conversationId'], publish_runtime_status: ['conversationId'],
|
|
115
|
+
publish_presence: [], publish_typing: ['conversationId'], publish_streaming: ['conversationId'], publish_turn: ['conversationId'], publish_runtime_status: [], publish_session_state: ['conversationId'], publish_runtime_info: ['conversationId'], publish_runtime_activity: ['conversationId', 'itemId'],
|
|
116
116
|
};
|
|
117
117
|
function eventRouting(name) {
|
|
118
118
|
if (name.startsWith('ephemeral.'))
|
|
@@ -121,6 +121,10 @@ function eventRouting(name) {
|
|
|
121
121
|
return ['protocol', 'connectionId', 'agentId', 'principalId', 'principalType'];
|
|
122
122
|
if (name === 'heartbeat')
|
|
123
123
|
return ['timestamp'];
|
|
124
|
+
if (name === 'error')
|
|
125
|
+
return ['code', 'status', 'retryable', 'retryAfterMs', 'retryAfter', 'activeConnections', 'maxConnections'];
|
|
126
|
+
if (name === 'participation.suppressed')
|
|
127
|
+
return ['conversationId', 'agentId', 'messageId'];
|
|
124
128
|
if (name === 'agent.context')
|
|
125
129
|
return ['agentId', 'ownerId', 'ownershipVersion'];
|
|
126
130
|
if (name === 'conversations.changed')
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* public. These definitions refer to existing payload schemas, not copies. */
|
|
5
5
|
export type EndpointContentClass = 'public-metadata' | 'private-content' | 'restricted-secret';
|
|
6
6
|
export type EndpointContentLane = 'operation.request' | 'operation.receipt' | 'query.request' | 'query.result' | 'ephemeral.request' | 'ephemeral.result' | 'event';
|
|
7
|
-
export declare const ENDPOINT_CONTENT_ACTIONS: readonly ["initialize_endpoint", "sync_phone_contacts", "request_work_session", "resolve_work_session_request", "update_agent_behavior_policy", "update_conversation_agent_behavior_policy", "send_message", "delete_message", "forward_message", "react", "verb_execute", "send_contextual_message", "create_interaction", "consume_interaction", "start_conversation", "create_conversation", "add_member", "remove_member", "leave_conversation", "update_member_role", "update_conversation", "rename_conversation", "update_topic", "update_group_avatar", "mark_read", "cancel_queued_message", "set_conversation_preferences", "set_block", "save_contact", "remove_contact", "respond_interaction", "session_control", "approve_contact_request", "reject_contact_request", "cancel_direct_request", "update_message_disposition", "create_upload", "finalize_upload", "delete_upload", "retry_video_processing", "finalize_memo_stream", "abort_memo_stream", "create_voice_session", "join_voice_session", "decline_voice_session", "end_voice_session", "consume_runtime_signal", "generate_image"];
|
|
8
|
-
export declare const ENDPOINT_CONTENT_FUNCTION_QUERIES: readonly ["discover_agents", "get_unread_summary", "peek_runtime_signal", "get_work_session_catalog", "get_work_session_request", "get_agent_behavior_policy", "get_conversation_agent_behavior_policy", "get_ephemeral", "list_voice_sessions", "list_contact_requests", "list_conversations", "list_messages", "get_messages", "admission_fences", "list_contacts", "get_contact", "get_members", "resolve_admission", "resolve_group_admission", "get_runtime_card_state", "conversation", "conversation_changes", "get_upload", "get_voice_session", "get_image_generation", "get_image_generation_status"];
|
|
9
|
-
export declare const ENDPOINT_CONTENT_QUERIES: readonly ["discover_agents", "get_unread_summary", "peek_runtime_signal", "get_work_session_catalog", "get_work_session_request", "get_agent_behavior_policy", "get_conversation_agent_behavior_policy", "get_ephemeral", "list_voice_sessions", "list_contact_requests", "list_conversations", "list_messages", "get_messages", "admission_fences", "list_contacts", "get_contact", "get_members", "resolve_admission", "resolve_group_admission", "get_runtime_card_state", "conversation", "conversation_changes", "get_upload", "get_voice_session", "get_image_generation", "get_image_generation_status", "admit_messages"];
|
|
10
|
-
export declare const ENDPOINT_CONTENT_EPHEMERALS: readonly ["create_memo_stream", "publish_presence", "publish_typing", "publish_streaming", "publish_turn", "publish_runtime_status", "append_memo_chunk"];
|
|
7
|
+
export declare const ENDPOINT_CONTENT_ACTIONS: readonly ["initialize_endpoint", "sync_phone_contacts", "request_work_session", "resolve_work_session_request", "update_agent_behavior_policy", "update_conversation_agent_behavior_policy", "send_message", "delete_message", "forward_message", "react", "verb_execute", "send_contextual_message", "create_interaction", "consume_interaction", "start_conversation", "create_conversation", "add_member", "remove_member", "leave_conversation", "update_member_role", "update_conversation", "rename_conversation", "update_topic", "update_group_avatar", "mark_read", "cancel_queued_message", "set_conversation_preferences", "set_block", "save_contact", "remove_contact", "respond_interaction", "session_control", "approve_contact_request", "reject_contact_request", "cancel_direct_request", "update_message_disposition", "create_upload", "finalize_upload", "delete_upload", "retry_video_processing", "finalize_memo_stream", "abort_memo_stream", "create_voice_session", "join_voice_session", "decline_voice_session", "end_voice_session", "consume_runtime_signal", "consume_runtime_primitive", "generate_image"];
|
|
8
|
+
export declare const ENDPOINT_CONTENT_FUNCTION_QUERIES: readonly ["discover_agents", "get_unread_summary", "peek_runtime_signal", "list_runtime_primitives", "get_work_session_catalog", "get_work_session_request", "get_agent_behavior_policy", "get_conversation_agent_behavior_policy", "get_ephemeral", "list_voice_sessions", "list_contact_requests", "list_conversations", "list_messages", "get_messages", "admission_fences", "list_contacts", "get_contact", "get_members", "resolve_admission", "resolve_group_admission", "get_runtime_card_state", "conversation", "conversation_changes", "get_upload", "get_voice_session", "get_image_generation", "get_image_generation_status"];
|
|
9
|
+
export declare const ENDPOINT_CONTENT_QUERIES: readonly ["discover_agents", "get_unread_summary", "peek_runtime_signal", "list_runtime_primitives", "get_work_session_catalog", "get_work_session_request", "get_agent_behavior_policy", "get_conversation_agent_behavior_policy", "get_ephemeral", "list_voice_sessions", "list_contact_requests", "list_conversations", "list_messages", "get_messages", "admission_fences", "list_contacts", "get_contact", "get_members", "resolve_admission", "resolve_group_admission", "get_runtime_card_state", "conversation", "conversation_changes", "get_upload", "get_voice_session", "get_image_generation", "get_image_generation_status", "admit_messages"];
|
|
10
|
+
export declare const ENDPOINT_CONTENT_EPHEMERALS: readonly ["create_memo_stream", "publish_presence", "publish_typing", "publish_streaming", "publish_turn", "publish_runtime_status", "publish_session_state", "publish_runtime_info", "publish_runtime_activity", "append_memo_chunk"];
|
|
11
11
|
export declare const ENDPOINT_CONTENT_EPHEMERAL_FAMILIES: readonly ["typing", "streaming", "turn-state", "agent-session", "runtime-card-state", "memo-streams", "runtime-info", "runtime-activity", "runtime-suppression", "runtime-silence", "runtime-attention", "call-attention", "agent-runtime", "presence"];
|
|
12
|
-
export declare const ENDPOINT_CONTENT_EVENTS: readonly ["connected", "heartbeat", "agent.context", "replay.expired", "message.created", "message.snapshot", "message.updated", "message.deleted", "message.media_terminal", "conversation.updated", "conversation.changed", "conversation.removed", "conversations.changed", "contacts.changed", "contact.added", "contact.updated", "contact.removed", "presence", "typing", "runtime.updated", "runtime.control", "turn.updated", "voice.session.started", "voice.session.ended", ...string[]];
|
|
12
|
+
export declare const ENDPOINT_CONTENT_EVENTS: readonly ["connected", "heartbeat", "agent.context", "replay.expired", "error", "participation.suppressed", "message.created", "message.snapshot", "message.updated", "message.deleted", "message.media_terminal", "conversation.updated", "conversation.changed", "conversation.removed", "conversations.changed", "contacts.changed", "contact.added", "contact.updated", "contact.removed", "presence", "typing", "runtime.updated", "runtime.control", "turn.updated", "voice.session.started", "voice.session.ended", ...string[]];
|
|
13
13
|
export declare class EndpointContentPolicyError extends Error {
|
|
14
14
|
readonly code = "ENDPOINT_CONTENT_UNCLASSIFIED";
|
|
15
15
|
constructor(lane: string, name: string);
|
|
@@ -14,10 +14,10 @@ export const ENDPOINT_CONTENT_ACTIONS = [
|
|
|
14
14
|
'create_upload', 'finalize_upload', 'delete_upload', 'retry_video_processing',
|
|
15
15
|
'finalize_memo_stream', 'abort_memo_stream', 'create_voice_session',
|
|
16
16
|
'join_voice_session', 'decline_voice_session', 'end_voice_session',
|
|
17
|
-
'consume_runtime_signal', 'generate_image',
|
|
17
|
+
'consume_runtime_signal', 'consume_runtime_primitive', 'generate_image',
|
|
18
18
|
];
|
|
19
19
|
export const ENDPOINT_CONTENT_FUNCTION_QUERIES = [
|
|
20
|
-
'discover_agents', 'get_unread_summary', 'peek_runtime_signal',
|
|
20
|
+
'discover_agents', 'get_unread_summary', 'peek_runtime_signal', 'list_runtime_primitives',
|
|
21
21
|
'get_work_session_catalog', 'get_work_session_request', 'get_agent_behavior_policy',
|
|
22
22
|
'get_conversation_agent_behavior_policy', 'get_ephemeral', 'list_voice_sessions',
|
|
23
23
|
'list_contact_requests', 'list_conversations', 'list_messages', 'get_messages',
|
|
@@ -29,7 +29,7 @@ export const ENDPOINT_CONTENT_FUNCTION_QUERIES = [
|
|
|
29
29
|
export const ENDPOINT_CONTENT_QUERIES = [...ENDPOINT_CONTENT_FUNCTION_QUERIES, 'admit_messages'];
|
|
30
30
|
export const ENDPOINT_CONTENT_EPHEMERALS = [
|
|
31
31
|
'create_memo_stream', 'publish_presence', 'publish_typing', 'publish_streaming',
|
|
32
|
-
'publish_turn', 'publish_runtime_status', 'append_memo_chunk',
|
|
32
|
+
'publish_turn', 'publish_runtime_status', 'publish_session_state', 'publish_runtime_info', 'publish_runtime_activity', 'append_memo_chunk',
|
|
33
33
|
];
|
|
34
34
|
export const ENDPOINT_CONTENT_EPHEMERAL_FAMILIES = [
|
|
35
35
|
'typing', 'streaming', 'turn-state', 'agent-session', 'runtime-card-state',
|
|
@@ -37,7 +37,7 @@ export const ENDPOINT_CONTENT_EPHEMERAL_FAMILIES = [
|
|
|
37
37
|
'runtime-silence', 'runtime-attention', 'call-attention', 'agent-runtime', 'presence',
|
|
38
38
|
];
|
|
39
39
|
export const ENDPOINT_CONTENT_EVENTS = [
|
|
40
|
-
'connected', 'heartbeat', 'agent.context', 'replay.expired',
|
|
40
|
+
'connected', 'heartbeat', 'agent.context', 'replay.expired', 'error', 'participation.suppressed',
|
|
41
41
|
'message.created', 'message.snapshot', 'message.updated', 'message.deleted',
|
|
42
42
|
'message.media_terminal', 'conversation.updated', 'conversation.changed',
|
|
43
43
|
'conversation.removed', 'conversations.changed', 'contacts.changed',
|
|
@@ -90,7 +90,7 @@ const actionRouting = {
|
|
|
90
90
|
update_message_disposition: ['conversationId', 'messageId'], create_upload: ['conversationId'], finalize_upload: ['uploadId'], delete_upload: ['uploadId'], retry_video_processing: ['uploadId'],
|
|
91
91
|
finalize_memo_stream: ['conversationId', 'streamId'], abort_memo_stream: ['streamId'],
|
|
92
92
|
create_voice_session: ['conversationId'], join_voice_session: ['conversationId', 'sessionId'], decline_voice_session: ['conversationId', 'sessionId'], end_voice_session: ['conversationId', 'sessionId'],
|
|
93
|
-
consume_runtime_signal: ['conversationId', 'expectedSignalId'], generate_image: ['conversationId', 'requestId'],
|
|
93
|
+
consume_runtime_signal: ['conversationId', 'expectedSignalId'], consume_runtime_primitive: ['conversationId', 'requestId', 'expectedRevision'], generate_image: ['conversationId', 'requestId'],
|
|
94
94
|
request_work_session: ['conversationId', 'agentId', 'requestId'], resolve_work_session_request: ['requestId'],
|
|
95
95
|
update_agent_behavior_policy: ['agentId'], update_conversation_agent_behavior_policy: ['conversationId', 'agentId'],
|
|
96
96
|
};
|
|
@@ -100,13 +100,13 @@ const queryRouting = {
|
|
|
100
100
|
list_contacts: ['limit', 'before'], get_contact: ['contactId', 'contactUserId', 'userId'], get_members: ['conversationId'],
|
|
101
101
|
list_contact_requests: ['direction', 'limit', 'before'], admission_fences: ['conversationId', 'targetUserId'],
|
|
102
102
|
resolve_admission: ['targetUserId'], resolve_group_admission: ['conversationId', 'targetUserId'], get_runtime_card_state: ['conversationId', 'cardId'],
|
|
103
|
-
get_ephemeral: ['family', 'scopeId'], peek_runtime_signal: ['conversationId'], list_voice_sessions: ['conversationId', 'limit'],
|
|
103
|
+
get_ephemeral: ['family', 'scopeId'], peek_runtime_signal: ['conversationId'], list_runtime_primitives: ['conversationId'], list_voice_sessions: ['conversationId', 'limit'],
|
|
104
104
|
get_upload: ['uploadId'], get_voice_session: ['conversationId', 'sessionId'], get_image_generation: ['requestId'],
|
|
105
105
|
get_work_session_catalog: ['agentId'], get_work_session_request: ['requestId'], get_agent_behavior_policy: ['agentId'], get_conversation_agent_behavior_policy: ['conversationId', 'agentId'],
|
|
106
106
|
};
|
|
107
107
|
const transientRouting = {
|
|
108
108
|
create_memo_stream: ['conversationId', 'streamId'], append_memo_chunk: ['streamId'],
|
|
109
|
-
publish_presence: [], publish_typing: ['conversationId'], publish_streaming: ['conversationId'], publish_turn: ['conversationId'], publish_runtime_status: ['conversationId'],
|
|
109
|
+
publish_presence: [], publish_typing: ['conversationId'], publish_streaming: ['conversationId'], publish_turn: ['conversationId'], publish_runtime_status: [], publish_session_state: ['conversationId'], publish_runtime_info: ['conversationId'], publish_runtime_activity: ['conversationId', 'itemId'],
|
|
110
110
|
};
|
|
111
111
|
function eventRouting(name) {
|
|
112
112
|
if (name.startsWith('ephemeral.'))
|
|
@@ -115,6 +115,10 @@ function eventRouting(name) {
|
|
|
115
115
|
return ['protocol', 'connectionId', 'agentId', 'principalId', 'principalType'];
|
|
116
116
|
if (name === 'heartbeat')
|
|
117
117
|
return ['timestamp'];
|
|
118
|
+
if (name === 'error')
|
|
119
|
+
return ['code', 'status', 'retryable', 'retryAfterMs', 'retryAfter', 'activeConnections', 'maxConnections'];
|
|
120
|
+
if (name === 'participation.suppressed')
|
|
121
|
+
return ['conversationId', 'agentId', 'messageId'];
|
|
118
122
|
if (name === 'agent.context')
|
|
119
123
|
return ['agentId', 'ownerId', 'ownershipVersion'];
|
|
120
124
|
if (name === 'conversations.changed')
|