@segmentstream/agent 0.9.1 → 0.10.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.
Files changed (49) hide show
  1. package/README.md +8 -0
  2. package/dist/_chunks/{build-metadata-DMD3azjO.mjs → build-metadata-CYEMFYjL.mjs} +1 -1
  3. package/dist/_chunks/{inbound-request-B8Eyjz1O.mjs → inbound-request-BrWspFw5.mjs} +2 -1
  4. package/dist/extension/extension.d.ts +2 -0
  5. package/dist/extension/extension.mjs +3 -1
  6. package/dist/extension/hooks/group-routing.d.ts +2 -0
  7. package/dist/extension/hooks/group-routing.mjs +10 -0
  8. package/dist/extension/lib/build-metadata.mjs +1 -1
  9. package/dist/extension/lib/conversation-runtime.d.ts +1 -1
  10. package/dist/extension/lib/conversation-runtime.mjs +23 -1
  11. package/dist/extension/lib/group-routing/burst.d.ts +28 -0
  12. package/dist/extension/lib/group-routing/burst.mjs +64 -0
  13. package/dist/extension/lib/group-routing/conversation-prompt.d.ts +10 -0
  14. package/dist/extension/lib/group-routing/conversation-prompt.mjs +16 -0
  15. package/dist/extension/lib/group-routing/conversation-router.d.ts +58 -0
  16. package/dist/extension/lib/group-routing/conversation-router.mjs +182 -0
  17. package/dist/extension/lib/group-routing/conversation.d.ts +46 -0
  18. package/dist/extension/lib/group-routing/conversation.mjs +262 -0
  19. package/dist/extension/lib/group-routing/dequeue.d.ts +5 -0
  20. package/dist/extension/lib/group-routing/dequeue.mjs +141 -0
  21. package/dist/extension/lib/group-routing/observed.d.ts +2 -0
  22. package/dist/extension/lib/group-routing/policy.d.ts +19 -1
  23. package/dist/extension/lib/group-routing/policy.mjs +49 -11
  24. package/dist/extension/lib/group-routing/replay.d.ts +2 -2
  25. package/dist/extension/lib/group-routing/replay.mjs +51 -11
  26. package/dist/extension/lib/group-routing/router.d.ts +8 -1
  27. package/dist/extension/lib/group-routing/router.mjs +65 -0
  28. package/dist/extension/lib/group-routing/routing-context.mjs +10 -0
  29. package/dist/extension/lib/telegram/adapter.mjs +10 -2
  30. package/dist/extension/lib/telegram/attachment-description.mjs +1 -1
  31. package/dist/extension/lib/telegram/attachments-send.mjs +1 -1
  32. package/dist/extension/lib/telegram/confirmation-expiry.mjs +1 -1
  33. package/dist/extension/lib/telegram/confirmations.mjs +1 -1
  34. package/dist/extension/lib/telegram/conversations.mjs +1 -1
  35. package/dist/extension/lib/telegram/customer-text.mjs +1 -1
  36. package/dist/extension/lib/telegram/deferred-confirmations.mjs +1 -1
  37. package/dist/extension/lib/telegram/files.mjs +1 -1
  38. package/dist/extension/lib/telegram/health.mjs +1 -1
  39. package/dist/extension/lib/telegram/images.mjs +1 -1
  40. package/dist/extension/lib/telegram/inbound-request.d.ts +2 -0
  41. package/dist/extension/lib/telegram/inbound-request.mjs +1 -1
  42. package/dist/extension/lib/telegram/inbound.d.ts +2 -0
  43. package/dist/extension/lib/telegram/inbound.mjs +122 -11
  44. package/dist/extension/lib/telegram/lifecycle.mjs +2 -2
  45. package/dist/extension/lib/telegram/media-policy.mjs +1 -1
  46. package/dist/extension/lib/telegram/silent.mjs +1 -1
  47. package/dist/extension/lib/telegram/turn-errors.mjs +1 -1
  48. package/dist/extension/lib/telegram/voice.mjs +1 -1
  49. package/package.json +2 -2
@@ -4,9 +4,9 @@ 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-DMD3azjO.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-CYEMFYjL.mjs";
8
8
  import { object } from "../confirmation-description.mjs";
9
- import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-B8Eyjz1O.mjs";
9
+ import { n as currentInboundRequest, p as reportTelegramError } from "../../../_chunks/inbound-request-BrWspFw5.mjs";
10
10
  import { needsConfirmation } from "../confirmations.mjs";
11
11
  import { actionToolName, ontologyTools } from "../ontology-tools.mjs";
12
12
  function attachmentLifecycle(options) {
@@ -5,7 +5,7 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { DEFAULT_IMAGE_DESCRIPTION_MODEL } from "../../config.mjs";
8
- import { p as reportTelegramError } from "../../../_chunks/inbound-request-B8Eyjz1O.mjs";
8
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-BrWspFw5.mjs";
9
9
  function planMedia(capabilities, descriptionModel = null) {
10
10
  if (typeof descriptionModel === "string") return {
11
11
  images: "describe",
@@ -9,7 +9,7 @@ import { agentMessage, observedChatKey } from "../group-routing/observed.mjs";
9
9
  import { confirmationLocale } from "./confirmation-text.mjs";
10
10
  import { splitTelegramText } from "./format.mjs";
11
11
  import { inTelegramSendQueue } from "./send-queue.mjs";
12
- import { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-B8Eyjz1O.mjs";
12
+ import { a as TelegramDeliveryError, l as customerMessage, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-BrWspFw5.mjs";
13
13
  const SILENT_MARKERS = new Set(["[silent]", "no_reply"]);
14
14
  function isSilentReply(text) {
15
15
  return SILENT_MARKERS.has(text.trim().toLowerCase());
@@ -6,7 +6,7 @@ __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import { memberIdOf } from "./principal.mjs";
8
8
  import { confirmationLocale } from "./confirmation-text.mjs";
9
- import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-B8Eyjz1O.mjs";
9
+ import { c as customerCopy, d as failureText, o as currentLocale, p as reportTelegramError } from "../../../_chunks/inbound-request-BrWspFw5.mjs";
10
10
  const telegramFailureEvents = {
11
11
  async "turn.cancelled"(event, channel, context) {
12
12
  const errorId = reportTelegramError("turn_cancelled", event, {
@@ -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 { p as reportTelegramError } from "../../../_chunks/inbound-request-B8Eyjz1O.mjs";
7
+ import { p as reportTelegramError } from "../../../_chunks/inbound-request-BrWspFw5.mjs";
8
8
  import "../connection-proxy.mjs";
9
9
  import { gateway, transcribe } from "ai";
10
10
  const LABELS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segmentstream/agent",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Mount a SegmentStream workspace's agent on eve: the ontology as tools, acting as the member who writes, and Telegram through the workspace's connection.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "SegmentStream",
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "dependencies": {
64
64
  "@chat-adapter/telegram": "4.41.0",
65
- "@segmentstream-cloud/ontology": "0.43.1",
65
+ "@segmentstream-cloud/ontology": "0.44.0",
66
66
  "@vercel/oidc": "^3.8.4",
67
67
  "ai": "^7.0.128",
68
68
  "csv-parse": "^7.0.3",