@segmentstream/ontology 0.152.0 → 0.153.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/CHANGELOG.md +4 -0
- package/dist/analyze.js +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.153.0
|
|
4
|
+
|
|
5
|
+
An email channel with `record: "all"` takes the mailbox's chats into the inbox. A verified sender's chat that has no member joins the inbox without members when the ontology's `inbox.channels` lists the channel, which may now name an email channel. Mail that failed DMARC never joins. Mail staff send from the mailbox is recorded in each recipient's chat, including a chat the agent has none of yet, when `recordQuery`, if any, finds it.
|
|
6
|
+
|
|
3
7
|
## 0.152.0
|
|
4
8
|
|
|
5
9
|
`agent_chat.importHistory` writes a chat's earlier history into the workspace's own database once
|
package/dist/analyze.js
CHANGED
|
@@ -47,7 +47,11 @@ const RESERVED_CHAT_NAMES = new Set(["web", "task", WORKSPACE_CHANNEL_KIND]);
|
|
|
47
47
|
/** The keys of `chat` that are settings, not channels. */
|
|
48
48
|
const CHAT_SETTINGS = new Set(["attribution", "retentionDays"]);
|
|
49
49
|
/** The kinds of channel whose agent records every message it receives, when asked to. */
|
|
50
|
-
const INBOX_CHANNEL_KINDS = new Set([
|
|
50
|
+
const INBOX_CHANNEL_KINDS = new Set([
|
|
51
|
+
"whatsapp",
|
|
52
|
+
"email",
|
|
53
|
+
WORKSPACE_CHANNEL_KIND,
|
|
54
|
+
]);
|
|
51
55
|
/** Whether `chat` declares a channel of `kind`: the one named after it, or another of the kind. */
|
|
52
56
|
function declaresChatKind(chat, kind) {
|
|
53
57
|
return (isPlainObject(chat) &&
|
|
@@ -453,7 +457,7 @@ recordingChannels, report) {
|
|
|
453
457
|
}
|
|
454
458
|
/**
|
|
455
459
|
* `inbox.channels`: the channels whose chats with people who are no users join the inbox, each a
|
|
456
|
-
* WhatsApp or workspace channel `chat` declares, as only their agent records the messages of
|
|
460
|
+
* WhatsApp, email or workspace channel `chat` declares, as only their agent records the messages of
|
|
457
461
|
* people it does not answer; none when absent.
|
|
458
462
|
*/
|
|
459
463
|
function inboxChannels(value, recordingChannels, report) {
|
|
@@ -464,8 +468,8 @@ function inboxChannels(value, recordingChannels, report) {
|
|
|
464
468
|
let valid = true;
|
|
465
469
|
value.forEach((candidate, index) => {
|
|
466
470
|
if (typeof candidate !== "string" || !recordingChannels.includes(candidate)) {
|
|
467
|
-
report("invalid-inbox", `inbox.channels[${index}]`, "Use a WhatsApp or workspace channel chat declares: only their agent records
|
|
468
|
-
'messages of people it does not answer, with record: "all".');
|
|
471
|
+
report("invalid-inbox", `inbox.channels[${index}]`, "Use a WhatsApp, email or workspace channel chat declares: only their agent records " +
|
|
472
|
+
'the messages of people it does not answer, with record: "all".');
|
|
469
473
|
valid = false;
|
|
470
474
|
}
|
|
471
475
|
else if (!channels.includes(candidate)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.153.0",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|