@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/channel.d.ts +7 -4
- package/dist/channel.d.ts.map +1 -1
- package/dist/cli.js +32 -4
- package/dist/cli.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -2
- package/dist/index.js.map +2 -2
- package/dist/openclaw-entry.d.ts.map +1 -1
- package/dist/openclaw-entry.js +25 -24
- package/dist/openclaw-entry.js.map +2 -2
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/openclaw.plugin.json +2 -2
- package/package.json +1 -1
package/dist/channel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "node:events";
|
|
2
|
-
import type { SecureChannelConfig, ChannelState } from "./types.js";
|
|
2
|
+
import type { SecureChannelConfig, ChannelState, SendOptions } from "./types.js";
|
|
3
3
|
export declare class SecureChannel extends EventEmitter {
|
|
4
4
|
private config;
|
|
5
5
|
private _state;
|
|
@@ -44,9 +44,12 @@ export declare class SecureChannel extends EventEmitter {
|
|
|
44
44
|
* Encrypt and send a message to ALL owner devices (fanout).
|
|
45
45
|
* Each session gets the same plaintext encrypted independently.
|
|
46
46
|
*/
|
|
47
|
-
send(plaintext: string, options?:
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
send(plaintext: string, options?: SendOptions): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Send a typing indicator to all owner devices.
|
|
50
|
+
* Ephemeral (unencrypted metadata), no ratchet advancement.
|
|
51
|
+
*/
|
|
52
|
+
sendTyping(): void;
|
|
50
53
|
stop(): Promise<void>;
|
|
51
54
|
startHttpServer(port: number): void;
|
|
52
55
|
private _stopHttpServer;
|
package/dist/channel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","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AkB,CACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC,IAAI,CAAC;IA8ChB;;;OAGG;YACW,oBAAoB;IAqClC;;;OAGG;YACW,uBAAuB;IAkCrC;;;;OAIG;YACW,mBAAmB;IAkEjC;;;OAGG;IACH;;;OAGG;YACW,mBAAmB;IA8GjC,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,UAAU;YAMJ,mBAAmB;IAmCjC,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,kBAAkB;IAiH1B,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;IAKpB;;;OAGG;YACW,aAAa;CAc5B"}
|
package/dist/cli.js
CHANGED
|
@@ -45282,6 +45282,10 @@ var init_channel = __esm({
|
|
|
45282
45282
|
throw new Error("No active sessions");
|
|
45283
45283
|
}
|
|
45284
45284
|
const topicId = options?.topicId ?? this._persisted?.defaultTopicId;
|
|
45285
|
+
const messageType = options?.messageType ?? "text";
|
|
45286
|
+
const priority = options?.priority ?? "normal";
|
|
45287
|
+
const parentSpanId = options?.parentSpanId;
|
|
45288
|
+
const envelopeMetadata = options?.metadata;
|
|
45285
45289
|
this._appendHistory("agent", plaintext, topicId);
|
|
45286
45290
|
const messageGroupId = randomUUID();
|
|
45287
45291
|
for (const [convId, session] of this._sessions) {
|
|
@@ -45304,7 +45308,11 @@ var init_channel = __esm({
|
|
|
45304
45308
|
header_blob: msg.headerBlob,
|
|
45305
45309
|
ciphertext: msg.ciphertext,
|
|
45306
45310
|
message_group_id: msg.messageGroupId,
|
|
45307
|
-
topic_id: msg.topicId
|
|
45311
|
+
topic_id: msg.topicId,
|
|
45312
|
+
message_type: messageType,
|
|
45313
|
+
priority,
|
|
45314
|
+
parent_span_id: parentSpanId,
|
|
45315
|
+
metadata: envelopeMetadata
|
|
45308
45316
|
}
|
|
45309
45317
|
})
|
|
45310
45318
|
);
|
|
@@ -45322,6 +45330,21 @@ var init_channel = __esm({
|
|
|
45322
45330
|
}
|
|
45323
45331
|
await this._persistState();
|
|
45324
45332
|
}
|
|
45333
|
+
/**
|
|
45334
|
+
* Send a typing indicator to all owner devices.
|
|
45335
|
+
* Ephemeral (unencrypted metadata), no ratchet advancement.
|
|
45336
|
+
*/
|
|
45337
|
+
sendTyping() {
|
|
45338
|
+
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
45339
|
+
for (const convId of this._sessions.keys()) {
|
|
45340
|
+
this._ws.send(
|
|
45341
|
+
JSON.stringify({
|
|
45342
|
+
event: "typing",
|
|
45343
|
+
data: { conversation_id: convId }
|
|
45344
|
+
})
|
|
45345
|
+
);
|
|
45346
|
+
}
|
|
45347
|
+
}
|
|
45325
45348
|
async stop() {
|
|
45326
45349
|
this._stopped = true;
|
|
45327
45350
|
this._flushAcks();
|
|
@@ -45804,7 +45827,12 @@ ${messageText}`;
|
|
|
45804
45827
|
conversationId: convId,
|
|
45805
45828
|
timestamp: msgData.created_at,
|
|
45806
45829
|
topicId,
|
|
45807
|
-
attachment: attachData
|
|
45830
|
+
attachment: attachData,
|
|
45831
|
+
spanId: msgData.span_id,
|
|
45832
|
+
parentSpanId: msgData.parent_span_id,
|
|
45833
|
+
messageType: msgData.message_type ?? "text",
|
|
45834
|
+
priority: msgData.priority ?? "normal",
|
|
45835
|
+
envelopeVersion: msgData.envelope_version ?? "1.0.0"
|
|
45808
45836
|
};
|
|
45809
45837
|
this.emit("message", emitText, metadata);
|
|
45810
45838
|
this.config.onMessage?.(emitText, metadata);
|
|
@@ -46490,7 +46518,7 @@ async function runSetupCommand(options) {
|
|
|
46490
46518
|
}
|
|
46491
46519
|
function installPlugin(env) {
|
|
46492
46520
|
try {
|
|
46493
|
-
const info = execSync("openclaw plugins info
|
|
46521
|
+
const info = execSync("openclaw plugins info agentvault", {
|
|
46494
46522
|
stdio: "pipe",
|
|
46495
46523
|
env
|
|
46496
46524
|
});
|
|
@@ -46499,7 +46527,7 @@ function installPlugin(env) {
|
|
|
46499
46527
|
const installedVersion = versionMatch?.[1];
|
|
46500
46528
|
if (installedVersion && installedVersion !== VERSION) {
|
|
46501
46529
|
console.log(` Updating plugin ${installedVersion} \u2192 ${VERSION}...`);
|
|
46502
|
-
spawnSync("openclaw", ["plugins", "uninstall", "
|
|
46530
|
+
spawnSync("openclaw", ["plugins", "uninstall", "agentvault"], {
|
|
46503
46531
|
stdio: "pipe",
|
|
46504
46532
|
input: "y\n",
|
|
46505
46533
|
env
|