@canonmsg/backend-contracts 4.0.1 → 5.0.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.js +1 -10
- package/dist/canon-verbs.schema.json +1 -1
- package/dist/cjs/agentBehaviorPolicy.js +1 -10
- package/dist/cjs/runtimeCardStorage.js +0 -3
- package/dist/cjs/verbSchemas.js +1 -1
- package/dist/runtimeCardStorage.d.ts +0 -1
- package/dist/runtimeCardStorage.js +0 -3
- package/dist/verbSchemas.js +1 -1
- package/package.json +2 -2
|
@@ -52,16 +52,9 @@ function resolveGroupMentionRequirement(input) {
|
|
|
52
52
|
&& typeof input.requireMentionForGroupReplies !== 'boolean') {
|
|
53
53
|
throw new Error('requireMentionForGroupReplies must be a boolean');
|
|
54
54
|
}
|
|
55
|
-
if (input.requireMentionForGroupAgentReplies !== undefined
|
|
56
|
-
&& typeof input.requireMentionForGroupAgentReplies !== 'boolean') {
|
|
57
|
-
throw new Error('requireMentionForGroupAgentReplies must be a boolean');
|
|
58
|
-
}
|
|
59
55
|
if (typeof input.requireMentionForGroupReplies === 'boolean') {
|
|
60
56
|
return input.requireMentionForGroupReplies;
|
|
61
57
|
}
|
|
62
|
-
if (typeof input.requireMentionForGroupAgentReplies === 'boolean') {
|
|
63
|
-
return input.requireMentionForGroupAgentReplies;
|
|
64
|
-
}
|
|
65
58
|
return undefined;
|
|
66
59
|
}
|
|
67
60
|
export function parseAgentBehaviorSettings(raw) {
|
|
@@ -104,9 +97,7 @@ export function normalizeStoredAgentBehaviorPolicy(raw) {
|
|
|
104
97
|
: {}),
|
|
105
98
|
...(typeof raw.requireMentionForGroupReplies === 'boolean'
|
|
106
99
|
? { requireMentionForGroupReplies: raw.requireMentionForGroupReplies }
|
|
107
|
-
:
|
|
108
|
-
? { requireMentionForGroupReplies: raw.requireMentionForGroupAgentReplies }
|
|
109
|
-
: {}),
|
|
100
|
+
: {}),
|
|
110
101
|
...(typeof raw.maxConsecutiveAgentTurns === 'number' || raw.maxConsecutiveAgentTurns === null
|
|
111
102
|
? { maxConsecutiveAgentTurns: raw.maxConsecutiveAgentTurns }
|
|
112
103
|
: {}),
|
|
@@ -661,7 +661,7 @@
|
|
|
661
661
|
}
|
|
662
662
|
},
|
|
663
663
|
"send_to_result": {
|
|
664
|
-
"description": "Canonical outcome vocabulary. Legacy binding drift documented in
|
|
664
|
+
"description": "Canonical outcome vocabulary. Legacy binding drift documented in docs/design/verb-bindings.md (hermes 'opened' -> messaged without messageId; hermes 'denied' -> blocked).",
|
|
665
665
|
"oneOf": [
|
|
666
666
|
{
|
|
667
667
|
"type": "object",
|
|
@@ -62,16 +62,9 @@ function resolveGroupMentionRequirement(input) {
|
|
|
62
62
|
&& typeof input.requireMentionForGroupReplies !== 'boolean') {
|
|
63
63
|
throw new Error('requireMentionForGroupReplies must be a boolean');
|
|
64
64
|
}
|
|
65
|
-
if (input.requireMentionForGroupAgentReplies !== undefined
|
|
66
|
-
&& typeof input.requireMentionForGroupAgentReplies !== 'boolean') {
|
|
67
|
-
throw new Error('requireMentionForGroupAgentReplies must be a boolean');
|
|
68
|
-
}
|
|
69
65
|
if (typeof input.requireMentionForGroupReplies === 'boolean') {
|
|
70
66
|
return input.requireMentionForGroupReplies;
|
|
71
67
|
}
|
|
72
|
-
if (typeof input.requireMentionForGroupAgentReplies === 'boolean') {
|
|
73
|
-
return input.requireMentionForGroupAgentReplies;
|
|
74
|
-
}
|
|
75
68
|
return undefined;
|
|
76
69
|
}
|
|
77
70
|
function parseAgentBehaviorSettings(raw) {
|
|
@@ -114,9 +107,7 @@ function normalizeStoredAgentBehaviorPolicy(raw) {
|
|
|
114
107
|
: {}),
|
|
115
108
|
...(typeof raw.requireMentionForGroupReplies === 'boolean'
|
|
116
109
|
? { requireMentionForGroupReplies: raw.requireMentionForGroupReplies }
|
|
117
|
-
:
|
|
118
|
-
? { requireMentionForGroupReplies: raw.requireMentionForGroupAgentReplies }
|
|
119
|
-
: {}),
|
|
110
|
+
: {}),
|
|
120
111
|
...(typeof raw.maxConsecutiveAgentTurns === 'number' || raw.maxConsecutiveAgentTurns === null
|
|
121
112
|
? { maxConsecutiveAgentTurns: raw.maxConsecutiveAgentTurns }
|
|
122
113
|
: {}),
|
|
@@ -5,9 +5,6 @@ function isRecord(value) {
|
|
|
5
5
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
6
6
|
}
|
|
7
7
|
function decodeStoredRuntimeCard(input) {
|
|
8
|
-
if (isRecord(input.runtimeCard)) {
|
|
9
|
-
return input.runtimeCard;
|
|
10
|
-
}
|
|
11
8
|
if (typeof input.runtimeCardJson !== 'string' || !input.runtimeCardJson.trim()) {
|
|
12
9
|
return undefined;
|
|
13
10
|
}
|
package/dist/cjs/verbSchemas.js
CHANGED
|
@@ -404,7 +404,7 @@ const send_to_input = {
|
|
|
404
404
|
dependentRequired: { selfContext: ['sourceConversationId'] },
|
|
405
405
|
};
|
|
406
406
|
const send_to_result = {
|
|
407
|
-
description: 'Canonical outcome vocabulary. Legacy binding drift documented in
|
|
407
|
+
description: 'Canonical outcome vocabulary. Legacy binding drift documented in docs/design/verb-bindings.md '
|
|
408
408
|
+ "(hermes 'opened' -> messaged without messageId; hermes 'denied' -> blocked).",
|
|
409
409
|
oneOf: [
|
|
410
410
|
{
|
|
@@ -2,9 +2,6 @@ function isRecord(value) {
|
|
|
2
2
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
3
3
|
}
|
|
4
4
|
export function decodeStoredRuntimeCard(input) {
|
|
5
|
-
if (isRecord(input.runtimeCard)) {
|
|
6
|
-
return input.runtimeCard;
|
|
7
|
-
}
|
|
8
5
|
if (typeof input.runtimeCardJson !== 'string' || !input.runtimeCardJson.trim()) {
|
|
9
6
|
return undefined;
|
|
10
7
|
}
|
package/dist/verbSchemas.js
CHANGED
|
@@ -399,7 +399,7 @@ const send_to_input = {
|
|
|
399
399
|
dependentRequired: { selfContext: ['sourceConversationId'] },
|
|
400
400
|
};
|
|
401
401
|
const send_to_result = {
|
|
402
|
-
description: 'Canonical outcome vocabulary. Legacy binding drift documented in
|
|
402
|
+
description: 'Canonical outcome vocabulary. Legacy binding drift documented in docs/design/verb-bindings.md '
|
|
403
403
|
+ "(hermes 'opened' -> messaged without messageId; hermes 'denied' -> blocked).",
|
|
404
404
|
oneOf: [
|
|
405
405
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonmsg/backend-contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@canonmsg/rich-cards": "^0.8.
|
|
46
|
+
"@canonmsg/rich-cards": "^0.8.7",
|
|
47
47
|
"@types/node": "^22.0.0",
|
|
48
48
|
"ajv": "^8.20.0",
|
|
49
49
|
"typescript": "~5.7.0",
|