@segmentstream/agent 0.59.3 → 0.59.4

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.59.4
4
+
5
+ The Telegram channel runs a turn of a user an open channel created without resolving them again
6
+ when the ontology's identity answer says it does not count them (`counted: false`). With an
7
+ ontology that does not say, it decides from the earlier `member` as before.
8
+
9
+ Pins @segmentstream/ontology 0.121.0.
10
+
3
11
  ## 0.59.3
4
12
 
5
13
  Pins @segmentstream/ontology 0.120.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.59.3";
7
+ var version = "0.59.4";
8
8
  function agentBuild(environment = process.env) {
9
9
  return {
10
10
  agent: version,
@@ -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-Y65ga0cR.mjs";
7
+ export { t as agentBuild } from "../../_chunks/build-metadata-BrgZbtWD.mjs";
@@ -38,6 +38,11 @@ export type IdentityResolution = (({
38
38
  }) & {
39
39
  readonly member: PairedMember;
40
40
  readonly provisioned: boolean;
41
+ /**
42
+ * Whether the ontology counts the person's turns against its limits; absent from an ontology
43
+ * released before it said so.
44
+ */
45
+ readonly counted?: boolean;
41
46
  readonly noticeDue: boolean;
42
47
  readonly onNewUserPending: boolean;
43
48
  /**
@@ -67,6 +67,7 @@ function resolution(value) {
67
67
  status: value.status,
68
68
  member: pairedMember(value),
69
69
  provisioned: value.provisioned,
70
+ ...typeof value.counted === "boolean" ? { counted: value.counted } : {},
70
71
  noticeDue: value.notice_due,
71
72
  onNewUserPending: value.on_new_user_pending,
72
73
  ...value.inbox === true ? { inbox: true } : {}
@@ -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-Y65ga0cR.mjs";
13
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BrgZbtWD.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-Y65ga0cR.mjs";
7
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BrgZbtWD.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";
@@ -415,7 +415,7 @@ async function handleInboundMessage(input) {
415
415
  recordGateDecision("structured_context_actor_changed");
416
416
  return null;
417
417
  }
418
- let turnAdmitted = turn || input.request?.structuredContext !== void 0 || !lookup.provisioned || member.roles.includes("member") && member.roles.length > 1;
418
+ let turnAdmitted = turn || input.request?.structuredContext !== void 0 || !lookup.provisioned || (lookup.counted === void 0 ? member.roles.includes("member") && member.roles.length > 1 : !lookup.counted);
419
419
  let admissionRefused = false;
420
420
  let structuredClaimed = input.request?.structuredContext !== void 0;
421
421
  async function admitTurn(reply) {
@@ -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-Y65ga0cR.mjs";
8
+ import { t as agentBuild } from "../../../_chunks/build-metadata-BrgZbtWD.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.59.3",
3
+ "version": "0.59.4",
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.120.0",
83
+ "@segmentstream/ontology": "0.121.0",
84
84
  "@vercel/oidc": "^3.8.4",
85
85
  "ai": "^7.0.172",
86
86
  "chat": "4.42.0",