@canonmsg/backend-contracts 1.6.0 → 1.7.1

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.
@@ -92,6 +92,9 @@ function normalizeContactCard(value) {
92
92
  };
93
93
  if (typeof value.about === 'string')
94
94
  card.about = value.about;
95
+ if (userType === 'ai_agent' && typeof value.canonContactId === 'string') {
96
+ card.canonContactId = value.canonContactId;
97
+ }
95
98
  const clientType = userType === 'ai_agent'
96
99
  ? normalizeAgentClientType(value.clientType)
97
100
  : undefined;
@@ -30,7 +30,6 @@ function isHiddenRuntimeCardMetadata(metadata) {
30
30
  return false;
31
31
  return metadata.type === 'approval_reply'
32
32
  || metadata.type === 'approval_outcome'
33
- || metadata.type === 'question_reply'
34
33
  || metadata.type === 'plan_approval_reply'
35
34
  || metadata.type === 'runtime_input_reply'
36
35
  || metadata.type === 'runtime_input_outcome'
package/dist/message.d.ts CHANGED
@@ -9,6 +9,7 @@ export interface ForwardedFrom {
9
9
  export type SerializedReactions = Record<string, string[]>;
10
10
  export interface SerializedContactCard {
11
11
  userId: string;
12
+ canonContactId?: string;
12
13
  displayName: string;
13
14
  avatarUrl: string | null;
14
15
  userType: SerializedSenderType;
package/dist/message.js CHANGED
@@ -89,6 +89,9 @@ function normalizeContactCard(value) {
89
89
  };
90
90
  if (typeof value.about === 'string')
91
91
  card.about = value.about;
92
+ if (userType === 'ai_agent' && typeof value.canonContactId === 'string') {
93
+ card.canonContactId = value.canonContactId;
94
+ }
92
95
  const clientType = userType === 'ai_agent'
93
96
  ? normalizeAgentClientType(value.clientType)
94
97
  : undefined;
@@ -19,7 +19,6 @@ function isHiddenRuntimeCardMetadata(metadata) {
19
19
  return false;
20
20
  return metadata.type === 'approval_reply'
21
21
  || metadata.type === 'approval_outcome'
22
- || metadata.type === 'question_reply'
23
22
  || metadata.type === 'plan_approval_reply'
24
23
  || metadata.type === 'runtime_input_reply'
25
24
  || metadata.type === 'runtime_input_outcome'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/backend-contracts",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "Canon backend contract helpers shared by Functions and stream-service",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",