@segmentstream/ontology 0.154.0 → 0.156.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.
@@ -664,9 +664,12 @@ export interface AgentStore {
664
664
  }) => Effect.Effect<SeenChat>;
665
665
  /**
666
666
  * Records a person's private chat with the agent for the inbox: creates the `agent_chat` of kind
667
- * `private`, with the person as its one member, or keeps its title, recipient and thread current,
667
+ * `private`, with the person as its one member (one of its members for a `shared` chat, such as
668
+ * an email thread several people write in), or keeps its title, recipient and thread current,
668
669
  * and records when it last had a message, as `seeChat` does. `undefined`, recording nothing,
669
- * unless the person is an active member holding a role of the ontology's `inbox`. Without
670
+ * unless the person is an active member holding a role of the ontology's `inbox`; in a `shared`
671
+ * chat recorded already, a member without one does not join it, and is answered whether staff
672
+ * hold it. Without
670
673
  * `memberId`, the chat is someone's who is no user: recorded without members, whose members it
671
674
  * leaves as they are, and only on a channel `inbox.channels` lists; no user is created. Absent
672
675
  * on stores that predate the inbox.
@@ -744,6 +747,11 @@ export interface HeldReplyInput {
744
747
  readonly to?: ReadonlyArray<string>;
745
748
  /** A reply to mail: the addresses it copies, in `Cc`; none when absent. */
746
749
  readonly cc?: ReadonlyArray<string>;
750
+ /**
751
+ * A reply in a chat several people share, such as an email thread: the members who read it in
752
+ * the chat's history, by user id; its member alone when absent.
753
+ */
754
+ readonly participants?: ReadonlyArray<string>;
747
755
  readonly threadId: string;
748
756
  readonly replyTo: string | null;
749
757
  readonly memberId: string;
@@ -774,6 +782,11 @@ export interface InboxChatInput {
774
782
  readonly recipient?: string;
775
783
  /** The thread a reply stays in. */
776
784
  readonly threadId?: string;
785
+ /**
786
+ * A private chat several people write in, such as an email thread: `memberId` joins its members
787
+ * and no member leaves it. Each message names who reads it.
788
+ */
789
+ readonly shared?: true;
777
790
  }
778
791
  /** The review a held reply became. */
779
792
  export interface HeldReview {
@@ -345,7 +345,9 @@ export function createOntologyService(ontology, config) {
345
345
  : localConnections(config.localConnections)));
346
346
  const replicate = deployedReplication(config);
347
347
  const chatHistory = config.runtimeIdentity === undefined ? undefined : platformChatArchive(config);
348
- const chatDelivery = makeChatDelivery(ontology, connections, config.chatArchive ?? platformDeliveryArchive(config), { settings: config.channels?.telegram, ownOrigins: config.appOrigins },
348
+ const chatDelivery = makeChatDelivery(ontology, connections,
349
+ // @legacy agent.cloud-chat-archive Deliveries reserve here while the store holds no message.
350
+ config.chatArchive ?? platformDeliveryArchive(config), { settings: config.channels?.telegram, ownOrigins: config.appOrigins },
349
351
  // The app's agent sends through a workspace channel, at the origin it takes its tasks at.
350
352
  {
351
353
  origin: config.agentOrigin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@segmentstream/ontology",
3
- "version": "0.154.0",
3
+ "version": "0.156.0",
4
4
  "description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "SegmentStream",