@segmentstream/ontology 0.139.2 → 0.139.3
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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.139.3
|
|
4
|
+
|
|
5
|
+
An approved reply in a Slack direct message is archived in the person's direct message, beside
|
|
6
|
+
their messages, whatever thread it answers, where it was archived under the thread. The agent's
|
|
7
|
+
session, the `whenUnsure` review and the inbox now see it there. It is still sent in the thread it
|
|
8
|
+
answers.
|
|
9
|
+
|
|
3
10
|
## 0.139.2
|
|
4
11
|
|
|
5
12
|
A webhook, the guests' bot check or a workspace channel that moves from a workspace secret to a
|
|
@@ -73,6 +73,13 @@ export interface ChatProvider {
|
|
|
73
73
|
* only sends replies the agent held for review, such as email. Omitted, it is `true`.
|
|
74
74
|
*/
|
|
75
75
|
readonly posts?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether a private chat is one chat whatever thread its messages are in, as a Slack direct
|
|
78
|
+
* message is: the archive keeps a reply to it without a thread, while the reply is still sent in
|
|
79
|
+
* the thread it answers. Omitted, a private chat's thread is part of the chat, as a person's
|
|
80
|
+
* Gmail thread is.
|
|
81
|
+
*/
|
|
82
|
+
readonly privateChatSpansThreads?: boolean;
|
|
76
83
|
/** Whether an id names a chat of this kind on the provider. */
|
|
77
84
|
readonly isTargetId: (externalId: string, kind: Destination["kind"]) => boolean;
|
|
78
85
|
/** Whether an id names a message on the provider that a post may reply to. */
|
|
@@ -83,6 +83,7 @@ export function sendSlack(input) {
|
|
|
83
83
|
export const slackProvider = {
|
|
84
84
|
provider: "slack",
|
|
85
85
|
limit: SLACK_MESSAGE_LIMIT,
|
|
86
|
+
privateChatSpansThreads: true,
|
|
86
87
|
// Channels are `C…`, older private channels `G…`; a private destination is its member's user
|
|
87
88
|
// id, `U…`, or `W…` in an Enterprise Grid organization.
|
|
88
89
|
isTargetId: (externalId, kind) => (kind === "group" ? /^[CG][A-Z0-9]{2,32}$/ : /^[UW][A-Z0-9]{2,32}$/).test(externalId),
|
|
@@ -88,6 +88,9 @@ export function reviewSender(input) {
|
|
|
88
88
|
const chatId = String(review.chat_id);
|
|
89
89
|
const externalId = typeof review.recipient === "string" && review.recipient !== "" ? review.recipient : chatId;
|
|
90
90
|
const threadId = typeof review.thread_id === "string" && review.thread_id !== "" ? review.thread_id : null;
|
|
91
|
+
// The reply is sent in the thread it answers and archived in the chat that keeps the
|
|
92
|
+
// person's messages, where the agent and the judge read it.
|
|
93
|
+
const archivedThreadId = kind === "private" && provider.privateChatSpansThreads === true ? null : threadId;
|
|
91
94
|
// A private chat has one person: the reply needs no quote of their message, which
|
|
92
95
|
// they may have deleted since.
|
|
93
96
|
const replyTo = kind === "group" && typeof review.reply_to === "string" && review.reply_to !== ""
|
|
@@ -163,7 +166,7 @@ export function reviewSender(input) {
|
|
|
163
166
|
provider: providerName,
|
|
164
167
|
chatId,
|
|
165
168
|
chatType: kind,
|
|
166
|
-
threadId,
|
|
169
|
+
threadId: archivedThreadId,
|
|
167
170
|
participantIds: target.participantIds,
|
|
168
171
|
senderId: "agent",
|
|
169
172
|
senderName: "agent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.139.
|
|
3
|
+
"version": "0.139.3",
|
|
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",
|