@agentvault/grok-bridge 0.4.14 → 0.4.15

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
@@ -14,6 +14,9 @@ export interface RoomMessage {
14
14
  roomId: string;
15
15
  senderName: string;
16
16
  plaintext: string;
17
+ /** #1223 — the text the sender typed, before any attachment was folded into
18
+ * `plaintext`. The @ gate reads this; absent on emitters < 0.23.42. */
19
+ caption?: string;
17
20
  /** True when the sender is another agent (SecureChannel derives this from the
18
21
  * room roster). Used to decide reply expectation: a human/owner speaking in a
19
22
  * room always expects a reply; agent-authored traffic does not (the agent may
package/dist/index.js CHANGED
@@ -64657,11 +64657,11 @@ var init_mls_kp_pool = __esm2({
64657
64657
  }
64658
64658
  });
64659
64659
  function ownIdentity() {
64660
- const v2 = true ? "0.23.41" : FALLBACK;
64660
+ const v2 = true ? "0.23.42" : FALLBACK;
64661
64661
  return `${PACKAGE}@${v2}`;
64662
64662
  }
64663
64663
  function buildSha() {
64664
- const raw = true ? "916d6c5-dirty" : "";
64664
+ const raw = true ? "d9d53a0-dirty" : "";
64665
64665
  const cleaned = (raw ?? "").trim();
64666
64666
  return !cleaned || cleaned === "unknown" ? null : cleaned;
64667
64667
  }
@@ -66912,7 +66912,7 @@ ${text}`;
66912
66912
  */
66913
66913
  sendActivitySpan(spanData) {
66914
66914
  if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
66915
- const pluginVersion = true ? "0.23.41" : "0.0.0-dev";
66915
+ const pluginVersion = true ? "0.23.42" : "0.0.0-dev";
66916
66916
  const agentName = this.config.agentName ?? "Agent";
66917
66917
  const resource = {
66918
66918
  "service.name": "agentvault-agent",
@@ -68850,7 +68850,7 @@ ${text}`;
68850
68850
  agentVersion: this.config.agentVersion ?? "0.0.0",
68851
68851
  // __AV_VERSION__ is injected by esbuild from package.json at build time.
68852
68852
  // Falls back to "0.0.0-dev" in non-bundled contexts (tests).
68853
- pluginVersion: true ? "0.23.41" : "0.0.0-dev"
68853
+ pluginVersion: true ? "0.23.42" : "0.0.0-dev"
68854
68854
  });
68855
68855
  this._telemetryReporter.startAutoFlush(3e4);
68856
68856
  }
@@ -69174,7 +69174,7 @@ ${text}`;
69174
69174
  agentVersion: this.config.agentVersion ?? "0.0.0",
69175
69175
  // __AV_VERSION__ is injected by esbuild from package.json at build time.
69176
69176
  // Falls back to "0.0.0-dev" in non-bundled contexts (tests).
69177
- pluginVersion: true ? "0.23.41" : "0.0.0-dev"
69177
+ pluginVersion: true ? "0.23.42" : "0.0.0-dev"
69178
69178
  });
69179
69179
  this._telemetryReporter.startAutoFlush(3e4);
69180
69180
  }
@@ -69937,7 +69937,13 @@ ${messageText}`;
69937
69937
  messageType: msgData.message_type ?? "text",
69938
69938
  priority: msgData.priority ?? "normal",
69939
69939
  envelopeVersion: msgData.envelope_version ?? "1.0.0",
69940
- roomId
69940
+ roomId,
69941
+ // #1223 — the pre-fold text. This DR `message` path also sets `roomId`
69942
+ // and folds an attachment into `emitText`, so without this a room
69943
+ // message that reaches the gate here would fall back to the folded
69944
+ // text (the same bug the MLS room path fixes). `messageText` is the
69945
+ // envelope text before the fold; `emitText` is the folded copy.
69946
+ caption: messageText
69941
69947
  };
69942
69948
  this.emit("message", emitText, metadata);
69943
69949
  Promise.resolve(this.config.onMessage?.(emitText, metadata)).catch((err) => {
@@ -70616,6 +70622,7 @@ ${baseText}`;
70616
70622
  await this._refreshRoomRoster(resolvedRoomId);
70617
70623
  }
70618
70624
  }
70625
+ const caption = messageText;
70619
70626
  const addressed = parseMentions(messageText).length > 0;
70620
70627
  if (roomAttachment && !addressed) {
70621
70628
  this._deferRoomAttachment(resolvedRoomId, roomAttachment);
@@ -70642,7 +70649,8 @@ ${baseText}`;
70642
70649
  senderDeviceId,
70643
70650
  senderIsAgent,
70644
70651
  senderName: senderMember?.displayName || "unknown",
70645
- roomName: this._persisted?.rooms?.[resolvedRoomId]?.name
70652
+ roomName: this._persisted?.rooms?.[resolvedRoomId]?.name,
70653
+ caption
70646
70654
  };
70647
70655
  const senderLabel = senderMember?.displayName || "someone";
70648
70656
  this._appendHistory("owner", messageText, `room:${resolvedRoomId}`);
@@ -70651,6 +70659,9 @@ ${baseText}`;
70651
70659
  senderDeviceId,
70652
70660
  senderName: senderLabel,
70653
70661
  plaintext: messageText,
70662
+ // #1223 — what the sender typed, before the attachment fold. The
70663
+ // bridges gate on this (falling back to `plaintext` when absent).
70664
+ caption,
70654
70665
  messageType,
70655
70666
  timestamp: data.created_at ?? (/* @__PURE__ */ new Date()).toISOString(),
70656
70667
  // Native bridge (claude-room-bridge) consumes this to decide reply
@@ -100147,7 +100158,7 @@ var init_index = __esm2({
100147
100158
  await init_skill_telemetry();
100148
100159
  await init_policy_enforcer();
100149
100160
  init_room_protocol();
100150
- VERSION = true ? "0.23.41" : "0.0.0-dev";
100161
+ VERSION = true ? "0.23.42" : "0.0.0-dev";
100151
100162
  }
100152
100163
  });
100153
100164
  await init_index();
@@ -100923,7 +100934,7 @@ function _makeOwesReply(agentName, channel, log) {
100923
100934
  );
100924
100935
  }
100925
100936
  return owesRoomReply(
100926
- e.plaintext,
100937
+ e.caption ?? e.plaintext,
100927
100938
  own,
100928
100939
  own,
100929
100940
  e.senderIsAgent,
@@ -101084,7 +101095,7 @@ async function main() {
101084
101095
  const info = parseInfoFlags(process.argv.slice(2));
101085
101096
  if (info.showVersion || info.showHelp) {
101086
101097
  const version2 = buildClientVersion2(
101087
- true ? "0.4.14" : void 0
101098
+ true ? "0.4.15" : void 0
101088
101099
  );
101089
101100
  if (info.showVersion) printLine(version2);
101090
101101
  if (info.showHelp) {
@@ -101137,7 +101148,7 @@ async function main() {
101137
101148
  agentName: cfg.agentName,
101138
101149
  platform: "node",
101139
101150
  clientVersion: buildClientVersion2(
101140
- true ? "0.4.14" : void 0
101151
+ true ? "0.4.15" : void 0
101141
101152
  )
101142
101153
  });
101143
101154
  channelRef = channel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvault/grok-bridge",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "type": "module",
5
5
  "description": "AgentVault Grok Bridge — daemon bridging a Grok agent into E2E-encrypted AgentVault direct messages and rooms.",
6
6
  "main": "dist/index.js",