@agentvault/grok-bridge 0.4.21 → 0.4.23

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/dist/bridge.d.ts CHANGED
@@ -30,6 +30,12 @@ export interface RoomMessage {
30
30
  * its ABSENCE is how we identify a true owner↔agent 1:1 DM. */
31
31
  export interface MessageMeta {
32
32
  roomId?: string;
33
+ /** #1418 — the 1:1 conversation the message came from. A reply is sent as
34
+ * that conversation's turn, so it reaches that person only. */
35
+ conversationId?: string;
36
+ /** #1418 — the 1:1 group the message decrypted under (MLS). Attested, so it
37
+ * places the person even when the conversation is not mapped yet. */
38
+ conversationGroupId?: string;
33
39
  /** #621 — set by SecureChannel when the message decrypted under the owner's
34
40
  * 1:1 material. Gates the plain-text reply fallback; see the `message` handler. */
35
41
  ownerDm1to1?: boolean;
@@ -75,11 +81,18 @@ export type BridgeTarget = {
75
81
  roomId: string;
76
82
  } | {
77
83
  kind: "dm";
84
+ conversationId?: string;
85
+ groupId?: string;
78
86
  };
79
87
  /** Channel surface ActiveTarget needs to route an outbound reply. */
80
88
  export interface ReplyChannel {
81
89
  sendToRoom(roomId: string, text: string): Promise<void>;
82
90
  send(text: string): Promise<void>;
91
+ /** #1418 — SecureChannel: run `fn` as `conversationId`'s turn, so an
92
+ * untargeted send inside it reaches that conversation's person only. */
93
+ runForConversation?<T>(conversationId: string | undefined, fn: () => Promise<T>, opts?: {
94
+ groupId?: string;
95
+ }): Promise<T>;
83
96
  }
84
97
  /**
85
98
  * Tracks the destination of the most recent inbound message so a single Grok
@@ -98,7 +111,7 @@ export interface ReplyChannel {
98
111
  export declare class ActiveTarget {
99
112
  private target;
100
113
  setRoom(roomId: string): void;
101
- setDm(): void;
114
+ setDm(conversationId?: string, groupId?: string): void;
102
115
  get current(): BridgeTarget | null;
103
116
  /**
104
117
  * Capture the CURRENT target into an immutable reply closure. This is the leak