@agentvault/claude-bridge 0.8.22 → 0.8.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
@@ -33,6 +33,12 @@ export interface ArmingSnapshot {
33
33
  * its ABSENCE is how we identify a true owner↔agent 1:1 DM. */
34
34
  export interface MessageMeta {
35
35
  roomId?: string;
36
+ /** #1418 — the 1:1 conversation the message came from. A reply is sent as
37
+ * that conversation's turn, so it reaches that person only. */
38
+ conversationId?: string;
39
+ /** #1418 — the 1:1 group the message decrypted under (MLS). Attested, so it
40
+ * places the person even when the conversation is not mapped yet. */
41
+ conversationGroupId?: string;
36
42
  /** #621 — set by SecureChannel when the message decrypted under the owner's
37
43
  * 1:1 material. Gates the full-access DM lane; see the `message` handler. */
38
44
  ownerDm1to1?: boolean;
@@ -109,11 +115,18 @@ export type BridgeTarget = {
109
115
  roomId: string;
110
116
  } | {
111
117
  kind: "dm";
118
+ conversationId?: string;
119
+ groupId?: string;
112
120
  };
113
121
  /** Channel surface ActiveTarget needs to route an outbound reply. */
114
122
  export interface ReplyChannel {
115
123
  sendToRoom(roomId: string, text: string): Promise<void>;
116
124
  send(text: string): Promise<void>;
125
+ /** #1418 — SecureChannel: run `fn` as `conversationId`'s turn, so an
126
+ * untargeted send inside it reaches that conversation's person only. */
127
+ runForConversation?<T>(conversationId: string | undefined, fn: () => Promise<T>, opts?: {
128
+ groupId?: string;
129
+ }): Promise<T>;
117
130
  }
118
131
  /**
119
132
  * Tracks the destination of the most recent inbound message and routes outbound
@@ -128,7 +141,7 @@ export interface ReplyChannel {
128
141
  export declare class ActiveTarget {
129
142
  private target;
130
143
  setRoom(roomId: string): void;
131
- setDm(): void;
144
+ setDm(conversationId?: string, groupId?: string): void;
132
145
  get current(): BridgeTarget | null;
133
146
  reply(channel: ReplyChannel, text: string): Promise<void>;
134
147
  /**