@agentvault/secure-channel 0.6.18 → 0.6.19

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { SecureChannel } from "./channel.js";
2
- export type { SecureChannelConfig, ChannelState, MessageMetadata, AttachmentData, PersistedState, LegacyPersistedState, DeviceSession, HistoryEntry, } from "./types.js";
2
+ export type { SecureChannelConfig, ChannelState, MessageMetadata, AttachmentData, PersistedState, LegacyPersistedState, DeviceSession, HistoryEntry, SendOptions, } from "./types.js";
3
3
  export { agentVaultPlugin, setOcRuntime, getActiveChannel } from "./openclaw-plugin.js";
4
4
  export declare const VERSION = "0.6.13";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExF,eAAO,MAAM,OAAO,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExF,eAAO,MAAM,OAAO,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -45213,6 +45213,10 @@ var SecureChannel = class _SecureChannel extends EventEmitter {
45213
45213
  throw new Error("No active sessions");
45214
45214
  }
45215
45215
  const topicId = options?.topicId ?? this._persisted?.defaultTopicId;
45216
+ const messageType = options?.messageType ?? "text";
45217
+ const priority = options?.priority ?? "normal";
45218
+ const parentSpanId = options?.parentSpanId;
45219
+ const envelopeMetadata = options?.metadata;
45216
45220
  this._appendHistory("agent", plaintext, topicId);
45217
45221
  const messageGroupId = randomUUID();
45218
45222
  for (const [convId, session] of this._sessions) {
@@ -45235,7 +45239,11 @@ var SecureChannel = class _SecureChannel extends EventEmitter {
45235
45239
  header_blob: msg.headerBlob,
45236
45240
  ciphertext: msg.ciphertext,
45237
45241
  message_group_id: msg.messageGroupId,
45238
- topic_id: msg.topicId
45242
+ topic_id: msg.topicId,
45243
+ message_type: messageType,
45244
+ priority,
45245
+ parent_span_id: parentSpanId,
45246
+ metadata: envelopeMetadata
45239
45247
  }
45240
45248
  })
45241
45249
  );
@@ -45253,6 +45261,21 @@ var SecureChannel = class _SecureChannel extends EventEmitter {
45253
45261
  }
45254
45262
  await this._persistState();
45255
45263
  }
45264
+ /**
45265
+ * Send a typing indicator to all owner devices.
45266
+ * Ephemeral (unencrypted metadata), no ratchet advancement.
45267
+ */
45268
+ sendTyping() {
45269
+ if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
45270
+ for (const convId of this._sessions.keys()) {
45271
+ this._ws.send(
45272
+ JSON.stringify({
45273
+ event: "typing",
45274
+ data: { conversation_id: convId }
45275
+ })
45276
+ );
45277
+ }
45278
+ }
45256
45279
  async stop() {
45257
45280
  this._stopped = true;
45258
45281
  this._flushAcks();
@@ -45735,7 +45758,12 @@ ${messageText}`;
45735
45758
  conversationId: convId,
45736
45759
  timestamp: msgData.created_at,
45737
45760
  topicId,
45738
- attachment: attachData
45761
+ attachment: attachData,
45762
+ spanId: msgData.span_id,
45763
+ parentSpanId: msgData.parent_span_id,
45764
+ messageType: msgData.message_type ?? "text",
45765
+ priority: msgData.priority ?? "normal",
45766
+ envelopeVersion: msgData.envelope_version ?? "1.0.0"
45739
45767
  };
45740
45768
  this.emit("message", emitText, metadata);
45741
45769
  this.config.onMessage?.(emitText, metadata);