@owloops/browserbird 1.4.14 → 1.4.15
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.mjs +14 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -122,8 +122,8 @@ function unknownSubcommand(subcommand, command, validCommands) {
|
|
|
122
122
|
/** @fileoverview ASCII banner displayed on daemon startup and in help text. */
|
|
123
123
|
const pkg = createRequire(import.meta.url)("../package.json");
|
|
124
124
|
const buildInfo = [];
|
|
125
|
-
buildInfo.push(`commit: ${"
|
|
126
|
-
buildInfo.push(`built: 2026-03-
|
|
125
|
+
buildInfo.push(`commit: ${"d1793a3eaee8e6d63526c28dcdca1e3598d384a9".substring(0, 7)}`);
|
|
126
|
+
buildInfo.push(`built: 2026-03-13T00:29:35+04:00`);
|
|
127
127
|
const buildString = buildInfo.length > 0 ? ` (${buildInfo.join(", ")})` : "";
|
|
128
128
|
const VERSION = `browserbird ${pkg.version}${buildString}`;
|
|
129
129
|
const BIRD = [
|
|
@@ -3779,7 +3779,7 @@ function createSlackChannel(getConfig, signal) {
|
|
|
3779
3779
|
if (!raw?.startsWith("retry:")) continue;
|
|
3780
3780
|
const sessionUid = raw.slice(6);
|
|
3781
3781
|
if (!sessionUid) continue;
|
|
3782
|
-
await handleSessionRetry(sessionUid,
|
|
3782
|
+
await handleSessionRetry(sessionUid, user ?? "unknown", handler);
|
|
3783
3783
|
}
|
|
3784
3784
|
}
|
|
3785
3785
|
}
|
|
@@ -3805,12 +3805,13 @@ function createSlackChannel(getConfig, signal) {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
});
|
|
3807
3807
|
async function resolveChannelNames() {
|
|
3808
|
+
const target = getConfig();
|
|
3808
3809
|
const namesToResolve = /* @__PURE__ */ new Set();
|
|
3809
3810
|
function collectNames(channels) {
|
|
3810
3811
|
for (const ch of channels) if (ch !== "*" && !ch.startsWith("C") && !ch.startsWith("D") && !ch.startsWith("G")) namesToResolve.add(ch);
|
|
3811
3812
|
}
|
|
3812
|
-
collectNames(
|
|
3813
|
-
for (const agent of
|
|
3813
|
+
collectNames(target.slack.channels);
|
|
3814
|
+
for (const agent of target.agents) collectNames(agent.channels);
|
|
3814
3815
|
if (namesToResolve.size === 0) return;
|
|
3815
3816
|
const nameToId = /* @__PURE__ */ new Map();
|
|
3816
3817
|
try {
|
|
@@ -3840,8 +3841,8 @@ function createSlackChannel(getConfig, signal) {
|
|
|
3840
3841
|
return ch;
|
|
3841
3842
|
});
|
|
3842
3843
|
}
|
|
3843
|
-
|
|
3844
|
-
for (const agent of
|
|
3844
|
+
target.slack.channels = resolveList(target.slack.channels, "slack");
|
|
3845
|
+
for (const agent of target.agents) agent.channels = resolveList(agent.channels, `agent "${agent.id}"`);
|
|
3845
3846
|
}
|
|
3846
3847
|
async function start() {
|
|
3847
3848
|
const authResult = await webClient.auth.test();
|
|
@@ -3875,7 +3876,8 @@ function createSlackChannel(getConfig, signal) {
|
|
|
3875
3876
|
stop,
|
|
3876
3877
|
isConnected,
|
|
3877
3878
|
activeCount: () => handler.activeCount(),
|
|
3878
|
-
postMessage
|
|
3879
|
+
postMessage,
|
|
3880
|
+
resolveChannelNames
|
|
3879
3881
|
};
|
|
3880
3882
|
}
|
|
3881
3883
|
async function handleBirdCreateSubmission(view, webClient) {
|
|
@@ -3902,7 +3904,7 @@ async function handleBirdCreateSubmission(view, webClient) {
|
|
|
3902
3904
|
logger.error(`bird_create submission error: ${err instanceof Error ? err.message : String(err)}`);
|
|
3903
3905
|
}
|
|
3904
3906
|
}
|
|
3905
|
-
async function handleSessionRetry(sessionUid,
|
|
3907
|
+
async function handleSessionRetry(sessionUid, userId, handler) {
|
|
3906
3908
|
try {
|
|
3907
3909
|
const { getSession, getLastInboundMessage } = await import("./db-CyQcrilg.mjs").then((n) => n.t);
|
|
3908
3910
|
const session = getSession(sessionUid);
|
|
@@ -4037,6 +4039,9 @@ async function startDaemon(options) {
|
|
|
4037
4039
|
const config = loadConfig(configPath);
|
|
4038
4040
|
ensureMcpConfig(config, configDir);
|
|
4039
4041
|
activateLayers(config);
|
|
4042
|
+
if (slackHandle) slackHandle.resolveChannelNames().catch((err) => {
|
|
4043
|
+
logger.warn(`failed to resolve channel names on reload: ${err instanceof Error ? err.message : String(err)}`);
|
|
4044
|
+
});
|
|
4040
4045
|
logger.info("config reloaded");
|
|
4041
4046
|
};
|
|
4042
4047
|
if (currentConfig.agents.length > 0) activateLayers(currentConfig);
|