@agentvault/grok-bridge 0.4.16 → 0.4.17
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.js +31 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1096,6 +1096,19 @@ var init_abstention = __esm2({
|
|
|
1096
1096
|
INSTRUCTION = "not every message needs an answer from you: if this one is not addressed to you and asks nothing of you, reply with exactly " + SENTINEL + " and nothing else \u2014 that is discarded, not posted, and is how you stay quiet; never post a message SAYING that you are staying quiet";
|
|
1097
1097
|
}
|
|
1098
1098
|
});
|
|
1099
|
+
function envelopeText(parsed, raw) {
|
|
1100
|
+
if (parsed !== null && typeof parsed === "object") {
|
|
1101
|
+
const obj = parsed;
|
|
1102
|
+
if (typeof obj.text === "string") return obj.text;
|
|
1103
|
+
if ("type" in obj || "attachment" in obj) return "";
|
|
1104
|
+
}
|
|
1105
|
+
return raw;
|
|
1106
|
+
}
|
|
1107
|
+
var init_envelope_text = __esm2({
|
|
1108
|
+
"src/envelope-text.ts"() {
|
|
1109
|
+
"use strict";
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1099
1112
|
function toEpoch(v2) {
|
|
1100
1113
|
if (typeof v2 === "bigint") return v2;
|
|
1101
1114
|
if (typeof v2 === "number") {
|
|
@@ -64657,11 +64670,11 @@ var init_mls_kp_pool = __esm2({
|
|
|
64657
64670
|
}
|
|
64658
64671
|
});
|
|
64659
64672
|
function ownIdentity() {
|
|
64660
|
-
const v2 = true ? "0.23.
|
|
64673
|
+
const v2 = true ? "0.23.44" : FALLBACK;
|
|
64661
64674
|
return `${PACKAGE}@${v2}`;
|
|
64662
64675
|
}
|
|
64663
64676
|
function buildSha() {
|
|
64664
|
-
const raw = true ? "
|
|
64677
|
+
const raw = true ? "765ae19-dirty" : "";
|
|
64665
64678
|
const cleaned = (raw ?? "").trim();
|
|
64666
64679
|
return !cleaned || cleaned === "unknown" ? null : cleaned;
|
|
64667
64680
|
}
|
|
@@ -65583,6 +65596,7 @@ var init_channel = __esm2({
|
|
|
65583
65596
|
async "src/channel.ts"() {
|
|
65584
65597
|
"use strict";
|
|
65585
65598
|
init_abstention();
|
|
65599
|
+
init_envelope_text();
|
|
65586
65600
|
init_mls_commit_classify();
|
|
65587
65601
|
init_room_protocol();
|
|
65588
65602
|
await init_libsodium_wrappers();
|
|
@@ -66912,7 +66926,7 @@ ${text}`;
|
|
|
66912
66926
|
*/
|
|
66913
66927
|
sendActivitySpan(spanData) {
|
|
66914
66928
|
if (!this._ws || this._ws.readyState !== WebSocket.OPEN) return;
|
|
66915
|
-
const pluginVersion = true ? "0.23.
|
|
66929
|
+
const pluginVersion = true ? "0.23.44" : "0.0.0-dev";
|
|
66916
66930
|
const agentName = this.config.agentName ?? "Agent";
|
|
66917
66931
|
const resource = {
|
|
66918
66932
|
"service.name": "agentvault-agent",
|
|
@@ -68850,7 +68864,7 @@ ${text}`;
|
|
|
68850
68864
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
68851
68865
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
68852
68866
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
68853
|
-
pluginVersion: true ? "0.23.
|
|
68867
|
+
pluginVersion: true ? "0.23.44" : "0.0.0-dev"
|
|
68854
68868
|
});
|
|
68855
68869
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
68856
68870
|
}
|
|
@@ -69174,7 +69188,7 @@ ${text}`;
|
|
|
69174
69188
|
agentVersion: this.config.agentVersion ?? "0.0.0",
|
|
69175
69189
|
// __AV_VERSION__ is injected by esbuild from package.json at build time.
|
|
69176
69190
|
// Falls back to "0.0.0-dev" in non-bundled contexts (tests).
|
|
69177
|
-
pluginVersion: true ? "0.23.
|
|
69191
|
+
pluginVersion: true ? "0.23.44" : "0.0.0-dev"
|
|
69178
69192
|
});
|
|
69179
69193
|
this._telemetryReporter.startAutoFlush(3e4);
|
|
69180
69194
|
}
|
|
@@ -69628,7 +69642,7 @@ ${text}`;
|
|
|
69628
69642
|
let mlsAttachment = null;
|
|
69629
69643
|
try {
|
|
69630
69644
|
const parsed = JSON.parse(plaintext);
|
|
69631
|
-
text = parsed
|
|
69645
|
+
text = envelopeText(parsed, plaintext);
|
|
69632
69646
|
messageType = parsed.type ?? "text";
|
|
69633
69647
|
topicId = parsed.topicId ?? topicId;
|
|
69634
69648
|
if (parsed.attachment) mlsAttachment = parsed.attachment;
|
|
@@ -69823,7 +69837,7 @@ ${text}`;
|
|
|
69823
69837
|
try {
|
|
69824
69838
|
const parsed = JSON.parse(plaintext);
|
|
69825
69839
|
messageType = parsed.type || "message";
|
|
69826
|
-
messageText = parsed
|
|
69840
|
+
messageText = envelopeText(parsed, plaintext);
|
|
69827
69841
|
if (parsed.attachment) {
|
|
69828
69842
|
attachmentInfo = parsed.attachment;
|
|
69829
69843
|
}
|
|
@@ -70581,14 +70595,14 @@ ${baseText}`;
|
|
|
70581
70595
|
try {
|
|
70582
70596
|
const parsed = JSON.parse(rawPlaintext);
|
|
70583
70597
|
messageType = parsed.type || "message";
|
|
70584
|
-
messageText = parsed
|
|
70598
|
+
messageText = envelopeText(parsed, rawPlaintext);
|
|
70585
70599
|
if (parsed.attachment) roomAttachment = parsed.attachment;
|
|
70586
70600
|
} catch {
|
|
70587
70601
|
messageType = "message";
|
|
70588
70602
|
messageText = rawPlaintext;
|
|
70589
70603
|
}
|
|
70590
70604
|
if (CREDENTIAL_MESSAGE_TYPES.has(messageType)) {
|
|
70591
|
-
this._handleCredentialMessage(resolvedRoomId, messageType,
|
|
70605
|
+
this._handleCredentialMessage(resolvedRoomId, messageType, rawPlaintext, data.message_id);
|
|
70592
70606
|
if (data.created_at && this._persisted) {
|
|
70593
70607
|
this._persisted.lastMessageTimestamp = data.created_at;
|
|
70594
70608
|
}
|
|
@@ -70597,7 +70611,7 @@ ${baseText}`;
|
|
|
70597
70611
|
}
|
|
70598
70612
|
if (CATCHUP_MESSAGE_TYPES.has(messageType)) {
|
|
70599
70613
|
if (messageType === "history_catchup_request") {
|
|
70600
|
-
await this._handleHistoryCatchupRequest(resolvedRoomId,
|
|
70614
|
+
await this._handleHistoryCatchupRequest(resolvedRoomId, rawPlaintext, data.message_id);
|
|
70601
70615
|
}
|
|
70602
70616
|
return;
|
|
70603
70617
|
}
|
|
@@ -72581,7 +72595,7 @@ ${baseText}`;
|
|
|
72581
72595
|
try {
|
|
72582
72596
|
const parsed = JSON.parse(plaintext);
|
|
72583
72597
|
messageType = parsed.type || "message";
|
|
72584
|
-
messageText = parsed
|
|
72598
|
+
messageText = envelopeText(parsed, plaintext);
|
|
72585
72599
|
} catch {
|
|
72586
72600
|
messageType = "message";
|
|
72587
72601
|
messageText = plaintext;
|
|
@@ -73180,7 +73194,7 @@ ${baseText}`;
|
|
|
73180
73194
|
try {
|
|
73181
73195
|
const parsed = JSON.parse(plaintext);
|
|
73182
73196
|
messageType = parsed.type || "message";
|
|
73183
|
-
messageText = parsed
|
|
73197
|
+
messageText = envelopeText(parsed, plaintext);
|
|
73184
73198
|
} catch {
|
|
73185
73199
|
messageType = "message";
|
|
73186
73200
|
messageText = plaintext;
|
|
@@ -73465,7 +73479,7 @@ ${baseText}`;
|
|
|
73465
73479
|
try {
|
|
73466
73480
|
const parsed = JSON.parse(plaintext);
|
|
73467
73481
|
messageType = parsed.type || "message";
|
|
73468
|
-
messageText = parsed
|
|
73482
|
+
messageText = envelopeText(parsed, plaintext);
|
|
73469
73483
|
} catch {
|
|
73470
73484
|
messageType = "message";
|
|
73471
73485
|
messageText = plaintext;
|
|
@@ -100158,7 +100172,7 @@ var init_index = __esm2({
|
|
|
100158
100172
|
await init_skill_telemetry();
|
|
100159
100173
|
await init_policy_enforcer();
|
|
100160
100174
|
init_room_protocol();
|
|
100161
|
-
VERSION = true ? "0.23.
|
|
100175
|
+
VERSION = true ? "0.23.44" : "0.0.0-dev";
|
|
100162
100176
|
}
|
|
100163
100177
|
});
|
|
100164
100178
|
await init_index();
|
|
@@ -101095,7 +101109,7 @@ async function main() {
|
|
|
101095
101109
|
const info = parseInfoFlags(process.argv.slice(2));
|
|
101096
101110
|
if (info.showVersion || info.showHelp) {
|
|
101097
101111
|
const version2 = buildClientVersion2(
|
|
101098
|
-
true ? "0.4.
|
|
101112
|
+
true ? "0.4.17" : void 0
|
|
101099
101113
|
);
|
|
101100
101114
|
if (info.showVersion) printLine(version2);
|
|
101101
101115
|
if (info.showHelp) {
|
|
@@ -101134,7 +101148,7 @@ async function main() {
|
|
|
101134
101148
|
process.exit(0);
|
|
101135
101149
|
}
|
|
101136
101150
|
const cfg = loadConfig(process.env, process.argv.slice(2));
|
|
101137
|
-
logLine(`[grok-bridge] version: ${true ? "0.4.
|
|
101151
|
+
logLine(`[grok-bridge] version: ${true ? "0.4.17" : "dev"}`);
|
|
101138
101152
|
mkdirSync6(cfg.workspaceDir, { recursive: true });
|
|
101139
101153
|
mkdirSync6(cfg.fenceHome, { recursive: true });
|
|
101140
101154
|
seedFenceCredential({
|
|
@@ -101149,7 +101163,7 @@ async function main() {
|
|
|
101149
101163
|
agentName: cfg.agentName,
|
|
101150
101164
|
platform: "node",
|
|
101151
101165
|
clientVersion: buildClientVersion2(
|
|
101152
|
-
true ? "0.4.
|
|
101166
|
+
true ? "0.4.17" : void 0
|
|
101153
101167
|
)
|
|
101154
101168
|
});
|
|
101155
101169
|
channelRef = channel;
|
package/package.json
CHANGED