openmates 0.15.0-alpha.27 → 0.15.0-alpha.28
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.
|
@@ -6004,7 +6004,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6004
6004
|
}
|
|
6005
6005
|
}
|
|
6006
6006
|
const explicitTasksAppSkill = messageExplicitlyRequestsTasksAppSkill(params.message);
|
|
6007
|
-
const { ws,
|
|
6007
|
+
const { ws, ownerId } = await this.openWsClient({
|
|
6008
6008
|
taskUpdateJobs: !explicitTasksAppSkill
|
|
6009
6009
|
});
|
|
6010
6010
|
if (!params.incognito && !ownerId) {
|
|
@@ -6131,6 +6131,9 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6131
6131
|
}
|
|
6132
6132
|
const encryptedEmbeds = [...params.encryptedEmbeds ?? []];
|
|
6133
6133
|
if (!params.incognito && params.preparedEmbeds && params.preparedEmbeds.length > 0) {
|
|
6134
|
+
if (!ownerId) {
|
|
6135
|
+
throw new Error("Authenticated user identity is required to encrypt embeds.");
|
|
6136
|
+
}
|
|
6134
6137
|
const masterKey = this.getMasterKeyBytes();
|
|
6135
6138
|
for (const embed of params.preparedEmbeds) {
|
|
6136
6139
|
const encrypted = await encryptEmbed(
|
|
@@ -6139,7 +6142,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6139
6142
|
chatKeyBytes,
|
|
6140
6143
|
chatId,
|
|
6141
6144
|
messageId,
|
|
6142
|
-
|
|
6145
|
+
ownerId
|
|
6143
6146
|
);
|
|
6144
6147
|
if (encrypted) encryptedEmbeds.push(encrypted);
|
|
6145
6148
|
}
|
|
@@ -6648,7 +6651,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6648
6651
|
embeds: resp.embeds,
|
|
6649
6652
|
chatId,
|
|
6650
6653
|
chatKeyBytes,
|
|
6651
|
-
fallbackMessageId: assistantId
|
|
6654
|
+
fallbackMessageId: assistantId,
|
|
6655
|
+
ownerId
|
|
6652
6656
|
});
|
|
6653
6657
|
await this.persistPostProcessingMetadata({
|
|
6654
6658
|
ws,
|
|
@@ -6931,7 +6935,6 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6931
6935
|
}).map((embed) => [embed.embed_id, embed])
|
|
6932
6936
|
);
|
|
6933
6937
|
if (finalized.size === 0) return;
|
|
6934
|
-
const session = this.requireSession();
|
|
6935
6938
|
const masterKey = this.getMasterKeyBytes();
|
|
6936
6939
|
const parentKeys = /* @__PURE__ */ new Map();
|
|
6937
6940
|
const processed = /* @__PURE__ */ new Set();
|
|
@@ -6956,10 +6959,9 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
6956
6959
|
const createdAt = normalizeUnixSeconds(embed.createdAt, now);
|
|
6957
6960
|
const updatedAt = normalizeUnixSeconds(embed.updatedAt, now);
|
|
6958
6961
|
const messageId = embed.message_id || params.fallbackMessageId;
|
|
6959
|
-
const userId = embed.user_id || session.hashedEmail;
|
|
6960
6962
|
const hashedChatId = computeSHA256(params.chatId);
|
|
6961
6963
|
const hashedMessageId = computeSHA256(messageId);
|
|
6962
|
-
const hashedUserId = computeSHA256(
|
|
6964
|
+
const hashedUserId = computeSHA256(params.ownerId);
|
|
6963
6965
|
const hashedEmbedId = computeSHA256(embed.embed_id);
|
|
6964
6966
|
const encryptedContent = await encryptWithAesGcmCombined(
|
|
6965
6967
|
embed.content ?? "",
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED