@segmentstream/agent 0.108.1 → 0.108.2

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,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.108.2
4
+
5
+ The platform's instructions, which the SDK gives every workspace's agent, now tell the model how to
6
+ answer in a chat on a channel: with one `segmentstream__reply` call holding the whole message, and
7
+ no text outside it. They also say how to use its `files`, its `to` and `cc` for mail, and its
8
+ `note` for staff. An upgrade brings this to every agent, so a workspace's
9
+ `agent/agent/instructions.md` needs no paragraph of its own about it. The starter's paragraph is
10
+ removed.
11
+
12
+ This replaces the earlier `Action required` to copy that paragraph into a workspace's
13
+ instructions. Instead, remove any words in a workspace's instructions that tell the agent to answer
14
+ in plain text in its channel chats.
15
+
3
16
  ## 0.108.1
4
17
 
5
18
  Pins @segmentstream/ontology 0.189.0.
@@ -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.108.1";
7
+ var version = "0.108.2";
8
8
  function agentBuild(environment = process.env) {
9
9
  return {
10
10
  agent: version,
@@ -88,6 +88,17 @@ values; say when the ontology does not hold what was asked.
88
88
  speaker's `sent_at` is the message's time in UTC, and so the current time: take today's date and
89
89
  words such as "today" and "yesterday" from it, never from the dates of earlier messages.
90
90
 
91
+ ## Replying in a chat on a channel
92
+
93
+ In a chat on a channel (email, Telegram, WhatsApp, Slack or one of the workspace's own), answer
94
+ the person with `segmentstream__reply`: call it once, when your answer is complete, with the whole
95
+ message in `text`, in the chat's language and formatted as the channel shows it. Only the call
96
+ reaches the person, and it ends your turn, so write no text outside it. Put the files you send with
97
+ the answer in its `files`. In a reply to mail, set `to` and `cc` only to change whom of the
98
+ thread's people it goes to. Use `note` to tell the workspace's staff what you checked, assumed or
99
+ could not confirm; the person never sees it. If the call is refused, fix what its error names and
100
+ call it again. Where the tool is not offered, as in the app's own chat, answer in plain text.
101
+
91
102
  ## When not to reply
92
103
 
93
104
  Call `segmentstream__no_reply` with a short reason, and take no other action, when:
@@ -114,7 +125,7 @@ text in the requesting chat, whichever channel it is; only the requester can act
114
125
  expires after ten minutes. Telegram's card also offers Edit: then ask what to change and make a new
115
126
  call for the revision, since the cancelled call cannot be reused. Never resend a post whose
116
127
  delivery is uncertain, not even through a new call. A post never starts an agent, yours or another.
117
- For a reply in the current chat, answer normally; if chat posting is unavailable, say so. Update a
128
+ For a reply in the current chat, answer as above; if chat posting is unavailable, say so. Update a
118
129
  group's purpose and usage in the `agent_chat` registry only when permitted.
119
130
 
120
131
  ## Files
@@ -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-Cv8q0ZAC.mjs";
7
+ export { t as agentBuild } from "../../_chunks/build-metadata-9F6QlXQc.mjs";
@@ -12,7 +12,7 @@ import { dispatchStructuredMessage, structuredMessage } from "./structured.mjs";
12
12
  import { handleWorkspaceCallback } from "./callbacks.mjs";
13
13
  import { workspaceTriage } from "../triage.mjs";
14
14
  import { telegramText, withTelegramTexts } from "./texts.mjs";
15
- import { t as agentBuild } from "../../../_chunks/build-metadata-Cv8q0ZAC.mjs";
15
+ import { t as agentBuild } from "../../../_chunks/build-metadata-9F6QlXQc.mjs";
16
16
  import { attachmentLifecycle } from "./lifecycle.mjs";
17
17
  import { manifestOf } from "../../config.mjs";
18
18
  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-Cv8q0ZAC.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-9F6QlXQc.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 { At as telegramRuntimeSource, Dt as principalRuntimeSource, E as OntologyActionNotPermitted, L as needsConfirmation, W as member, c as currentInboundRequest, j as ontologyTools, k as actionToolName, kt as runtimeEnvelope } from "../../../_chunks/principal-DIQHp6AG.mjs";
8
- import { t as agentBuild } from "../../../_chunks/build-metadata-Cv8q0ZAC.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-9F6QlXQc.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.108.1",
3
+ "version": "0.108.2",
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",