@canonmsg/backend-contracts 1.0.0 → 1.1.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.
@@ -132,5 +132,8 @@ function serializeStoredMessage(input) {
132
132
  if (contactCard) {
133
133
  result.contactCard = contactCard;
134
134
  }
135
+ if (isRecord(data.runtimeCard)) {
136
+ result.runtimeCard = data.runtimeCard;
137
+ }
135
138
  return result;
136
139
  }
@@ -22,7 +22,9 @@ function isHiddenRuntimeCardMetadata(metadata) {
22
22
  || metadata.type === 'question_reply'
23
23
  || metadata.type === 'plan_approval_reply'
24
24
  || metadata.type === 'runtime_input_reply'
25
- || metadata.type === 'runtime_input_outcome';
25
+ || metadata.type === 'runtime_input_outcome'
26
+ || metadata.type === 'runtime_card_reply'
27
+ || metadata.type === 'runtime_card_outcome';
26
28
  }
27
29
  function normalizeTurnMetadata(metadata) {
28
30
  if (!isRecord(metadata))
package/dist/message.d.ts CHANGED
@@ -36,6 +36,8 @@ export interface SerializedMessage {
36
36
  createdAt: string;
37
37
  metadata?: Record<string, unknown>;
38
38
  contactCard?: SerializedContactCard;
39
+ /** Durable canon.card.v1 runtime card content, passed through opaquely. */
40
+ runtimeCard?: Record<string, unknown>;
39
41
  }
40
42
  export interface SerializeMessageInput {
41
43
  id: string;
package/dist/message.js CHANGED
@@ -129,5 +129,8 @@ export function serializeStoredMessage(input) {
129
129
  if (contactCard) {
130
130
  result.contactCard = contactCard;
131
131
  }
132
+ if (isRecord(data.runtimeCard)) {
133
+ result.runtimeCard = data.runtimeCard;
134
+ }
132
135
  return result;
133
136
  }
@@ -11,7 +11,9 @@ function isHiddenRuntimeCardMetadata(metadata) {
11
11
  || metadata.type === 'question_reply'
12
12
  || metadata.type === 'plan_approval_reply'
13
13
  || metadata.type === 'runtime_input_reply'
14
- || metadata.type === 'runtime_input_outcome';
14
+ || metadata.type === 'runtime_input_outcome'
15
+ || metadata.type === 'runtime_card_reply'
16
+ || metadata.type === 'runtime_card_outcome';
15
17
  }
16
18
  export function normalizeTurnMetadata(metadata) {
17
19
  if (!isRecord(metadata))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonmsg/backend-contracts",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Canon backend contract helpers shared by Functions and stream-service",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",