@ziggs-ai/api-client 0.37.0 → 0.37.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.
|
@@ -5,6 +5,8 @@ export interface SendPresentation {
|
|
|
5
5
|
ok: true;
|
|
6
6
|
chatId: string;
|
|
7
7
|
messageId: string;
|
|
8
|
+
/** Keep the server's delivery guidance on every client surface. */
|
|
9
|
+
message?: string;
|
|
8
10
|
/** What the server did with this send, stated so it cannot be over-read. */
|
|
9
11
|
delivered: string;
|
|
10
12
|
/** Who it was addressed to, exactly as the server resolved it. */
|
|
@@ -24,6 +24,7 @@ export function presentSendResult(result, env) {
|
|
|
24
24
|
ok: true,
|
|
25
25
|
chatId: result.chatId,
|
|
26
26
|
messageId: result.messageId,
|
|
27
|
+
...(result.message ? { message: result.message } : {}),
|
|
27
28
|
...(workContext ? { workContext } : {}),
|
|
28
29
|
};
|
|
29
30
|
if (!delivery) {
|
|
@@ -38,9 +39,11 @@ export function presentSendResult(result, env) {
|
|
|
38
39
|
// What counted it, in the server's words: a stranger's free messages with a
|
|
39
40
|
// listed agent run out, and the person writing needs to know before they do.
|
|
40
41
|
const counted = result.coverage?.message ? ` ${result.coverage.message}` : '';
|
|
41
|
-
const routing = delivery.
|
|
42
|
-
?
|
|
43
|
-
:
|
|
42
|
+
const routing = delivery.broadcast
|
|
43
|
+
? "This human-only broadcast does not wake assistants or stand-ins. If you need a reply, send a new message in this same chat to the person's returned participant id (receiverId), with a fresh message id or idempotency key. Existing conversation permissions still apply."
|
|
44
|
+
: delivery.reachable
|
|
45
|
+
? `Assigned to ${delivery.assignee ?? 'nobody'}; reachable: ${delivery.reachable}${delivery.reason ? ` (${delivery.reason})` : ''}.${delivery.lastRead ? ` Last inbox read: ${delivery.lastRead}.` : ''}`
|
|
46
|
+
: 'Mailbox routing is unconfirmed; a person may be covered by an assistant.';
|
|
44
47
|
return {
|
|
45
48
|
...base,
|
|
46
49
|
delivered: `Message ${result.messageId} was accepted into chat ${result.chatId}, addressed to ${destination}. ${routing} Accepted is not read and does not confirm a wake or reply.${counted}`,
|