@segmentstream/agent 0.58.0 → 0.59.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 +14 -0
- package/dist/_chunks/{build-metadata-CfH0waBU.mjs → build-metadata-Bfb0yHLW.mjs} +1 -1
- package/dist/extension/instructions.md +1 -1
- package/dist/extension/lib/build-metadata.mjs +1 -1
- package/dist/extension/lib/chat-context.d.ts +4 -1
- package/dist/extension/lib/chat-context.mjs +2 -1
- package/dist/extension/lib/chat-recorder.mjs +1 -1
- package/dist/extension/lib/telegram/adapter.mjs +1 -1
- package/dist/extension/lib/telegram/health.mjs +1 -1
- package/dist/extension/lib/telegram/lifecycle.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.59.0
|
|
4
|
+
|
|
5
|
+
A session in a private chat on WhatsApp, Slack, email or a workspace channel gets the chat context
|
|
6
|
+
Telegram and email chats had: the archived messages of the chat it has not seen join its history
|
|
7
|
+
once, ahead of its next turn, such as a reply someone of the workspace sent from the inbox, which
|
|
8
|
+
it reads as a person's. A new session there starts with the chat's newest messages. Web chats are
|
|
9
|
+
unchanged.
|
|
10
|
+
|
|
11
|
+
Pins @segmentstream/ontology 0.117.0.
|
|
12
|
+
|
|
13
|
+
## 0.58.1
|
|
14
|
+
|
|
15
|
+
Pins @segmentstream/ontology 0.116.0.
|
|
16
|
+
|
|
3
17
|
## 0.58.0
|
|
4
18
|
|
|
5
19
|
The agent reports a person's private chat to the ontology's inbox when the answer to the
|
|
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
var version = "0.
|
|
7
|
+
var version = "0.59.0";
|
|
8
8
|
function agentBuild(environment = process.env) {
|
|
9
9
|
return {
|
|
10
10
|
agent: version,
|
|
@@ -29,7 +29,7 @@ A message you answer while a card is pending cancels that card, so the chat is n
|
|
|
29
29
|
`<approval_recovery>` block names the cancelled actions: none of them ran. Answer the new message;
|
|
30
30
|
when it matters, tell the requester the action did not run and that they can ask again.
|
|
31
31
|
|
|
32
|
-
In Telegram and email chats, a `<chat_messages>` block, oldest first, brings the chat's messages and posts
|
|
32
|
+
In Telegram and email chats, and in private chats on other channels, a `<chat_messages>` block, oldest first, brings the chat's messages and posts
|
|
33
33
|
you have not seen yet: messages not addressed to you, automated posts and messages
|
|
34
34
|
since your last turn. Each entry gives the time, the sender, who wrote it in `by` (`agent` for
|
|
35
35
|
your own messages and posts, a post made for someone carrying their attribution in its text;
|
|
@@ -4,4 +4,4 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
export { t as agentBuild } from "../../_chunks/build-metadata-
|
|
7
|
+
export { t as agentBuild } from "../../_chunks/build-metadata-Bfb0yHLW.mjs";
|
|
@@ -84,7 +84,10 @@ export declare function readChatContext(input: {
|
|
|
84
84
|
readonly guidance?: string;
|
|
85
85
|
readonly now: Date;
|
|
86
86
|
}): Promise<ChatContextRead>;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The chat a session belongs to: a Telegram or email chat, or a private chat on another channel
|
|
89
|
+
* but the web; agent tasks and other chats have none.
|
|
90
|
+
*/
|
|
88
91
|
export declare function chatOf(context: {
|
|
89
92
|
readonly session: {
|
|
90
93
|
readonly auth: HookContext["session"]["auth"];
|
|
@@ -145,7 +145,8 @@ function legacySince(context, turnId) {
|
|
|
145
145
|
const CONTEXT_CHANNELS = new Set(["telegram", "email"]);
|
|
146
146
|
function chatOf(context) {
|
|
147
147
|
const coordinates = chatCoordinates(context);
|
|
148
|
-
|
|
148
|
+
const kind = sessionKind(context);
|
|
149
|
+
return coordinates === void 0 || kind === void 0 || kind === "web" || !CONTEXT_CHANNELS.has(kind) && coordinates.chatType !== "private" || agentTaskIdOf(context.session.auth.current) !== void 0 ? void 0 : coordinates;
|
|
149
150
|
}
|
|
150
151
|
function chatContextHook(archive = chatArchive()) {
|
|
151
152
|
return {
|
|
@@ -53,7 +53,7 @@ function chatCoordinates(context) {
|
|
|
53
53
|
provider: chatChannel(chat),
|
|
54
54
|
chatId: chat.chatId,
|
|
55
55
|
chatType: "private",
|
|
56
|
-
threadId: chat.threadId === "" ? null : chat.threadId,
|
|
56
|
+
threadId: chat.provider === "slack" || chat.threadId === "" ? null : chat.threadId,
|
|
57
57
|
participantIds: [webMemberId],
|
|
58
58
|
senderId: chat.peer ?? null
|
|
59
59
|
};
|
|
@@ -10,7 +10,7 @@ import { groupRoutingHealth } from "../group-routing/health.mjs";
|
|
|
10
10
|
import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
|
|
11
11
|
import { handleWorkspaceCallback, isWorkspaceCallback } from "./callbacks.mjs";
|
|
12
12
|
import { telegramText, withTelegramTexts } from "./texts.mjs";
|
|
13
|
-
import { t as agentBuild } from "../../../_chunks/build-metadata-
|
|
13
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-Bfb0yHLW.mjs";
|
|
14
14
|
import { attachmentLifecycle } from "./lifecycle.mjs";
|
|
15
15
|
import { manifestOf } from "../../config.mjs";
|
|
16
16
|
import { gatewayAttachmentDescriber } from "./attachment-description.mjs";
|
|
@@ -4,7 +4,7 @@ import { createRequire as __eveCreateRequire } from "node:module";
|
|
|
4
4
|
const __filename = __eveFileURLToPath(import.meta.url);
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
|
-
import { t as agentBuild } from "../../../_chunks/build-metadata-
|
|
7
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-Bfb0yHLW.mjs";
|
|
8
8
|
import { runtimeRequestFailure } from "./runtime-request.mjs";
|
|
9
9
|
import { GET } from "eve/channels";
|
|
10
10
|
const HEALTH_ROUTE = "/eve/v1/telegram/health";
|
|
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
|
|
|
5
5
|
__eveDirname(__filename);
|
|
6
6
|
__eveCreateRequire(import.meta.url);
|
|
7
7
|
import { E as OntologyActionNotPermitted, Ft as principalRuntimeSource, It as runtimeEnvelope, L as needsConfirmation, Lt as telegramRuntimeSource, W as member, c as currentInboundRequest, j as ontologyTools, k as actionToolName } from "../../../_chunks/principal-TJ6zB2rF.mjs";
|
|
8
|
-
import { t as agentBuild } from "../../../_chunks/build-metadata-
|
|
8
|
+
import { t as agentBuild } from "../../../_chunks/build-metadata-Bfb0yHLW.mjs";
|
|
9
9
|
import { object } from "../confirmation-description.mjs";
|
|
10
10
|
var AttachmentLifecycleNotPermitted = class extends Error {
|
|
11
11
|
code = "attachment_lifecycle_not_permitted";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.59.0",
|
|
4
4
|
"description": "The SegmentStream workspace agent: the ontology as tools, acting as the member who writes, and the browser, Telegram, WhatsApp and Slack through the workspace's connections.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@chat-adapter/state-memory": "4.42.0",
|
|
81
81
|
"@chat-adapter/telegram": "4.41.0",
|
|
82
82
|
"@chat-adapter/whatsapp": "4.42.0",
|
|
83
|
-
"@segmentstream/ontology": "0.
|
|
83
|
+
"@segmentstream/ontology": "0.117.0",
|
|
84
84
|
"@vercel/oidc": "^3.8.4",
|
|
85
85
|
"ai": "^7.0.172",
|
|
86
86
|
"chat": "4.42.0",
|