@automagik/omni 2.260915.2 → 2.260915.3
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 +2 -2
- package/dist/server/index.js +32 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -115846,7 +115846,7 @@ var require_client2 = __commonJS((exports) => {
|
|
|
115846
115846
|
|
|
115847
115847
|
// ../../node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js
|
|
115848
115848
|
var require_esmLoader = __commonJS((exports) => {
|
|
115849
|
-
var __filename = "/home/runner/work/omni/omni
|
|
115849
|
+
var __filename = "/home/runner/work/omni/omni/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
115850
115850
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
115851
115851
|
var core = require_cjs();
|
|
115852
115852
|
var importInTheMiddle = require_import_in_the_middle();
|
|
@@ -137289,7 +137289,7 @@ import { fileURLToPath } from "url";
|
|
|
137289
137289
|
// package.json
|
|
137290
137290
|
var package_default = {
|
|
137291
137291
|
name: "@automagik/omni",
|
|
137292
|
-
version: "2.260915.
|
|
137292
|
+
version: "2.260915.3",
|
|
137293
137293
|
repository: {
|
|
137294
137294
|
type: "git",
|
|
137295
137295
|
url: "git+https://github.com/automagik-dev/omni.git",
|
package/dist/server/index.js
CHANGED
|
@@ -77053,7 +77053,7 @@ var require_ClientVoiceManager = __commonJS((exports, module) => {
|
|
|
77053
77053
|
|
|
77054
77054
|
// ../../node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist/index.js
|
|
77055
77055
|
var require_dist9 = __commonJS((exports, module) => {
|
|
77056
|
-
var __dirname = "/home/runner/work/omni/omni
|
|
77056
|
+
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@discordjs+ws@1.2.3/node_modules/@discordjs/ws/dist";
|
|
77057
77057
|
var __create2 = Object.create;
|
|
77058
77058
|
var __defProp2 = Object.defineProperty;
|
|
77059
77059
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -161566,7 +161566,7 @@ var require_indexes = __commonJS((exports, module) => {
|
|
|
161566
161566
|
|
|
161567
161567
|
// ../../node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream/index.js
|
|
161568
161568
|
var require_thread_stream = __commonJS((exports, module) => {
|
|
161569
|
-
var __dirname = "/home/runner/work/omni/omni
|
|
161569
|
+
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/thread-stream@3.1.0/node_modules/thread-stream";
|
|
161570
161570
|
var { version } = require_package5();
|
|
161571
161571
|
var { EventEmitter: EventEmitter3 } = __require("events");
|
|
161572
161572
|
var { Worker } = __require("worker_threads");
|
|
@@ -161987,7 +161987,7 @@ var require_thread_stream = __commonJS((exports, module) => {
|
|
|
161987
161987
|
|
|
161988
161988
|
// ../../node_modules/.bun/pino@9.14.0/node_modules/pino/lib/transport.js
|
|
161989
161989
|
var require_transport2 = __commonJS((exports, module) => {
|
|
161990
|
-
var __dirname = "/home/runner/work/omni/omni
|
|
161990
|
+
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/pino@9.14.0/node_modules/pino/lib";
|
|
161991
161991
|
var { createRequire: createRequire2 } = __require("module");
|
|
161992
161992
|
var getCallers = require_caller();
|
|
161993
161993
|
var { join: join8, isAbsolute, sep: sep2 } = __require("path");
|
|
@@ -243760,7 +243760,7 @@ var require_client3 = __commonJS((exports) => {
|
|
|
243760
243760
|
|
|
243761
243761
|
// ../../node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js
|
|
243762
243762
|
var require_esmLoader = __commonJS((exports) => {
|
|
243763
|
-
var __filename = "/home/runner/work/omni/omni
|
|
243763
|
+
var __filename = "/home/runner/work/omni/omni/node_modules/.bun/@sentry+node-core@10.52.0+2c50d7e904f6cfd7/node_modules/@sentry/node-core/build/cjs/sdk/esmLoader.js";
|
|
243764
243764
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
243765
243765
|
var core3 = require_cjs6();
|
|
243766
243766
|
var importInTheMiddle = require_import_in_the_middle();
|
|
@@ -250986,7 +250986,7 @@ var init_sentry_scrub = __esm(() => {
|
|
|
250986
250986
|
var require_package7 = __commonJS((exports, module) => {
|
|
250987
250987
|
module.exports = {
|
|
250988
250988
|
name: "@omni/api",
|
|
250989
|
-
version: "2.260915.
|
|
250989
|
+
version: "2.260915.3",
|
|
250990
250990
|
private: true,
|
|
250991
250991
|
type: "module",
|
|
250992
250992
|
exports: {
|
|
@@ -278088,7 +278088,7 @@ var require_src45 = __commonJS((exports) => {
|
|
|
278088
278088
|
|
|
278089
278089
|
// ../../node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/channelz.js
|
|
278090
278090
|
var require_channelz = __commonJS((exports) => {
|
|
278091
|
-
var __dirname = "/home/runner/work/omni/omni
|
|
278091
|
+
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
278092
278092
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
278093
278093
|
exports.registerChannelzSocket = exports.registerChannelzServer = exports.registerChannelzSubchannel = exports.registerChannelzChannel = exports.ChannelzCallTrackerStub = exports.ChannelzCallTracker = exports.ChannelzChildrenTrackerStub = exports.ChannelzChildrenTracker = exports.ChannelzTrace = exports.ChannelzTraceStub = undefined;
|
|
278094
278094
|
exports.unregisterChannelzRef = unregisterChannelzRef;
|
|
@@ -283491,7 +283491,7 @@ var require_duration = __commonJS((exports) => {
|
|
|
283491
283491
|
|
|
283492
283492
|
// ../../node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src/orca.js
|
|
283493
283493
|
var require_orca = __commonJS((exports) => {
|
|
283494
|
-
var __dirname = "/home/runner/work/omni/omni
|
|
283494
|
+
var __dirname = "/home/runner/work/omni/omni/node_modules/.bun/@grpc+grpc-js@1.14.3/node_modules/@grpc/grpc-js/build/src";
|
|
283495
283495
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
283496
283496
|
exports.OrcaOobMetricsSubchannelWrapper = exports.GRPC_METRICS_HEADER = exports.ServerMetricRecorder = exports.PerRequestMetricRecorder = undefined;
|
|
283497
283497
|
exports.createOrcaClient = createOrcaClient;
|
|
@@ -412608,6 +412608,26 @@ class SlackPlugin extends BaseChannelPlugin {
|
|
|
412608
412608
|
this.userNameCache.set(cacheKey, null);
|
|
412609
412609
|
return;
|
|
412610
412610
|
}
|
|
412611
|
+
async resolveChannelName(instanceId, channelId) {
|
|
412612
|
+
const cacheKey = `${instanceId}:channel:${channelId}`;
|
|
412613
|
+
if (this.userNameCache.has(cacheKey)) {
|
|
412614
|
+
return this.userNameCache.get(cacheKey) ?? undefined;
|
|
412615
|
+
}
|
|
412616
|
+
let name;
|
|
412617
|
+
try {
|
|
412618
|
+
const result = await this.getConnection(instanceId).actingClient.conversations.info({ channel: channelId });
|
|
412619
|
+
name = result.channel?.name || undefined;
|
|
412620
|
+
} catch (error) {
|
|
412621
|
+
this.logger.warn("Failed to fetch channel info", { channelId, error: String(error) });
|
|
412622
|
+
}
|
|
412623
|
+
this.userNameCache.set(cacheKey, name ?? null);
|
|
412624
|
+
return name;
|
|
412625
|
+
}
|
|
412626
|
+
handleChannelRename(instanceId, event) {
|
|
412627
|
+
const channel2 = event.channel;
|
|
412628
|
+
if (channel2?.id && channel2.name)
|
|
412629
|
+
this.userNameCache.set(`${instanceId}:channel:${channel2.id}`, channel2.name);
|
|
412630
|
+
}
|
|
412611
412631
|
resolveThreadTs(replyToMode, replyTo, threadId) {
|
|
412612
412632
|
switch (replyToMode) {
|
|
412613
412633
|
case "all":
|
|
@@ -412918,12 +412938,12 @@ class SlackPlugin extends BaseChannelPlugin {
|
|
|
412918
412938
|
this.threadCaches.delete(instanceId);
|
|
412919
412939
|
}
|
|
412920
412940
|
}
|
|
412921
|
-
async buildEnrichedPayload(instanceId, from, rawPayload) {
|
|
412941
|
+
async buildEnrichedPayload(instanceId, from, chatId, rawPayload) {
|
|
412922
412942
|
const displayName = await this.resolveUserDisplayName(instanceId, from);
|
|
412923
412943
|
const isDm = rawPayload.isDm;
|
|
412924
412944
|
const isMpim = rawPayload.isMpim === true;
|
|
412925
412945
|
const isOneToOne = isDm && !isMpim;
|
|
412926
|
-
const chatName = isOneToOne ? displayName : undefined;
|
|
412946
|
+
const chatName = isOneToOne ? displayName : !isDm ? await this.resolveChannelName(instanceId, chatId) : undefined;
|
|
412927
412947
|
return {
|
|
412928
412948
|
...rawPayload,
|
|
412929
412949
|
displayName,
|
|
@@ -412941,7 +412961,7 @@ class SlackPlugin extends BaseChannelPlugin {
|
|
|
412941
412961
|
if (connection && config2) {
|
|
412942
412962
|
this.addAckReaction(instanceId, args.chatId, args.externalId, connection, config2);
|
|
412943
412963
|
}
|
|
412944
|
-
const enrichedPayload = await this.buildEnrichedPayload(instanceId, args.from, args.rawPayload);
|
|
412964
|
+
const enrichedPayload = await this.buildEnrichedPayload(instanceId, args.from, args.chatId, args.rawPayload);
|
|
412945
412965
|
await this.handleMessageReceived(instanceId, args.externalId, args.chatId, args.from, args.content, args.replyToId, enrichedPayload, args.platformTimestamp);
|
|
412946
412966
|
}
|
|
412947
412967
|
setupHandlers(instanceId, connection, config2, reliability) {
|
|
@@ -412953,7 +412973,7 @@ class SlackPlugin extends BaseChannelPlugin {
|
|
|
412953
412973
|
const threadTs = rawPayload.threadTs;
|
|
412954
412974
|
this.trackActiveThread(instanceId, chatId, threadTs ?? externalId);
|
|
412955
412975
|
this.addAckReaction(instanceId, chatId, externalId, connection, config2);
|
|
412956
|
-
const enrichedPayload = await this.buildEnrichedPayload(instanceId, from, rawPayload);
|
|
412976
|
+
const enrichedPayload = await this.buildEnrichedPayload(instanceId, from, chatId, rawPayload);
|
|
412957
412977
|
const files = enrichedPayload.files;
|
|
412958
412978
|
if (files && files.length > 0) {
|
|
412959
412979
|
await this.handleInboundFiles(instanceId, externalId, chatId, from, content, replyToId, enrichedPayload, platformTimestamp);
|
|
@@ -412997,6 +413017,7 @@ class SlackPlugin extends BaseChannelPlugin {
|
|
|
412997
413017
|
}
|
|
412998
413018
|
}
|
|
412999
413019
|
}, this.logger);
|
|
413020
|
+
connection.app.event("channel_rename", async ({ event }) => this.handleChannelRename(instanceId, event));
|
|
413000
413021
|
setupAgentSessionHandlers(connection.app, instanceId, {
|
|
413001
413022
|
onSessionStopped: async (instId, args) => {
|
|
413002
413023
|
await this.handleAgentSessionStopped(instId, connection, args);
|